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 smb2.twrp.listdir_fix f886ca1c Lines: 2417 35470 6.8 %
Date: 2023-11-07 19:11:32 Functions: 121 2350 5.1 %

          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       12050 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34       12050 :         switch (var_size) {
      35           0 :         case 8:
      36           0 :                 return UINT64_MAX;
      37        5202 :         case 4:
      38        5202 :                 return UINT32_MAX;
      39         280 :         case 2:
      40         280 :                 return UINT16_MAX;
      41        6568 :         case 1:
      42        6568 :                 return UINT8_MAX;
      43             :         }
      44             : 
      45           0 :         return 0;
      46             : }
      47             : 
      48          39 : static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
      49             : {
      50          39 :         switch (var_size) {
      51          39 :         case 8:
      52          39 :                 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             : #include "librpc/gen_ndr/nbt.h"
      69             : static PyTypeObject netr_UasInfo_Type;
      70             : static PyTypeObject netr_UasLogoffInfo_Type;
      71             : static PyTypeObject netr_AcctLockStr_Type;
      72             : static PyTypeObject netr_IdentityInfo_Type;
      73             : static PyTypeObject netr_PasswordInfo_Type;
      74             : static PyTypeObject netr_ChallengeResponse_Type;
      75             : static PyTypeObject netr_NetworkInfo_Type;
      76             : static PyTypeObject netr_GenericInfo_Type;
      77             : static PyTypeObject netr_LogonLevel_Type;
      78             : static PyTypeObject netr_UserSessionKey_Type;
      79             : static PyTypeObject netr_LMSessionKey_Type;
      80             : static PyTypeObject netr_SamBaseInfo_Type;
      81             : static PyTypeObject netr_SamInfo2_Type;
      82             : static PyTypeObject netr_SidAttr_Type;
      83             : static PyTypeObject netr_SamInfo3_Type;
      84             : static PyTypeObject netr_SamInfo6_Type;
      85             : static PyTypeObject netr_PacInfo_Type;
      86             : static PyTypeObject netr_GenericInfo2_Type;
      87             : static PyTypeObject netr_Validation_Type;
      88             : static PyTypeObject netr_Credential_Type;
      89             : static PyTypeObject netlogon_server_pipe_state_Type;
      90             : static PyTypeObject netr_Authenticator_Type;
      91             : static PyTypeObject netr_DELTA_DELETE_USER_Type;
      92             : static PyTypeObject netr_USER_KEY16_Type;
      93             : static PyTypeObject netr_PasswordHistory_Type;
      94             : static PyTypeObject netr_USER_KEYS2_Type;
      95             : static PyTypeObject netr_USER_KEY_UNION_Type;
      96             : static PyTypeObject netr_USER_KEYS_Type;
      97             : static PyTypeObject netr_USER_PRIVATE_INFO_Type;
      98             : static PyTypeObject netr_DELTA_USER_Type;
      99             : static PyTypeObject netr_DELTA_DOMAIN_Type;
     100             : static PyTypeObject netr_DELTA_GROUP_Type;
     101             : static PyTypeObject netr_DELTA_RENAME_Type;
     102             : static PyTypeObject netr_DELTA_GROUP_MEMBER_Type;
     103             : static PyTypeObject netr_DELTA_ALIAS_Type;
     104             : static PyTypeObject netr_DELTA_ALIAS_MEMBER_Type;
     105             : static PyTypeObject netr_QUOTA_LIMITS_Type;
     106             : static PyTypeObject netr_DELTA_POLICY_Type;
     107             : static PyTypeObject netr_DELTA_TRUSTED_DOMAIN_Type;
     108             : static PyTypeObject netr_DELTA_ACCOUNT_Type;
     109             : static PyTypeObject netr_CIPHER_VALUE_Type;
     110             : static PyTypeObject netr_DELTA_SECRET_Type;
     111             : static PyTypeObject netr_DELTA_UNION_Type;
     112             : static PyTypeObject netr_DELTA_ID_UNION_Type;
     113             : static PyTypeObject netr_DELTA_ENUM_Type;
     114             : static PyTypeObject netr_DELTA_ENUM_ARRAY_Type;
     115             : static PyTypeObject netr_UAS_INFO_0_Type;
     116             : static PyTypeObject netr_AccountBuffer_Type;
     117             : static PyTypeObject netr_NETLOGON_INFO_1_Type;
     118             : static PyTypeObject netr_NETLOGON_INFO_2_Type;
     119             : static PyTypeObject netr_NETLOGON_INFO_3_Type;
     120             : static PyTypeObject netr_NETLOGON_INFO_4_Type;
     121             : static PyTypeObject netr_CONTROL_QUERY_INFORMATION_Type;
     122             : static PyTypeObject netr_CONTROL_DATA_INFORMATION_Type;
     123             : static PyTypeObject netr_ChangeLogObject_Type;
     124             : static PyTypeObject netr_ChangeLogEntry_Type;
     125             : static PyTypeObject netr_Blob_Type;
     126             : static PyTypeObject netr_DsRGetDCNameInfo_Type;
     127             : static PyTypeObject netr_Capabilities_Type;
     128             : static PyTypeObject netr_LsaPolicyInformation_Type;
     129             : static PyTypeObject netr_OsVersionInfoEx_Type;
     130             : static PyTypeObject netr_OsVersion_Type;
     131             : static PyTypeObject netr_OsVersionContainer_Type;
     132             : static PyTypeObject netr_WorkstationInformation_Type;
     133             : static PyTypeObject netr_WorkstationInfo_Type;
     134             : static PyTypeObject netr_trust_extension_info_Type;
     135             : static PyTypeObject netr_trust_extension_Type;
     136             : static PyTypeObject netr_trust_extension_container_Type;
     137             : static PyTypeObject netr_OneDomainInfo_Type;
     138             : static PyTypeObject netr_DomainInformation_Type;
     139             : static PyTypeObject netr_DomainInfo_Type;
     140             : static PyTypeObject NL_PASSWORD_VERSION_Type;
     141             : static PyTypeObject netr_CryptPassword_Type;
     142             : static PyTypeObject netr_SendToSamResetBadPasswordCount_Type;
     143             : static PyTypeObject netr_SendToSamMessage_Type;
     144             : static PyTypeObject netr_SendToSamBase_Type;
     145             : static PyTypeObject netr_DsRAddressToSitenamesWCtr_Type;
     146             : static PyTypeObject netr_DsRAddress_Type;
     147             : static PyTypeObject netr_DomainTrust_Type;
     148             : static PyTypeObject netr_DomainTrustList_Type;
     149             : static PyTypeObject netr_DsRAddressToSitenamesExWCtr_Type;
     150             : static PyTypeObject DcSitesCtr_Type;
     151             : static PyTypeObject netr_TrustInfo_Type;
     152             : static PyTypeObject NL_DNS_NAME_INFO_Type;
     153             : static PyTypeObject NL_DNS_NAME_INFO_ARRAY_Type;
     154             : static PyTypeObject netlogon_InterfaceType;
     155             : static PyTypeObject netr_LogonUasLogon_Type;
     156             : static PyTypeObject netr_LogonUasLogoff_Type;
     157             : static PyTypeObject netr_LogonSamLogon_Type;
     158             : static PyTypeObject netr_LogonSamLogoff_Type;
     159             : static PyTypeObject netr_ServerReqChallenge_Type;
     160             : static PyTypeObject netr_ServerAuthenticate_Type;
     161             : static PyTypeObject netr_ServerPasswordSet_Type;
     162             : static PyTypeObject netr_DatabaseDeltas_Type;
     163             : static PyTypeObject netr_DatabaseSync_Type;
     164             : static PyTypeObject netr_AccountDeltas_Type;
     165             : static PyTypeObject netr_AccountSync_Type;
     166             : static PyTypeObject netr_GetDcName_Type;
     167             : static PyTypeObject netr_LogonControl_Type;
     168             : static PyTypeObject netr_GetAnyDCName_Type;
     169             : static PyTypeObject netr_LogonControl2_Type;
     170             : static PyTypeObject netr_ServerAuthenticate2_Type;
     171             : static PyTypeObject netr_DatabaseSync2_Type;
     172             : static PyTypeObject netr_DatabaseRedo_Type;
     173             : static PyTypeObject netr_LogonControl2Ex_Type;
     174             : static PyTypeObject netr_NetrEnumerateTrustedDomains_Type;
     175             : static PyTypeObject netr_DsRGetDCName_Type;
     176             : static PyTypeObject netr_LogonGetCapabilities_Type;
     177             : static PyTypeObject netr_LogonGetTrustRid_Type;
     178             : static PyTypeObject netr_ServerAuthenticate3_Type;
     179             : static PyTypeObject netr_DsRGetDCNameEx_Type;
     180             : static PyTypeObject netr_DsRGetSiteName_Type;
     181             : static PyTypeObject netr_LogonGetDomainInfo_Type;
     182             : static PyTypeObject netr_ServerPasswordSet2_Type;
     183             : static PyTypeObject netr_ServerPasswordGet_Type;
     184             : static PyTypeObject netr_NetrLogonSendToSam_Type;
     185             : static PyTypeObject netr_DsRAddressToSitenamesW_Type;
     186             : static PyTypeObject netr_DsRGetDCNameEx2_Type;
     187             : static PyTypeObject netr_NetrEnumerateTrustedDomainsEx_Type;
     188             : static PyTypeObject netr_DsRAddressToSitenamesExW_Type;
     189             : static PyTypeObject netr_DsrGetDcSiteCoverageW_Type;
     190             : static PyTypeObject netr_LogonSamLogonEx_Type;
     191             : static PyTypeObject netr_DsrEnumerateDomainTrusts_Type;
     192             : static PyTypeObject netr_DsrDeregisterDNSHostRecords_Type;
     193             : static PyTypeObject netr_ServerTrustPasswordsGet_Type;
     194             : static PyTypeObject netr_DsRGetForestTrustInformation_Type;
     195             : static PyTypeObject netr_GetForestTrustInformation_Type;
     196             : static PyTypeObject netr_LogonSamLogonWithFlags_Type;
     197             : static PyTypeObject netr_ServerGetTrustInfo_Type;
     198             : static PyTypeObject netr_Unused47_Type;
     199             : static PyTypeObject netr_DsrUpdateReadOnlyServerDnsRecords_Type;
     200             : 
     201             : static PyTypeObject *BaseObject_Type;
     202             : static PyTypeObject *lsa_String_Type;
     203             : static PyTypeObject *samr_Password_Type;
     204             : static PyTypeObject *samr_RidWithAttributeArray_Type;
     205             : static PyTypeObject *lsa_StringLarge_Type;
     206             : static PyTypeObject *dom_sid_Type;
     207             : static PyTypeObject *samr_LogonHours_Type;
     208             : static PyTypeObject *lsa_BinaryString_Type;
     209             : static PyTypeObject *sec_desc_buf_Type;
     210             : static PyTypeObject *lsa_SidArray_Type;
     211             : static PyTypeObject *GUID_Type;
     212             : static PyTypeObject *lsa_ForestTrustInformation_Type;
     213             : static PyTypeObject *ClientConnection_Type;
     214             : static PyTypeObject *ndr_syntax_id_Type;
     215             : 
     216           0 : static PyObject *py_netr_UasInfo_get_account_name(PyObject *obj, void *closure)
     217             : {
     218           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     219           0 :         PyObject *py_account_name;
     220           0 :         if (object->account_name == NULL) {
     221           0 :                 Py_RETURN_NONE;
     222             :         }
     223           0 :         if (object->account_name == NULL) {
     224           0 :                 py_account_name = Py_None;
     225           0 :                 Py_INCREF(py_account_name);
     226             :         } else {
     227           0 :                 if (object->account_name == NULL) {
     228           0 :                         py_account_name = Py_None;
     229           0 :                         Py_INCREF(py_account_name);
     230             :                 } else {
     231           0 :                         py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
     232             :                 }
     233             :         }
     234           0 :         return py_account_name;
     235             : }
     236             : 
     237           0 : static int py_netr_UasInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
     238             : {
     239           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     240           0 :         if (value == NULL) {
     241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
     242           0 :                 return -1;
     243             :         }
     244           0 :         if (value == Py_None) {
     245           0 :                 object->account_name = NULL;
     246             :         } else {
     247           0 :                 object->account_name = NULL;
     248             :                 {
     249           0 :                         const char *test_str;
     250           0 :                         const char *talloc_str;
     251           0 :                         PyObject *unicode = NULL;
     252           0 :                         if (PyUnicode_Check(value)) {
     253           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     254           0 :                                 if (unicode == NULL) {
     255           0 :                                         PyErr_NoMemory();
     256           0 :                                         return -1;
     257             :                                 }
     258           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     259           0 :                         } else if (PyBytes_Check(value)) {
     260           0 :                                 test_str = PyBytes_AS_STRING(value);
     261             :                         } else {
     262           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     263           0 :                                 return -1;
     264             :                         }
     265           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     266           0 :                         if (unicode != NULL) {
     267           0 :                                 Py_DECREF(unicode);
     268             :                         }
     269           0 :                         if (talloc_str == NULL) {
     270           0 :                                 PyErr_NoMemory();
     271           0 :                                 return -1;
     272             :                         }
     273           0 :                         object->account_name = talloc_str;
     274             :                 }
     275             :         }
     276           0 :         return 0;
     277             : }
     278             : 
     279           0 : static PyObject *py_netr_UasInfo_get_priv(PyObject *obj, void *closure)
     280             : {
     281           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     282           0 :         PyObject *py_priv;
     283           0 :         py_priv = PyLong_FromUnsignedLongLong((uint32_t)object->priv);
     284           0 :         return py_priv;
     285             : }
     286             : 
     287           0 : static int py_netr_UasInfo_set_priv(PyObject *py_obj, PyObject *value, void *closure)
     288             : {
     289           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     290           0 :         if (value == NULL) {
     291           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->priv");
     292           0 :                 return -1;
     293             :         }
     294             :         {
     295           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priv));
     296           0 :                 if (PyLong_Check(value)) {
     297           0 :                         unsigned long long test_var;
     298           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     299           0 :                         if (PyErr_Occurred() != NULL) {
     300           0 :                                 return -1;
     301             :                         }
     302           0 :                         if (test_var > uint_max) {
     303           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     304             :                                   PyLong_Type.tp_name, uint_max, test_var);
     305           0 :                                 return -1;
     306             :                         }
     307           0 :                         object->priv = test_var;
     308             :                 } else {
     309           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     310             :                           PyLong_Type.tp_name);
     311           0 :                         return -1;
     312             :                 }
     313             :         }
     314           0 :         return 0;
     315             : }
     316             : 
     317           0 : static PyObject *py_netr_UasInfo_get_auth_flags(PyObject *obj, void *closure)
     318             : {
     319           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     320           0 :         PyObject *py_auth_flags;
     321           0 :         py_auth_flags = PyLong_FromUnsignedLongLong((uint32_t)object->auth_flags);
     322           0 :         return py_auth_flags;
     323             : }
     324             : 
     325           0 : static int py_netr_UasInfo_set_auth_flags(PyObject *py_obj, PyObject *value, void *closure)
     326             : {
     327           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     328           0 :         if (value == NULL) {
     329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_flags");
     330           0 :                 return -1;
     331             :         }
     332             :         {
     333           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_flags));
     334           0 :                 if (PyLong_Check(value)) {
     335           0 :                         unsigned long long test_var;
     336           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     337           0 :                         if (PyErr_Occurred() != NULL) {
     338           0 :                                 return -1;
     339             :                         }
     340           0 :                         if (test_var > uint_max) {
     341           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     342             :                                   PyLong_Type.tp_name, uint_max, test_var);
     343           0 :                                 return -1;
     344             :                         }
     345           0 :                         object->auth_flags = test_var;
     346             :                 } else {
     347           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     348             :                           PyLong_Type.tp_name);
     349           0 :                         return -1;
     350             :                 }
     351             :         }
     352           0 :         return 0;
     353             : }
     354             : 
     355           0 : static PyObject *py_netr_UasInfo_get_logon_count(PyObject *obj, void *closure)
     356             : {
     357           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     358           0 :         PyObject *py_logon_count;
     359           0 :         py_logon_count = PyLong_FromUnsignedLongLong((uint32_t)object->logon_count);
     360           0 :         return py_logon_count;
     361             : }
     362             : 
     363           0 : static int py_netr_UasInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
     364             : {
     365           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     366           0 :         if (value == NULL) {
     367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
     368           0 :                 return -1;
     369             :         }
     370             :         {
     371           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
     372           0 :                 if (PyLong_Check(value)) {
     373           0 :                         unsigned long long test_var;
     374           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     375           0 :                         if (PyErr_Occurred() != NULL) {
     376           0 :                                 return -1;
     377             :                         }
     378           0 :                         if (test_var > uint_max) {
     379           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     380             :                                   PyLong_Type.tp_name, uint_max, test_var);
     381           0 :                                 return -1;
     382             :                         }
     383           0 :                         object->logon_count = test_var;
     384             :                 } else {
     385           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     386             :                           PyLong_Type.tp_name);
     387           0 :                         return -1;
     388             :                 }
     389             :         }
     390           0 :         return 0;
     391             : }
     392             : 
     393           0 : static PyObject *py_netr_UasInfo_get_bad_pw_count(PyObject *obj, void *closure)
     394             : {
     395           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     396           0 :         PyObject *py_bad_pw_count;
     397           0 :         py_bad_pw_count = PyLong_FromUnsignedLongLong((uint32_t)object->bad_pw_count);
     398           0 :         return py_bad_pw_count;
     399             : }
     400             : 
     401           0 : static int py_netr_UasInfo_set_bad_pw_count(PyObject *py_obj, PyObject *value, void *closure)
     402             : {
     403           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     404           0 :         if (value == NULL) {
     405           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_pw_count");
     406           0 :                 return -1;
     407             :         }
     408             :         {
     409           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_pw_count));
     410           0 :                 if (PyLong_Check(value)) {
     411           0 :                         unsigned long long test_var;
     412           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     413           0 :                         if (PyErr_Occurred() != NULL) {
     414           0 :                                 return -1;
     415             :                         }
     416           0 :                         if (test_var > uint_max) {
     417           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     418             :                                   PyLong_Type.tp_name, uint_max, test_var);
     419           0 :                                 return -1;
     420             :                         }
     421           0 :                         object->bad_pw_count = test_var;
     422             :                 } else {
     423           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     424             :                           PyLong_Type.tp_name);
     425           0 :                         return -1;
     426             :                 }
     427             :         }
     428           0 :         return 0;
     429             : }
     430             : 
     431           0 : static PyObject *py_netr_UasInfo_get_last_logon(PyObject *obj, void *closure)
     432             : {
     433           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     434           0 :         PyObject *py_last_logon;
     435           0 :         py_last_logon = PyLong_FromLong(object->last_logon);
     436           0 :         return py_last_logon;
     437             : }
     438             : 
     439           0 : static int py_netr_UasInfo_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
     440             : {
     441           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     442           0 :         if (value == NULL) {
     443           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logon");
     444           0 :                 return -1;
     445             :         }
     446             :         {
     447           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logon));
     448           0 :                 const long long int_min = -int_max - 1;
     449           0 :                 if (PyLong_Check(value)) {
     450           0 :                         long long test_var;
     451           0 :                         test_var = PyLong_AsLongLong(value);
     452           0 :                         if (PyErr_Occurred() != NULL) {
     453           0 :                                 return -1;
     454             :                         }
     455           0 :                         if (test_var < int_min || test_var > int_max) {
     456           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     457             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     458           0 :                                 return -1;
     459             :                         }
     460           0 :                         object->last_logon = test_var;
     461             :                 } else {
     462           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     463             :                           PyLong_Type.tp_name);
     464           0 :                         return -1;
     465             :                 }
     466             :         }
     467           0 :         return 0;
     468             : }
     469             : 
     470           0 : static PyObject *py_netr_UasInfo_get_last_logoff(PyObject *obj, void *closure)
     471             : {
     472           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     473           0 :         PyObject *py_last_logoff;
     474           0 :         py_last_logoff = PyLong_FromLong(object->last_logoff);
     475           0 :         return py_last_logoff;
     476             : }
     477             : 
     478           0 : static int py_netr_UasInfo_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
     479             : {
     480           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     481           0 :         if (value == NULL) {
     482           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logoff");
     483           0 :                 return -1;
     484             :         }
     485             :         {
     486           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logoff));
     487           0 :                 const long long int_min = -int_max - 1;
     488           0 :                 if (PyLong_Check(value)) {
     489           0 :                         long long test_var;
     490           0 :                         test_var = PyLong_AsLongLong(value);
     491           0 :                         if (PyErr_Occurred() != NULL) {
     492           0 :                                 return -1;
     493             :                         }
     494           0 :                         if (test_var < int_min || test_var > int_max) {
     495           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     496             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     497           0 :                                 return -1;
     498             :                         }
     499           0 :                         object->last_logoff = test_var;
     500             :                 } else {
     501           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     502             :                           PyLong_Type.tp_name);
     503           0 :                         return -1;
     504             :                 }
     505             :         }
     506           0 :         return 0;
     507             : }
     508             : 
     509           0 : static PyObject *py_netr_UasInfo_get_logoff_time(PyObject *obj, void *closure)
     510             : {
     511           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     512           0 :         PyObject *py_logoff_time;
     513           0 :         py_logoff_time = PyLong_FromLong(object->logoff_time);
     514           0 :         return py_logoff_time;
     515             : }
     516             : 
     517           0 : static int py_netr_UasInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
     518             : {
     519           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     520           0 :         if (value == NULL) {
     521           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logoff_time");
     522           0 :                 return -1;
     523             :         }
     524             :         {
     525           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->logoff_time));
     526           0 :                 const long long int_min = -int_max - 1;
     527           0 :                 if (PyLong_Check(value)) {
     528           0 :                         long long test_var;
     529           0 :                         test_var = PyLong_AsLongLong(value);
     530           0 :                         if (PyErr_Occurred() != NULL) {
     531           0 :                                 return -1;
     532             :                         }
     533           0 :                         if (test_var < int_min || test_var > int_max) {
     534           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     535             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     536           0 :                                 return -1;
     537             :                         }
     538           0 :                         object->logoff_time = test_var;
     539             :                 } else {
     540           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     541             :                           PyLong_Type.tp_name);
     542           0 :                         return -1;
     543             :                 }
     544             :         }
     545           0 :         return 0;
     546             : }
     547             : 
     548           0 : static PyObject *py_netr_UasInfo_get_kickoff_time(PyObject *obj, void *closure)
     549             : {
     550           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     551           0 :         PyObject *py_kickoff_time;
     552           0 :         py_kickoff_time = PyLong_FromLong(object->kickoff_time);
     553           0 :         return py_kickoff_time;
     554             : }
     555             : 
     556           0 : static int py_netr_UasInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
     557             : {
     558           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     559           0 :         if (value == NULL) {
     560           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->kickoff_time");
     561           0 :                 return -1;
     562             :         }
     563             :         {
     564           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->kickoff_time));
     565           0 :                 const long long int_min = -int_max - 1;
     566           0 :                 if (PyLong_Check(value)) {
     567           0 :                         long long test_var;
     568           0 :                         test_var = PyLong_AsLongLong(value);
     569           0 :                         if (PyErr_Occurred() != NULL) {
     570           0 :                                 return -1;
     571             :                         }
     572           0 :                         if (test_var < int_min || test_var > int_max) {
     573           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     574             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     575           0 :                                 return -1;
     576             :                         }
     577           0 :                         object->kickoff_time = test_var;
     578             :                 } else {
     579           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     580             :                           PyLong_Type.tp_name);
     581           0 :                         return -1;
     582             :                 }
     583             :         }
     584           0 :         return 0;
     585             : }
     586             : 
     587           0 : static PyObject *py_netr_UasInfo_get_password_age(PyObject *obj, void *closure)
     588             : {
     589           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     590           0 :         PyObject *py_password_age;
     591           0 :         py_password_age = PyLong_FromUnsignedLongLong((uint32_t)object->password_age);
     592           0 :         return py_password_age;
     593             : }
     594             : 
     595           0 : static int py_netr_UasInfo_set_password_age(PyObject *py_obj, PyObject *value, void *closure)
     596             : {
     597           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     598           0 :         if (value == NULL) {
     599           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password_age");
     600           0 :                 return -1;
     601             :         }
     602             :         {
     603           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_age));
     604           0 :                 if (PyLong_Check(value)) {
     605           0 :                         unsigned long long test_var;
     606           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     607           0 :                         if (PyErr_Occurred() != NULL) {
     608           0 :                                 return -1;
     609             :                         }
     610           0 :                         if (test_var > uint_max) {
     611           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     612             :                                   PyLong_Type.tp_name, uint_max, test_var);
     613           0 :                                 return -1;
     614             :                         }
     615           0 :                         object->password_age = test_var;
     616             :                 } else {
     617           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     618             :                           PyLong_Type.tp_name);
     619           0 :                         return -1;
     620             :                 }
     621             :         }
     622           0 :         return 0;
     623             : }
     624             : 
     625           0 : static PyObject *py_netr_UasInfo_get_pw_can_change(PyObject *obj, void *closure)
     626             : {
     627           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     628           0 :         PyObject *py_pw_can_change;
     629           0 :         py_pw_can_change = PyLong_FromLong(object->pw_can_change);
     630           0 :         return py_pw_can_change;
     631             : }
     632             : 
     633           0 : static int py_netr_UasInfo_set_pw_can_change(PyObject *py_obj, PyObject *value, void *closure)
     634             : {
     635           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     636           0 :         if (value == NULL) {
     637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pw_can_change");
     638           0 :                 return -1;
     639             :         }
     640             :         {
     641           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_can_change));
     642           0 :                 const long long int_min = -int_max - 1;
     643           0 :                 if (PyLong_Check(value)) {
     644           0 :                         long long test_var;
     645           0 :                         test_var = PyLong_AsLongLong(value);
     646           0 :                         if (PyErr_Occurred() != NULL) {
     647           0 :                                 return -1;
     648             :                         }
     649           0 :                         if (test_var < int_min || test_var > int_max) {
     650           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     651             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     652           0 :                                 return -1;
     653             :                         }
     654           0 :                         object->pw_can_change = test_var;
     655             :                 } else {
     656           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     657             :                           PyLong_Type.tp_name);
     658           0 :                         return -1;
     659             :                 }
     660             :         }
     661           0 :         return 0;
     662             : }
     663             : 
     664           0 : static PyObject *py_netr_UasInfo_get_pw_must_change(PyObject *obj, void *closure)
     665             : {
     666           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     667           0 :         PyObject *py_pw_must_change;
     668           0 :         py_pw_must_change = PyLong_FromLong(object->pw_must_change);
     669           0 :         return py_pw_must_change;
     670             : }
     671             : 
     672           0 : static int py_netr_UasInfo_set_pw_must_change(PyObject *py_obj, PyObject *value, void *closure)
     673             : {
     674           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     675           0 :         if (value == NULL) {
     676           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pw_must_change");
     677           0 :                 return -1;
     678             :         }
     679             :         {
     680           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_must_change));
     681           0 :                 const long long int_min = -int_max - 1;
     682           0 :                 if (PyLong_Check(value)) {
     683           0 :                         long long test_var;
     684           0 :                         test_var = PyLong_AsLongLong(value);
     685           0 :                         if (PyErr_Occurred() != NULL) {
     686           0 :                                 return -1;
     687             :                         }
     688           0 :                         if (test_var < int_min || test_var > int_max) {
     689           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     690             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     691           0 :                                 return -1;
     692             :                         }
     693           0 :                         object->pw_must_change = test_var;
     694             :                 } else {
     695           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     696             :                           PyLong_Type.tp_name);
     697           0 :                         return -1;
     698             :                 }
     699             :         }
     700           0 :         return 0;
     701             : }
     702             : 
     703           0 : static PyObject *py_netr_UasInfo_get_computer(PyObject *obj, void *closure)
     704             : {
     705           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     706           0 :         PyObject *py_computer;
     707           0 :         if (object->computer == NULL) {
     708           0 :                 Py_RETURN_NONE;
     709             :         }
     710           0 :         if (object->computer == NULL) {
     711           0 :                 py_computer = Py_None;
     712           0 :                 Py_INCREF(py_computer);
     713             :         } else {
     714           0 :                 if (object->computer == NULL) {
     715           0 :                         py_computer = Py_None;
     716           0 :                         Py_INCREF(py_computer);
     717             :                 } else {
     718           0 :                         py_computer = PyUnicode_Decode(object->computer, strlen(object->computer), "utf-8", "ignore");
     719             :                 }
     720             :         }
     721           0 :         return py_computer;
     722             : }
     723             : 
     724           0 : static int py_netr_UasInfo_set_computer(PyObject *py_obj, PyObject *value, void *closure)
     725             : {
     726           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     727           0 :         if (value == NULL) {
     728           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer");
     729           0 :                 return -1;
     730             :         }
     731           0 :         if (value == Py_None) {
     732           0 :                 object->computer = NULL;
     733             :         } else {
     734           0 :                 object->computer = NULL;
     735             :                 {
     736           0 :                         const char *test_str;
     737           0 :                         const char *talloc_str;
     738           0 :                         PyObject *unicode = NULL;
     739           0 :                         if (PyUnicode_Check(value)) {
     740           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     741           0 :                                 if (unicode == NULL) {
     742           0 :                                         PyErr_NoMemory();
     743           0 :                                         return -1;
     744             :                                 }
     745           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     746           0 :                         } else if (PyBytes_Check(value)) {
     747           0 :                                 test_str = PyBytes_AS_STRING(value);
     748             :                         } else {
     749           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     750           0 :                                 return -1;
     751             :                         }
     752           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     753           0 :                         if (unicode != NULL) {
     754           0 :                                 Py_DECREF(unicode);
     755             :                         }
     756           0 :                         if (talloc_str == NULL) {
     757           0 :                                 PyErr_NoMemory();
     758           0 :                                 return -1;
     759             :                         }
     760           0 :                         object->computer = talloc_str;
     761             :                 }
     762             :         }
     763           0 :         return 0;
     764             : }
     765             : 
     766           0 : static PyObject *py_netr_UasInfo_get_domain(PyObject *obj, void *closure)
     767             : {
     768           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     769           0 :         PyObject *py_domain;
     770           0 :         if (object->domain == NULL) {
     771           0 :                 Py_RETURN_NONE;
     772             :         }
     773           0 :         if (object->domain == NULL) {
     774           0 :                 py_domain = Py_None;
     775           0 :                 Py_INCREF(py_domain);
     776             :         } else {
     777           0 :                 if (object->domain == NULL) {
     778           0 :                         py_domain = Py_None;
     779           0 :                         Py_INCREF(py_domain);
     780             :                 } else {
     781           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
     782             :                 }
     783             :         }
     784           0 :         return py_domain;
     785             : }
     786             : 
     787           0 : static int py_netr_UasInfo_set_domain(PyObject *py_obj, PyObject *value, void *closure)
     788             : {
     789           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     790           0 :         if (value == NULL) {
     791           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
     792           0 :                 return -1;
     793             :         }
     794           0 :         if (value == Py_None) {
     795           0 :                 object->domain = NULL;
     796             :         } else {
     797           0 :                 object->domain = NULL;
     798             :                 {
     799           0 :                         const char *test_str;
     800           0 :                         const char *talloc_str;
     801           0 :                         PyObject *unicode = NULL;
     802           0 :                         if (PyUnicode_Check(value)) {
     803           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     804           0 :                                 if (unicode == NULL) {
     805           0 :                                         PyErr_NoMemory();
     806           0 :                                         return -1;
     807             :                                 }
     808           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     809           0 :                         } else if (PyBytes_Check(value)) {
     810           0 :                                 test_str = PyBytes_AS_STRING(value);
     811             :                         } else {
     812           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     813           0 :                                 return -1;
     814             :                         }
     815           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     816           0 :                         if (unicode != NULL) {
     817           0 :                                 Py_DECREF(unicode);
     818             :                         }
     819           0 :                         if (talloc_str == NULL) {
     820           0 :                                 PyErr_NoMemory();
     821           0 :                                 return -1;
     822             :                         }
     823           0 :                         object->domain = talloc_str;
     824             :                 }
     825             :         }
     826           0 :         return 0;
     827             : }
     828             : 
     829           0 : static PyObject *py_netr_UasInfo_get_script_path(PyObject *obj, void *closure)
     830             : {
     831           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     832           0 :         PyObject *py_script_path;
     833           0 :         if (object->script_path == NULL) {
     834           0 :                 Py_RETURN_NONE;
     835             :         }
     836           0 :         if (object->script_path == NULL) {
     837           0 :                 py_script_path = Py_None;
     838           0 :                 Py_INCREF(py_script_path);
     839             :         } else {
     840           0 :                 if (object->script_path == NULL) {
     841           0 :                         py_script_path = Py_None;
     842           0 :                         Py_INCREF(py_script_path);
     843             :                 } else {
     844           0 :                         py_script_path = PyUnicode_Decode(object->script_path, strlen(object->script_path), "utf-8", "ignore");
     845             :                 }
     846             :         }
     847           0 :         return py_script_path;
     848             : }
     849             : 
     850           0 : static int py_netr_UasInfo_set_script_path(PyObject *py_obj, PyObject *value, void *closure)
     851             : {
     852           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     853           0 :         if (value == NULL) {
     854           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->script_path");
     855           0 :                 return -1;
     856             :         }
     857           0 :         if (value == Py_None) {
     858           0 :                 object->script_path = NULL;
     859             :         } else {
     860           0 :                 object->script_path = NULL;
     861             :                 {
     862           0 :                         const char *test_str;
     863           0 :                         const char *talloc_str;
     864           0 :                         PyObject *unicode = NULL;
     865           0 :                         if (PyUnicode_Check(value)) {
     866           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     867           0 :                                 if (unicode == NULL) {
     868           0 :                                         PyErr_NoMemory();
     869           0 :                                         return -1;
     870             :                                 }
     871           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     872           0 :                         } else if (PyBytes_Check(value)) {
     873           0 :                                 test_str = PyBytes_AS_STRING(value);
     874             :                         } else {
     875           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     876           0 :                                 return -1;
     877             :                         }
     878           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     879           0 :                         if (unicode != NULL) {
     880           0 :                                 Py_DECREF(unicode);
     881             :                         }
     882           0 :                         if (talloc_str == NULL) {
     883           0 :                                 PyErr_NoMemory();
     884           0 :                                 return -1;
     885             :                         }
     886           0 :                         object->script_path = talloc_str;
     887             :                 }
     888             :         }
     889           0 :         return 0;
     890             : }
     891             : 
     892           0 : static PyObject *py_netr_UasInfo_get_unknown(PyObject *obj, void *closure)
     893             : {
     894           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     895           0 :         PyObject *py_unknown;
     896           0 :         py_unknown = PyLong_FromUnsignedLongLong((uint32_t)object->unknown);
     897           0 :         return py_unknown;
     898             : }
     899             : 
     900           0 : static int py_netr_UasInfo_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
     901             : {
     902           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     903           0 :         if (value == NULL) {
     904           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown");
     905           0 :                 return -1;
     906             :         }
     907             :         {
     908           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown));
     909           0 :                 if (PyLong_Check(value)) {
     910           0 :                         unsigned long long test_var;
     911           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     912           0 :                         if (PyErr_Occurred() != NULL) {
     913           0 :                                 return -1;
     914             :                         }
     915           0 :                         if (test_var > uint_max) {
     916           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     917             :                                   PyLong_Type.tp_name, uint_max, test_var);
     918           0 :                                 return -1;
     919             :                         }
     920           0 :                         object->unknown = test_var;
     921             :                 } else {
     922           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     923             :                           PyLong_Type.tp_name);
     924           0 :                         return -1;
     925             :                 }
     926             :         }
     927           0 :         return 0;
     928             : }
     929             : 
     930             : static PyGetSetDef py_netr_UasInfo_getsetters[] = {
     931             :         {
     932             :                 .name = discard_const_p(char, "account_name"),
     933             :                 .get = py_netr_UasInfo_get_account_name,
     934             :                 .set = py_netr_UasInfo_set_account_name,
     935             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     936             :         },
     937             :         {
     938             :                 .name = discard_const_p(char, "priv"),
     939             :                 .get = py_netr_UasInfo_get_priv,
     940             :                 .set = py_netr_UasInfo_set_priv,
     941             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     942             :         },
     943             :         {
     944             :                 .name = discard_const_p(char, "auth_flags"),
     945             :                 .get = py_netr_UasInfo_get_auth_flags,
     946             :                 .set = py_netr_UasInfo_set_auth_flags,
     947             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     948             :         },
     949             :         {
     950             :                 .name = discard_const_p(char, "logon_count"),
     951             :                 .get = py_netr_UasInfo_get_logon_count,
     952             :                 .set = py_netr_UasInfo_set_logon_count,
     953             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     954             :         },
     955             :         {
     956             :                 .name = discard_const_p(char, "bad_pw_count"),
     957             :                 .get = py_netr_UasInfo_get_bad_pw_count,
     958             :                 .set = py_netr_UasInfo_set_bad_pw_count,
     959             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     960             :         },
     961             :         {
     962             :                 .name = discard_const_p(char, "last_logon"),
     963             :                 .get = py_netr_UasInfo_get_last_logon,
     964             :                 .set = py_netr_UasInfo_set_last_logon,
     965             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     966             :         },
     967             :         {
     968             :                 .name = discard_const_p(char, "last_logoff"),
     969             :                 .get = py_netr_UasInfo_get_last_logoff,
     970             :                 .set = py_netr_UasInfo_set_last_logoff,
     971             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     972             :         },
     973             :         {
     974             :                 .name = discard_const_p(char, "logoff_time"),
     975             :                 .get = py_netr_UasInfo_get_logoff_time,
     976             :                 .set = py_netr_UasInfo_set_logoff_time,
     977             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     978             :         },
     979             :         {
     980             :                 .name = discard_const_p(char, "kickoff_time"),
     981             :                 .get = py_netr_UasInfo_get_kickoff_time,
     982             :                 .set = py_netr_UasInfo_set_kickoff_time,
     983             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     984             :         },
     985             :         {
     986             :                 .name = discard_const_p(char, "password_age"),
     987             :                 .get = py_netr_UasInfo_get_password_age,
     988             :                 .set = py_netr_UasInfo_set_password_age,
     989             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     990             :         },
     991             :         {
     992             :                 .name = discard_const_p(char, "pw_can_change"),
     993             :                 .get = py_netr_UasInfo_get_pw_can_change,
     994             :                 .set = py_netr_UasInfo_set_pw_can_change,
     995             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     996             :         },
     997             :         {
     998             :                 .name = discard_const_p(char, "pw_must_change"),
     999             :                 .get = py_netr_UasInfo_get_pw_must_change,
    1000             :                 .set = py_netr_UasInfo_set_pw_must_change,
    1001             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
    1002             :         },
    1003             :         {
    1004             :                 .name = discard_const_p(char, "computer"),
    1005             :                 .get = py_netr_UasInfo_get_computer,
    1006             :                 .set = py_netr_UasInfo_set_computer,
    1007             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1008             :         },
    1009             :         {
    1010             :                 .name = discard_const_p(char, "domain"),
    1011             :                 .get = py_netr_UasInfo_get_domain,
    1012             :                 .set = py_netr_UasInfo_set_domain,
    1013             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1014             :         },
    1015             :         {
    1016             :                 .name = discard_const_p(char, "script_path"),
    1017             :                 .get = py_netr_UasInfo_get_script_path,
    1018             :                 .set = py_netr_UasInfo_set_script_path,
    1019             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1020             :         },
    1021             :         {
    1022             :                 .name = discard_const_p(char, "unknown"),
    1023             :                 .get = py_netr_UasInfo_get_unknown,
    1024             :                 .set = py_netr_UasInfo_set_unknown,
    1025             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1026             :         },
    1027             :         { .name = NULL }
    1028             : };
    1029             : 
    1030           0 : static PyObject *py_netr_UasInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1031             : {
    1032           0 :         return pytalloc_new(struct netr_UasInfo, type);
    1033             : }
    1034             : 
    1035             : 
    1036             : static PyTypeObject netr_UasInfo_Type = {
    1037             :         PyVarObject_HEAD_INIT(NULL, 0)
    1038             :         .tp_name = "netlogon.netr_UasInfo",
    1039             :         .tp_getset = py_netr_UasInfo_getsetters,
    1040             :         .tp_methods = NULL,
    1041             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1042             :         .tp_new = py_netr_UasInfo_new,
    1043             : };
    1044             : 
    1045             : 
    1046           0 : static PyObject *py_netr_UasLogoffInfo_get_duration(PyObject *obj, void *closure)
    1047             : {
    1048           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(obj);
    1049           0 :         PyObject *py_duration;
    1050           0 :         py_duration = PyLong_FromUnsignedLongLong((uint32_t)object->duration);
    1051           0 :         return py_duration;
    1052             : }
    1053             : 
    1054           0 : static int py_netr_UasLogoffInfo_set_duration(PyObject *py_obj, PyObject *value, void *closure)
    1055             : {
    1056           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(py_obj);
    1057           0 :         if (value == NULL) {
    1058           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->duration");
    1059           0 :                 return -1;
    1060             :         }
    1061             :         {
    1062           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->duration));
    1063           0 :                 if (PyLong_Check(value)) {
    1064           0 :                         unsigned long long test_var;
    1065           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1066           0 :                         if (PyErr_Occurred() != NULL) {
    1067           0 :                                 return -1;
    1068             :                         }
    1069           0 :                         if (test_var > uint_max) {
    1070           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1071             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1072           0 :                                 return -1;
    1073             :                         }
    1074           0 :                         object->duration = test_var;
    1075             :                 } else {
    1076           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1077             :                           PyLong_Type.tp_name);
    1078           0 :                         return -1;
    1079             :                 }
    1080             :         }
    1081           0 :         return 0;
    1082             : }
    1083             : 
    1084           0 : static PyObject *py_netr_UasLogoffInfo_get_logon_count(PyObject *obj, void *closure)
    1085             : {
    1086           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(obj);
    1087           0 :         PyObject *py_logon_count;
    1088           0 :         py_logon_count = PyLong_FromLong((uint16_t)object->logon_count);
    1089           0 :         return py_logon_count;
    1090             : }
    1091             : 
    1092           0 : static int py_netr_UasLogoffInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    1093             : {
    1094           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(py_obj);
    1095           0 :         if (value == NULL) {
    1096           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
    1097           0 :                 return -1;
    1098             :         }
    1099             :         {
    1100           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    1101           0 :                 if (PyLong_Check(value)) {
    1102           0 :                         unsigned long long test_var;
    1103           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1104           0 :                         if (PyErr_Occurred() != NULL) {
    1105           0 :                                 return -1;
    1106             :                         }
    1107           0 :                         if (test_var > uint_max) {
    1108           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1109             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1110           0 :                                 return -1;
    1111             :                         }
    1112           0 :                         object->logon_count = test_var;
    1113             :                 } else {
    1114           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1115             :                           PyLong_Type.tp_name);
    1116           0 :                         return -1;
    1117             :                 }
    1118             :         }
    1119           0 :         return 0;
    1120             : }
    1121             : 
    1122             : static PyGetSetDef py_netr_UasLogoffInfo_getsetters[] = {
    1123             :         {
    1124             :                 .name = discard_const_p(char, "duration"),
    1125             :                 .get = py_netr_UasLogoffInfo_get_duration,
    1126             :                 .set = py_netr_UasLogoffInfo_set_duration,
    1127             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1128             :         },
    1129             :         {
    1130             :                 .name = discard_const_p(char, "logon_count"),
    1131             :                 .get = py_netr_UasLogoffInfo_get_logon_count,
    1132             :                 .set = py_netr_UasLogoffInfo_set_logon_count,
    1133             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1134             :         },
    1135             :         { .name = NULL }
    1136             : };
    1137             : 
    1138           0 : static PyObject *py_netr_UasLogoffInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1139             : {
    1140           0 :         return pytalloc_new(struct netr_UasLogoffInfo, type);
    1141             : }
    1142             : 
    1143             : 
    1144             : static PyTypeObject netr_UasLogoffInfo_Type = {
    1145             :         PyVarObject_HEAD_INIT(NULL, 0)
    1146             :         .tp_name = "netlogon.netr_UasLogoffInfo",
    1147             :         .tp_getset = py_netr_UasLogoffInfo_getsetters,
    1148             :         .tp_methods = NULL,
    1149             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1150             :         .tp_new = py_netr_UasLogoffInfo_new,
    1151             : };
    1152             : 
    1153             : 
    1154           0 : static PyObject *py_netr_AcctLockStr_get_lockout_duration(PyObject *obj, void *closure)
    1155             : {
    1156           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1157           0 :         PyObject *py_lockout_duration;
    1158           0 :         py_lockout_duration = PyLong_FromLongLong(object->lockout_duration);
    1159           0 :         return py_lockout_duration;
    1160             : }
    1161             : 
    1162           0 : static int py_netr_AcctLockStr_set_lockout_duration(PyObject *py_obj, PyObject *value, void *closure)
    1163             : {
    1164           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1165           0 :         if (value == NULL) {
    1166           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lockout_duration");
    1167           0 :                 return -1;
    1168             :         }
    1169             :         {
    1170           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->lockout_duration));
    1171           0 :                 const long long int_min = -int_max - 1;
    1172           0 :                 if (PyLong_Check(value)) {
    1173           0 :                         long long test_var;
    1174           0 :                         test_var = PyLong_AsLongLong(value);
    1175           0 :                         if (PyErr_Occurred() != NULL) {
    1176           0 :                                 return -1;
    1177             :                         }
    1178           0 :                         if (test_var < int_min || test_var > int_max) {
    1179           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    1180             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    1181           0 :                                 return -1;
    1182             :                         }
    1183           0 :                         object->lockout_duration = test_var;
    1184             :                 } else {
    1185           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1186             :                           PyLong_Type.tp_name);
    1187           0 :                         return -1;
    1188             :                 }
    1189             :         }
    1190           0 :         return 0;
    1191             : }
    1192             : 
    1193           0 : static PyObject *py_netr_AcctLockStr_get_reset_count(PyObject *obj, void *closure)
    1194             : {
    1195           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1196           0 :         PyObject *py_reset_count;
    1197           0 :         py_reset_count = PyLong_FromUnsignedLongLong(object->reset_count);
    1198           0 :         return py_reset_count;
    1199             : }
    1200             : 
    1201           0 : static int py_netr_AcctLockStr_set_reset_count(PyObject *py_obj, PyObject *value, void *closure)
    1202             : {
    1203           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1204           0 :         if (value == NULL) {
    1205           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reset_count");
    1206           0 :                 return -1;
    1207             :         }
    1208             :         {
    1209           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reset_count));
    1210           0 :                 if (PyLong_Check(value)) {
    1211           0 :                         unsigned long long test_var;
    1212           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1213           0 :                         if (PyErr_Occurred() != NULL) {
    1214           0 :                                 return -1;
    1215             :                         }
    1216           0 :                         if (test_var > uint_max) {
    1217           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1218             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1219           0 :                                 return -1;
    1220             :                         }
    1221           0 :                         object->reset_count = test_var;
    1222             :                 } else {
    1223           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1224             :                           PyLong_Type.tp_name);
    1225           0 :                         return -1;
    1226             :                 }
    1227             :         }
    1228           0 :         return 0;
    1229             : }
    1230             : 
    1231           0 : static PyObject *py_netr_AcctLockStr_get_bad_attempt_lockout(PyObject *obj, void *closure)
    1232             : {
    1233           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1234           0 :         PyObject *py_bad_attempt_lockout;
    1235           0 :         py_bad_attempt_lockout = PyLong_FromUnsignedLongLong((uint32_t)object->bad_attempt_lockout);
    1236           0 :         return py_bad_attempt_lockout;
    1237             : }
    1238             : 
    1239           0 : static int py_netr_AcctLockStr_set_bad_attempt_lockout(PyObject *py_obj, PyObject *value, void *closure)
    1240             : {
    1241           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1242           0 :         if (value == NULL) {
    1243           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_attempt_lockout");
    1244           0 :                 return -1;
    1245             :         }
    1246             :         {
    1247           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_attempt_lockout));
    1248           0 :                 if (PyLong_Check(value)) {
    1249           0 :                         unsigned long long test_var;
    1250           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1251           0 :                         if (PyErr_Occurred() != NULL) {
    1252           0 :                                 return -1;
    1253             :                         }
    1254           0 :                         if (test_var > uint_max) {
    1255           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1256             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1257           0 :                                 return -1;
    1258             :                         }
    1259           0 :                         object->bad_attempt_lockout = test_var;
    1260             :                 } else {
    1261           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1262             :                           PyLong_Type.tp_name);
    1263           0 :                         return -1;
    1264             :                 }
    1265             :         }
    1266           0 :         return 0;
    1267             : }
    1268             : 
    1269           0 : static PyObject *py_netr_AcctLockStr_get_dummy(PyObject *obj, void *closure)
    1270             : {
    1271           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1272           0 :         PyObject *py_dummy;
    1273           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)object->dummy);
    1274           0 :         return py_dummy;
    1275             : }
    1276             : 
    1277           0 : static int py_netr_AcctLockStr_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
    1278             : {
    1279           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1280           0 :         if (value == NULL) {
    1281           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy");
    1282           0 :                 return -1;
    1283             :         }
    1284             :         {
    1285           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
    1286           0 :                 if (PyLong_Check(value)) {
    1287           0 :                         unsigned long long test_var;
    1288           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1289           0 :                         if (PyErr_Occurred() != NULL) {
    1290           0 :                                 return -1;
    1291             :                         }
    1292           0 :                         if (test_var > uint_max) {
    1293           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1294             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1295           0 :                                 return -1;
    1296             :                         }
    1297           0 :                         object->dummy = test_var;
    1298             :                 } else {
    1299           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1300             :                           PyLong_Type.tp_name);
    1301           0 :                         return -1;
    1302             :                 }
    1303             :         }
    1304           0 :         return 0;
    1305             : }
    1306             : 
    1307             : static PyGetSetDef py_netr_AcctLockStr_getsetters[] = {
    1308             :         {
    1309             :                 .name = discard_const_p(char, "lockout_duration"),
    1310             :                 .get = py_netr_AcctLockStr_get_lockout_duration,
    1311             :                 .set = py_netr_AcctLockStr_set_lockout_duration,
    1312             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    1313             :         },
    1314             :         {
    1315             :                 .name = discard_const_p(char, "reset_count"),
    1316             :                 .get = py_netr_AcctLockStr_get_reset_count,
    1317             :                 .set = py_netr_AcctLockStr_set_reset_count,
    1318             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    1319             :         },
    1320             :         {
    1321             :                 .name = discard_const_p(char, "bad_attempt_lockout"),
    1322             :                 .get = py_netr_AcctLockStr_get_bad_attempt_lockout,
    1323             :                 .set = py_netr_AcctLockStr_set_bad_attempt_lockout,
    1324             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1325             :         },
    1326             :         {
    1327             :                 .name = discard_const_p(char, "dummy"),
    1328             :                 .get = py_netr_AcctLockStr_get_dummy,
    1329             :                 .set = py_netr_AcctLockStr_set_dummy,
    1330             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1331             :         },
    1332             :         { .name = NULL }
    1333             : };
    1334             : 
    1335           0 : static PyObject *py_netr_AcctLockStr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1336             : {
    1337           0 :         return pytalloc_new(struct netr_AcctLockStr, type);
    1338             : }
    1339             : 
    1340           0 : static PyObject *py_netr_AcctLockStr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1341             : {
    1342           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1343           0 :         PyObject *ret = NULL;
    1344           0 :         DATA_BLOB blob;
    1345           0 :         enum ndr_err_code err;
    1346           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1347           0 :         if (tmp_ctx == NULL) {
    1348           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1349           0 :                 return NULL;
    1350             :         }
    1351           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_AcctLockStr);
    1352           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1353           0 :                 TALLOC_FREE(tmp_ctx);
    1354           0 :                 PyErr_SetNdrError(err);
    1355           0 :                 return NULL;
    1356             :         }
    1357             : 
    1358           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1359           0 :         TALLOC_FREE(tmp_ctx);
    1360           0 :         return ret;
    1361             : }
    1362             : 
    1363           0 : static PyObject *py_netr_AcctLockStr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1364             : {
    1365           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1366           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1367           0 :         Py_ssize_t blob_length = 0;
    1368           0 :         enum ndr_err_code err;
    1369           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1370           0 :         PyObject *allow_remaining_obj = NULL;
    1371           0 :         bool allow_remaining = false;
    1372             : 
    1373           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1374             :                 discard_const_p(char *, kwnames),
    1375             :                 &blob.data, &blob_length,
    1376             :                 &allow_remaining_obj)) {
    1377           0 :                 return NULL;
    1378             :         }
    1379           0 :         blob.length = blob_length;
    1380             : 
    1381           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1382           0 :                 allow_remaining = true;
    1383             :         }
    1384             : 
    1385           0 :         if (allow_remaining) {
    1386           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
    1387             :         } else {
    1388           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
    1389             :         }
    1390           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1391           0 :                 PyErr_SetNdrError(err);
    1392           0 :                 return NULL;
    1393             :         }
    1394             : 
    1395           0 :         Py_RETURN_NONE;
    1396             : }
    1397             : 
    1398           0 : static PyObject *py_netr_AcctLockStr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1399             : {
    1400           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1401           0 :         PyObject *ret;
    1402           0 :         char *retstr;
    1403             : 
    1404           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_AcctLockStr, "netr_AcctLockStr", object);
    1405           0 :         ret = PyUnicode_FromString(retstr);
    1406           0 :         talloc_free(retstr);
    1407             : 
    1408           0 :         return ret;
    1409             : }
    1410             : 
    1411             : static PyMethodDef py_netr_AcctLockStr_methods[] = {
    1412             :         { "__ndr_pack__", (PyCFunction)py_netr_AcctLockStr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1413             :         { "__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" },
    1414             :         { "__ndr_print__", (PyCFunction)py_netr_AcctLockStr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1415             :         { NULL, NULL, 0, NULL }
    1416             : };
    1417             : 
    1418             : 
    1419             : static PyTypeObject netr_AcctLockStr_Type = {
    1420             :         PyVarObject_HEAD_INIT(NULL, 0)
    1421             :         .tp_name = "netlogon.netr_AcctLockStr",
    1422             :         .tp_getset = py_netr_AcctLockStr_getsetters,
    1423             :         .tp_methods = py_netr_AcctLockStr_methods,
    1424             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1425             :         .tp_new = py_netr_AcctLockStr_new,
    1426             : };
    1427             : 
    1428             : 
    1429         175 : static PyObject *py_netr_IdentityInfo_get_domain_name(PyObject *obj, void *closure)
    1430             : {
    1431         175 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1432           0 :         PyObject *py_domain_name;
    1433         175 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
    1434         175 :         return py_domain_name;
    1435             : }
    1436             : 
    1437           0 : static int py_netr_IdentityInfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    1438             : {
    1439           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1440           0 :         if (value == NULL) {
    1441           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
    1442           0 :                 return -1;
    1443             :         }
    1444           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1445           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1446           0 :                 PyErr_NoMemory();
    1447           0 :                 return -1;
    1448             :         }
    1449           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    1450           0 :         return 0;
    1451             : }
    1452             : 
    1453           0 : static PyObject *py_netr_IdentityInfo_get_parameter_control(PyObject *obj, void *closure)
    1454             : {
    1455           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1456           0 :         PyObject *py_parameter_control;
    1457           0 :         py_parameter_control = PyLong_FromUnsignedLongLong((uint32_t)object->parameter_control);
    1458           0 :         return py_parameter_control;
    1459             : }
    1460             : 
    1461         159 : static int py_netr_IdentityInfo_set_parameter_control(PyObject *py_obj, PyObject *value, void *closure)
    1462             : {
    1463         159 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1464         159 :         if (value == NULL) {
    1465           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parameter_control");
    1466           0 :                 return -1;
    1467             :         }
    1468             :         {
    1469         159 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parameter_control));
    1470         159 :                 if (PyLong_Check(value)) {
    1471           0 :                         unsigned long long test_var;
    1472         159 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1473         159 :                         if (PyErr_Occurred() != NULL) {
    1474           0 :                                 return -1;
    1475             :                         }
    1476         159 :                         if (test_var > uint_max) {
    1477           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1478             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1479           0 :                                 return -1;
    1480             :                         }
    1481         159 :                         object->parameter_control = test_var;
    1482             :                 } else {
    1483           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1484             :                           PyLong_Type.tp_name);
    1485           0 :                         return -1;
    1486             :                 }
    1487             :         }
    1488         159 :         return 0;
    1489             : }
    1490             : 
    1491           0 : static PyObject *py_netr_IdentityInfo_get_logon_id(PyObject *obj, void *closure)
    1492             : {
    1493           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1494           0 :         PyObject *py_logon_id;
    1495           0 :         py_logon_id = PyLong_FromUnsignedLongLong(object->logon_id);
    1496           0 :         return py_logon_id;
    1497             : }
    1498             : 
    1499           0 : static int py_netr_IdentityInfo_set_logon_id(PyObject *py_obj, PyObject *value, void *closure)
    1500             : {
    1501           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1502           0 :         if (value == NULL) {
    1503           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_id");
    1504           0 :                 return -1;
    1505             :         }
    1506             :         {
    1507           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_id));
    1508           0 :                 if (PyLong_Check(value)) {
    1509           0 :                         unsigned long long test_var;
    1510           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1511           0 :                         if (PyErr_Occurred() != NULL) {
    1512           0 :                                 return -1;
    1513             :                         }
    1514           0 :                         if (test_var > uint_max) {
    1515           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1516             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1517           0 :                                 return -1;
    1518             :                         }
    1519           0 :                         object->logon_id = test_var;
    1520             :                 } else {
    1521           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1522             :                           PyLong_Type.tp_name);
    1523           0 :                         return -1;
    1524             :                 }
    1525             :         }
    1526           0 :         return 0;
    1527             : }
    1528             : 
    1529         175 : static PyObject *py_netr_IdentityInfo_get_account_name(PyObject *obj, void *closure)
    1530             : {
    1531         175 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1532           0 :         PyObject *py_account_name;
    1533         175 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    1534         175 :         return py_account_name;
    1535             : }
    1536             : 
    1537           0 : static int py_netr_IdentityInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    1538             : {
    1539           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1540           0 :         if (value == NULL) {
    1541           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    1542           0 :                 return -1;
    1543             :         }
    1544           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1545           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1546           0 :                 PyErr_NoMemory();
    1547           0 :                 return -1;
    1548             :         }
    1549           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    1550           0 :         return 0;
    1551             : }
    1552             : 
    1553         175 : static PyObject *py_netr_IdentityInfo_get_workstation(PyObject *obj, void *closure)
    1554             : {
    1555         175 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1556           0 :         PyObject *py_workstation;
    1557         175 :         py_workstation = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstation);
    1558         175 :         return py_workstation;
    1559             : }
    1560             : 
    1561           0 : static int py_netr_IdentityInfo_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
    1562             : {
    1563           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1564           0 :         if (value == NULL) {
    1565           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstation");
    1566           0 :                 return -1;
    1567             :         }
    1568           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1569           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1570           0 :                 PyErr_NoMemory();
    1571           0 :                 return -1;
    1572             :         }
    1573           0 :         object->workstation = *(struct lsa_String *)pytalloc_get_ptr(value);
    1574           0 :         return 0;
    1575             : }
    1576             : 
    1577             : static PyGetSetDef py_netr_IdentityInfo_getsetters[] = {
    1578             :         {
    1579             :                 .name = discard_const_p(char, "domain_name"),
    1580             :                 .get = py_netr_IdentityInfo_get_domain_name,
    1581             :                 .set = py_netr_IdentityInfo_set_domain_name,
    1582             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1583             :         },
    1584             :         {
    1585             :                 .name = discard_const_p(char, "parameter_control"),
    1586             :                 .get = py_netr_IdentityInfo_get_parameter_control,
    1587             :                 .set = py_netr_IdentityInfo_set_parameter_control,
    1588             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonParameterControl")
    1589             :         },
    1590             :         {
    1591             :                 .name = discard_const_p(char, "logon_id"),
    1592             :                 .get = py_netr_IdentityInfo_get_logon_id,
    1593             :                 .set = py_netr_IdentityInfo_set_logon_id,
    1594             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    1595             :         },
    1596             :         {
    1597             :                 .name = discard_const_p(char, "account_name"),
    1598             :                 .get = py_netr_IdentityInfo_get_account_name,
    1599             :                 .set = py_netr_IdentityInfo_set_account_name,
    1600             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1601             :         },
    1602             :         {
    1603             :                 .name = discard_const_p(char, "workstation"),
    1604             :                 .get = py_netr_IdentityInfo_get_workstation,
    1605             :                 .set = py_netr_IdentityInfo_set_workstation,
    1606             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1607             :         },
    1608             :         { .name = NULL }
    1609             : };
    1610             : 
    1611         175 : static PyObject *py_netr_IdentityInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1612             : {
    1613         175 :         return pytalloc_new(struct netr_IdentityInfo, type);
    1614             : }
    1615             : 
    1616             : 
    1617             : static PyTypeObject netr_IdentityInfo_Type = {
    1618             :         PyVarObject_HEAD_INIT(NULL, 0)
    1619             :         .tp_name = "netlogon.netr_IdentityInfo",
    1620             :         .tp_getset = py_netr_IdentityInfo_getsetters,
    1621             :         .tp_methods = NULL,
    1622             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1623             :         .tp_new = py_netr_IdentityInfo_new,
    1624             : };
    1625             : 
    1626             : 
    1627           0 : static PyObject *py_netr_PasswordInfo_get_identity_info(PyObject *obj, void *closure)
    1628             : {
    1629           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(obj);
    1630           0 :         PyObject *py_identity_info;
    1631           0 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    1632           0 :         return py_identity_info;
    1633             : }
    1634             : 
    1635          70 : static int py_netr_PasswordInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    1636             : {
    1637          70 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(py_obj);
    1638          70 :         if (value == NULL) {
    1639           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identity_info");
    1640           0 :                 return -1;
    1641             :         }
    1642          70 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    1643          70 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1644           0 :                 PyErr_NoMemory();
    1645           0 :                 return -1;
    1646             :         }
    1647          70 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    1648          70 :         return 0;
    1649             : }
    1650             : 
    1651           0 : static PyObject *py_netr_PasswordInfo_get_lmpassword(PyObject *obj, void *closure)
    1652             : {
    1653           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(obj);
    1654           0 :         PyObject *py_lmpassword;
    1655           0 :         py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    1656           0 :         return py_lmpassword;
    1657             : }
    1658             : 
    1659          70 : static int py_netr_PasswordInfo_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    1660             : {
    1661          70 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(py_obj);
    1662          70 :         if (value == NULL) {
    1663           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmpassword");
    1664           0 :                 return -1;
    1665             :         }
    1666          70 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    1667          70 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1668           0 :                 PyErr_NoMemory();
    1669           0 :                 return -1;
    1670             :         }
    1671          70 :         object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    1672          70 :         return 0;
    1673             : }
    1674             : 
    1675           0 : static PyObject *py_netr_PasswordInfo_get_ntpassword(PyObject *obj, void *closure)
    1676             : {
    1677           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(obj);
    1678           0 :         PyObject *py_ntpassword;
    1679           0 :         py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    1680           0 :         return py_ntpassword;
    1681             : }
    1682             : 
    1683          70 : static int py_netr_PasswordInfo_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    1684             : {
    1685          70 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(py_obj);
    1686          70 :         if (value == NULL) {
    1687           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntpassword");
    1688           0 :                 return -1;
    1689             :         }
    1690          70 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    1691          70 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1692           0 :                 PyErr_NoMemory();
    1693           0 :                 return -1;
    1694             :         }
    1695          70 :         object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    1696          70 :         return 0;
    1697             : }
    1698             : 
    1699             : static PyGetSetDef py_netr_PasswordInfo_getsetters[] = {
    1700             :         {
    1701             :                 .name = discard_const_p(char, "identity_info"),
    1702             :                 .get = py_netr_PasswordInfo_get_identity_info,
    1703             :                 .set = py_netr_PasswordInfo_set_identity_info,
    1704             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    1705             :         },
    1706             :         {
    1707             :                 .name = discard_const_p(char, "lmpassword"),
    1708             :                 .get = py_netr_PasswordInfo_get_lmpassword,
    1709             :                 .set = py_netr_PasswordInfo_set_lmpassword,
    1710             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    1711             :         },
    1712             :         {
    1713             :                 .name = discard_const_p(char, "ntpassword"),
    1714             :                 .get = py_netr_PasswordInfo_get_ntpassword,
    1715             :                 .set = py_netr_PasswordInfo_set_ntpassword,
    1716             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    1717             :         },
    1718             :         { .name = NULL }
    1719             : };
    1720             : 
    1721          70 : static PyObject *py_netr_PasswordInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1722             : {
    1723          70 :         return pytalloc_new(struct netr_PasswordInfo, type);
    1724             : }
    1725             : 
    1726             : 
    1727             : static PyTypeObject netr_PasswordInfo_Type = {
    1728             :         PyVarObject_HEAD_INIT(NULL, 0)
    1729             :         .tp_name = "netlogon.netr_PasswordInfo",
    1730             :         .tp_getset = py_netr_PasswordInfo_getsetters,
    1731             :         .tp_methods = NULL,
    1732             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1733             :         .tp_new = py_netr_PasswordInfo_new,
    1734             : };
    1735             : 
    1736             : 
    1737           0 : static PyObject *py_netr_ChallengeResponse_get_length(PyObject *obj, void *closure)
    1738             : {
    1739           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(obj);
    1740           0 :         PyObject *py_length;
    1741           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
    1742           0 :         return py_length;
    1743             : }
    1744             : 
    1745         105 : static int py_netr_ChallengeResponse_set_length(PyObject *py_obj, PyObject *value, void *closure)
    1746             : {
    1747         105 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(py_obj);
    1748         105 :         if (value == NULL) {
    1749           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    1750           0 :                 return -1;
    1751             :         }
    1752             :         {
    1753         105 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    1754         105 :                 if (PyLong_Check(value)) {
    1755           0 :                         unsigned long long test_var;
    1756         105 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1757         105 :                         if (PyErr_Occurred() != NULL) {
    1758           0 :                                 return -1;
    1759             :                         }
    1760         105 :                         if (test_var > uint_max) {
    1761           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1762             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1763           0 :                                 return -1;
    1764             :                         }
    1765         105 :                         object->length = test_var;
    1766             :                 } else {
    1767           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1768             :                           PyLong_Type.tp_name);
    1769           0 :                         return -1;
    1770             :                 }
    1771             :         }
    1772         105 :         return 0;
    1773             : }
    1774             : 
    1775           0 : static PyObject *py_netr_ChallengeResponse_get_size(PyObject *obj, void *closure)
    1776             : {
    1777           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(obj);
    1778           0 :         PyObject *py_size;
    1779           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
    1780           0 :         return py_size;
    1781             : }
    1782             : 
    1783           0 : static int py_netr_ChallengeResponse_set_size(PyObject *py_obj, PyObject *value, void *closure)
    1784             : {
    1785           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(py_obj);
    1786           0 :         if (value == NULL) {
    1787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
    1788           0 :                 return -1;
    1789             :         }
    1790             :         {
    1791           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    1792           0 :                 if (PyLong_Check(value)) {
    1793           0 :                         unsigned long long test_var;
    1794           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1795           0 :                         if (PyErr_Occurred() != NULL) {
    1796           0 :                                 return -1;
    1797             :                         }
    1798           0 :                         if (test_var > uint_max) {
    1799           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1800             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1801           0 :                                 return -1;
    1802             :                         }
    1803           0 :                         object->size = test_var;
    1804             :                 } else {
    1805           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1806             :                           PyLong_Type.tp_name);
    1807           0 :                         return -1;
    1808             :                 }
    1809             :         }
    1810           0 :         return 0;
    1811             : }
    1812             : 
    1813           0 : static PyObject *py_netr_ChallengeResponse_get_data(PyObject *obj, void *closure)
    1814             : {
    1815           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(obj);
    1816           0 :         PyObject *py_data;
    1817           0 :         if (object->data == NULL) {
    1818           0 :                 Py_RETURN_NONE;
    1819             :         }
    1820           0 :         if (object->data == NULL) {
    1821           0 :                 py_data = Py_None;
    1822           0 :                 Py_INCREF(py_data);
    1823             :         } else {
    1824           0 :                 py_data = PyList_New(object->length);
    1825           0 :                 if (py_data == NULL) {
    1826           0 :                         return NULL;
    1827             :                 }
    1828             :                 {
    1829             :                         int data_cntr_1;
    1830           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    1831           0 :                                 PyObject *py_data_1;
    1832           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
    1833           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    1834             :                         }
    1835             :                 }
    1836             :         }
    1837           0 :         return py_data;
    1838             : }
    1839             : 
    1840         105 : static int py_netr_ChallengeResponse_set_data(PyObject *py_obj, PyObject *value, void *closure)
    1841             : {
    1842         105 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(py_obj);
    1843         105 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    1844         105 :         if (value == NULL) {
    1845           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    1846           0 :                 return -1;
    1847             :         }
    1848         105 :         if (value == Py_None) {
    1849           0 :                 object->data = NULL;
    1850             :         } else {
    1851         105 :                 object->data = NULL;
    1852         105 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1853             :                 {
    1854           0 :                         int data_cntr_1;
    1855         105 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    1856         105 :                         if (!object->data) { return -1; }
    1857         105 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    1858        3473 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    1859        3368 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    1860           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
    1861           0 :                                         return -1;
    1862             :                                 }
    1863             :                                 {
    1864        3368 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
    1865        3368 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    1866           0 :                                                 unsigned long long test_var;
    1867        3368 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    1868        3368 :                                                 if (PyErr_Occurred() != NULL) {
    1869           0 :                                                         return -1;
    1870             :                                                 }
    1871        3368 :                                                 if (test_var > uint_max) {
    1872           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1873             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    1874           0 :                                                         return -1;
    1875             :                                                 }
    1876        3368 :                                                 object->data[data_cntr_1] = test_var;
    1877             :                                         } else {
    1878           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    1879             :                                                   PyLong_Type.tp_name);
    1880           0 :                                                 return -1;
    1881             :                                         }
    1882             :                                 }
    1883             :                         }
    1884             :                 }
    1885             :         }
    1886         105 :         return 0;
    1887             : }
    1888             : 
    1889             : static PyGetSetDef py_netr_ChallengeResponse_getsetters[] = {
    1890             :         {
    1891             :                 .name = discard_const_p(char, "length"),
    1892             :                 .get = py_netr_ChallengeResponse_get_length,
    1893             :                 .set = py_netr_ChallengeResponse_set_length,
    1894             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1895             :         },
    1896             :         {
    1897             :                 .name = discard_const_p(char, "size"),
    1898             :                 .get = py_netr_ChallengeResponse_get_size,
    1899             :                 .set = py_netr_ChallengeResponse_set_size,
    1900             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1901             :         },
    1902             :         {
    1903             :                 .name = discard_const_p(char, "data"),
    1904             :                 .get = py_netr_ChallengeResponse_get_data,
    1905             :                 .set = py_netr_ChallengeResponse_set_data,
    1906             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1907             :         },
    1908             :         { .name = NULL }
    1909             : };
    1910             : 
    1911         105 : static PyObject *py_netr_ChallengeResponse_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1912             : {
    1913         105 :         return pytalloc_new(struct netr_ChallengeResponse, type);
    1914             : }
    1915             : 
    1916             : 
    1917             : static PyTypeObject netr_ChallengeResponse_Type = {
    1918             :         PyVarObject_HEAD_INIT(NULL, 0)
    1919             :         .tp_name = "netlogon.netr_ChallengeResponse",
    1920             :         .tp_getset = py_netr_ChallengeResponse_getsetters,
    1921             :         .tp_methods = NULL,
    1922             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1923             :         .tp_new = py_netr_ChallengeResponse_new,
    1924             : };
    1925             : 
    1926             : 
    1927          60 : static PyObject *py_netr_NetworkInfo_get_identity_info(PyObject *obj, void *closure)
    1928             : {
    1929          60 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    1930           0 :         PyObject *py_identity_info;
    1931          60 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    1932          60 :         return py_identity_info;
    1933             : }
    1934             : 
    1935         105 : static int py_netr_NetworkInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    1936             : {
    1937         105 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    1938         105 :         if (value == NULL) {
    1939           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identity_info");
    1940           0 :                 return -1;
    1941             :         }
    1942         105 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    1943         105 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1944           0 :                 PyErr_NoMemory();
    1945           0 :                 return -1;
    1946             :         }
    1947         105 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    1948         105 :         return 0;
    1949             : }
    1950             : 
    1951           0 : static PyObject *py_netr_NetworkInfo_get_challenge(PyObject *obj, void *closure)
    1952             : {
    1953           0 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    1954           0 :         PyObject *py_challenge;
    1955           0 :         py_challenge = PyList_New(8);
    1956           0 :         if (py_challenge == NULL) {
    1957           0 :                 return NULL;
    1958             :         }
    1959             :         {
    1960             :                 int challenge_cntr_0;
    1961           0 :                 for (challenge_cntr_0 = 0; challenge_cntr_0 < (8); challenge_cntr_0++) {
    1962           0 :                         PyObject *py_challenge_0;
    1963           0 :                         py_challenge_0 = PyLong_FromLong((uint16_t)object->challenge[challenge_cntr_0]);
    1964           0 :                         PyList_SetItem(py_challenge, challenge_cntr_0, py_challenge_0);
    1965             :                 }
    1966             :         }
    1967           0 :         return py_challenge;
    1968             : }
    1969             : 
    1970         105 : static int py_netr_NetworkInfo_set_challenge(PyObject *py_obj, PyObject *value, void *closure)
    1971             : {
    1972         105 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    1973         105 :         if (value == NULL) {
    1974           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->challenge");
    1975           0 :                 return -1;
    1976             :         }
    1977         105 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1978             :         {
    1979           0 :                 int challenge_cntr_0;
    1980         105 :                 if (ARRAY_SIZE(object->challenge) != PyList_GET_SIZE(value)) {
    1981           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));
    1982           0 :                         return -1;
    1983             :                 }
    1984         945 :                 for (challenge_cntr_0 = 0; challenge_cntr_0 < PyList_GET_SIZE(value); challenge_cntr_0++) {
    1985         840 :                         if (PyList_GET_ITEM(value, challenge_cntr_0) == NULL) {
    1986           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->challenge[challenge_cntr_0]");
    1987           0 :                                 return -1;
    1988             :                         }
    1989             :                         {
    1990         840 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->challenge[challenge_cntr_0]));
    1991         840 :                                 if (PyLong_Check(PyList_GET_ITEM(value, challenge_cntr_0))) {
    1992           0 :                                         unsigned long long test_var;
    1993         840 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, challenge_cntr_0));
    1994         840 :                                         if (PyErr_Occurred() != NULL) {
    1995           0 :                                                 return -1;
    1996             :                                         }
    1997         840 :                                         if (test_var > uint_max) {
    1998           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1999             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2000           0 :                                                 return -1;
    2001             :                                         }
    2002         840 :                                         object->challenge[challenge_cntr_0] = test_var;
    2003             :                                 } else {
    2004           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2005             :                                           PyLong_Type.tp_name);
    2006           0 :                                         return -1;
    2007             :                                 }
    2008             :                         }
    2009             :                 }
    2010             :         }
    2011         105 :         return 0;
    2012             : }
    2013             : 
    2014         210 : static PyObject *py_netr_NetworkInfo_get_nt(PyObject *obj, void *closure)
    2015             : {
    2016         210 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    2017           0 :         PyObject *py_nt;
    2018         210 :         py_nt = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->nt);
    2019         210 :         return py_nt;
    2020             : }
    2021             : 
    2022         105 : static int py_netr_NetworkInfo_set_nt(PyObject *py_obj, PyObject *value, void *closure)
    2023             : {
    2024         105 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    2025         105 :         if (value == NULL) {
    2026           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt");
    2027           0 :                 return -1;
    2028             :         }
    2029         105 :         PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
    2030         105 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2031           0 :                 PyErr_NoMemory();
    2032           0 :                 return -1;
    2033             :         }
    2034         105 :         object->nt = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
    2035         105 :         return 0;
    2036             : }
    2037             : 
    2038           0 : static PyObject *py_netr_NetworkInfo_get_lm(PyObject *obj, void *closure)
    2039             : {
    2040           0 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    2041           0 :         PyObject *py_lm;
    2042           0 :         py_lm = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->lm);
    2043           0 :         return py_lm;
    2044             : }
    2045             : 
    2046           0 : static int py_netr_NetworkInfo_set_lm(PyObject *py_obj, PyObject *value, void *closure)
    2047             : {
    2048           0 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    2049           0 :         if (value == NULL) {
    2050           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm");
    2051           0 :                 return -1;
    2052             :         }
    2053           0 :         PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
    2054           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2055           0 :                 PyErr_NoMemory();
    2056           0 :                 return -1;
    2057             :         }
    2058           0 :         object->lm = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
    2059           0 :         return 0;
    2060             : }
    2061             : 
    2062             : static PyGetSetDef py_netr_NetworkInfo_getsetters[] = {
    2063             :         {
    2064             :                 .name = discard_const_p(char, "identity_info"),
    2065             :                 .get = py_netr_NetworkInfo_get_identity_info,
    2066             :                 .set = py_netr_NetworkInfo_set_identity_info,
    2067             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    2068             :         },
    2069             :         {
    2070             :                 .name = discard_const_p(char, "challenge"),
    2071             :                 .get = py_netr_NetworkInfo_get_challenge,
    2072             :                 .set = py_netr_NetworkInfo_set_challenge,
    2073             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2074             :         },
    2075             :         {
    2076             :                 .name = discard_const_p(char, "nt"),
    2077             :                 .get = py_netr_NetworkInfo_get_nt,
    2078             :                 .set = py_netr_NetworkInfo_set_nt,
    2079             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
    2080             :         },
    2081             :         {
    2082             :                 .name = discard_const_p(char, "lm"),
    2083             :                 .get = py_netr_NetworkInfo_get_lm,
    2084             :                 .set = py_netr_NetworkInfo_set_lm,
    2085             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
    2086             :         },
    2087             :         { .name = NULL }
    2088             : };
    2089             : 
    2090         105 : static PyObject *py_netr_NetworkInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2091             : {
    2092         105 :         return pytalloc_new(struct netr_NetworkInfo, type);
    2093             : }
    2094             : 
    2095             : 
    2096             : static PyTypeObject netr_NetworkInfo_Type = {
    2097             :         PyVarObject_HEAD_INIT(NULL, 0)
    2098             :         .tp_name = "netlogon.netr_NetworkInfo",
    2099             :         .tp_getset = py_netr_NetworkInfo_getsetters,
    2100             :         .tp_methods = NULL,
    2101             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2102             :         .tp_new = py_netr_NetworkInfo_new,
    2103             : };
    2104             : 
    2105             : 
    2106           0 : static PyObject *py_netr_GenericInfo_get_identity_info(PyObject *obj, void *closure)
    2107             : {
    2108           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2109           0 :         PyObject *py_identity_info;
    2110           0 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    2111           0 :         return py_identity_info;
    2112             : }
    2113             : 
    2114           0 : static int py_netr_GenericInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    2115             : {
    2116           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2117           0 :         if (value == NULL) {
    2118           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identity_info");
    2119           0 :                 return -1;
    2120             :         }
    2121           0 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    2122           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2123           0 :                 PyErr_NoMemory();
    2124           0 :                 return -1;
    2125             :         }
    2126           0 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    2127           0 :         return 0;
    2128             : }
    2129             : 
    2130           0 : static PyObject *py_netr_GenericInfo_get_package_name(PyObject *obj, void *closure)
    2131             : {
    2132           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2133           0 :         PyObject *py_package_name;
    2134           0 :         py_package_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->package_name);
    2135           0 :         return py_package_name;
    2136             : }
    2137             : 
    2138           0 : static int py_netr_GenericInfo_set_package_name(PyObject *py_obj, PyObject *value, void *closure)
    2139             : {
    2140           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2141           0 :         if (value == NULL) {
    2142           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->package_name");
    2143           0 :                 return -1;
    2144             :         }
    2145           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    2146           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2147           0 :                 PyErr_NoMemory();
    2148           0 :                 return -1;
    2149             :         }
    2150           0 :         object->package_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    2151           0 :         return 0;
    2152             : }
    2153             : 
    2154           0 : static PyObject *py_netr_GenericInfo_get_length(PyObject *obj, void *closure)
    2155             : {
    2156           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2157           0 :         PyObject *py_length;
    2158           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
    2159           0 :         return py_length;
    2160             : }
    2161             : 
    2162           0 : static int py_netr_GenericInfo_set_length(PyObject *py_obj, PyObject *value, void *closure)
    2163             : {
    2164           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2165           0 :         if (value == NULL) {
    2166           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    2167           0 :                 return -1;
    2168             :         }
    2169             :         {
    2170           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    2171           0 :                 if (PyLong_Check(value)) {
    2172           0 :                         unsigned long long test_var;
    2173           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2174           0 :                         if (PyErr_Occurred() != NULL) {
    2175           0 :                                 return -1;
    2176             :                         }
    2177           0 :                         if (test_var > uint_max) {
    2178           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2179             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2180           0 :                                 return -1;
    2181             :                         }
    2182           0 :                         object->length = test_var;
    2183             :                 } else {
    2184           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2185             :                           PyLong_Type.tp_name);
    2186           0 :                         return -1;
    2187             :                 }
    2188             :         }
    2189           0 :         return 0;
    2190             : }
    2191             : 
    2192           0 : static PyObject *py_netr_GenericInfo_get_data(PyObject *obj, void *closure)
    2193             : {
    2194           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2195           0 :         PyObject *py_data;
    2196           0 :         if (object->data == NULL) {
    2197           0 :                 Py_RETURN_NONE;
    2198             :         }
    2199           0 :         if (object->data == NULL) {
    2200           0 :                 py_data = Py_None;
    2201           0 :                 Py_INCREF(py_data);
    2202             :         } else {
    2203           0 :                 py_data = PyList_New(object->length);
    2204           0 :                 if (py_data == NULL) {
    2205           0 :                         return NULL;
    2206             :                 }
    2207             :                 {
    2208             :                         int data_cntr_1;
    2209           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    2210           0 :                                 PyObject *py_data_1;
    2211           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
    2212           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    2213             :                         }
    2214             :                 }
    2215             :         }
    2216           0 :         return py_data;
    2217             : }
    2218             : 
    2219           0 : static int py_netr_GenericInfo_set_data(PyObject *py_obj, PyObject *value, void *closure)
    2220             : {
    2221           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2222           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    2223           0 :         if (value == NULL) {
    2224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    2225           0 :                 return -1;
    2226             :         }
    2227           0 :         if (value == Py_None) {
    2228           0 :                 object->data = NULL;
    2229             :         } else {
    2230           0 :                 object->data = NULL;
    2231           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2232             :                 {
    2233           0 :                         int data_cntr_1;
    2234           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    2235           0 :                         if (!object->data) { return -1; }
    2236           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    2237           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    2238           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    2239           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
    2240           0 :                                         return -1;
    2241             :                                 }
    2242             :                                 {
    2243           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
    2244           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    2245           0 :                                                 unsigned long long test_var;
    2246           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    2247           0 :                                                 if (PyErr_Occurred() != NULL) {
    2248           0 :                                                         return -1;
    2249             :                                                 }
    2250           0 :                                                 if (test_var > uint_max) {
    2251           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2252             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    2253           0 :                                                         return -1;
    2254             :                                                 }
    2255           0 :                                                 object->data[data_cntr_1] = test_var;
    2256             :                                         } else {
    2257           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    2258             :                                                   PyLong_Type.tp_name);
    2259           0 :                                                 return -1;
    2260             :                                         }
    2261             :                                 }
    2262             :                         }
    2263             :                 }
    2264             :         }
    2265           0 :         return 0;
    2266             : }
    2267             : 
    2268             : static PyGetSetDef py_netr_GenericInfo_getsetters[] = {
    2269             :         {
    2270             :                 .name = discard_const_p(char, "identity_info"),
    2271             :                 .get = py_netr_GenericInfo_get_identity_info,
    2272             :                 .set = py_netr_GenericInfo_set_identity_info,
    2273             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    2274             :         },
    2275             :         {
    2276             :                 .name = discard_const_p(char, "package_name"),
    2277             :                 .get = py_netr_GenericInfo_get_package_name,
    2278             :                 .set = py_netr_GenericInfo_set_package_name,
    2279             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    2280             :         },
    2281             :         {
    2282             :                 .name = discard_const_p(char, "length"),
    2283             :                 .get = py_netr_GenericInfo_get_length,
    2284             :                 .set = py_netr_GenericInfo_set_length,
    2285             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2286             :         },
    2287             :         {
    2288             :                 .name = discard_const_p(char, "data"),
    2289             :                 .get = py_netr_GenericInfo_get_data,
    2290             :                 .set = py_netr_GenericInfo_set_data,
    2291             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2292             :         },
    2293             :         { .name = NULL }
    2294             : };
    2295             : 
    2296           0 : static PyObject *py_netr_GenericInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2297             : {
    2298           0 :         return pytalloc_new(struct netr_GenericInfo, type);
    2299             : }
    2300             : 
    2301             : 
    2302             : static PyTypeObject netr_GenericInfo_Type = {
    2303             :         PyVarObject_HEAD_INIT(NULL, 0)
    2304             :         .tp_name = "netlogon.netr_GenericInfo",
    2305             :         .tp_getset = py_netr_GenericInfo_getsetters,
    2306             :         .tp_methods = NULL,
    2307             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2308             :         .tp_new = py_netr_GenericInfo_new,
    2309             : };
    2310             : 
    2311           0 : static PyObject *py_import_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, union netr_LogonLevel *in)
    2312             : {
    2313           0 :         PyObject *ret;
    2314             : 
    2315           0 :         switch (level) {
    2316           0 :                 case NetlogonInteractiveInformation:
    2317           0 :                         if (in->password == NULL) {
    2318           0 :                                 ret = Py_None;
    2319           0 :                                 Py_INCREF(ret);
    2320             :                         } else {
    2321           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2322             :                         }
    2323           0 :                         return ret;
    2324             : 
    2325           0 :                 case NetlogonNetworkInformation:
    2326           0 :                         if (in->network == NULL) {
    2327           0 :                                 ret = Py_None;
    2328           0 :                                 Py_INCREF(ret);
    2329             :                         } else {
    2330           0 :                                 ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
    2331             :                         }
    2332           0 :                         return ret;
    2333             : 
    2334           0 :                 case NetlogonServiceInformation:
    2335           0 :                         if (in->password == NULL) {
    2336           0 :                                 ret = Py_None;
    2337           0 :                                 Py_INCREF(ret);
    2338             :                         } else {
    2339           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2340             :                         }
    2341           0 :                         return ret;
    2342             : 
    2343           0 :                 case NetlogonGenericInformation:
    2344           0 :                         if (in->generic == NULL) {
    2345           0 :                                 ret = Py_None;
    2346           0 :                                 Py_INCREF(ret);
    2347             :                         } else {
    2348           0 :                                 ret = pytalloc_reference_ex(&netr_GenericInfo_Type, in->generic, in->generic);
    2349             :                         }
    2350           0 :                         return ret;
    2351             : 
    2352           0 :                 case NetlogonInteractiveTransitiveInformation:
    2353           0 :                         if (in->password == NULL) {
    2354           0 :                                 ret = Py_None;
    2355           0 :                                 Py_INCREF(ret);
    2356             :                         } else {
    2357           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2358             :                         }
    2359           0 :                         return ret;
    2360             : 
    2361           0 :                 case NetlogonNetworkTransitiveInformation:
    2362           0 :                         if (in->network == NULL) {
    2363           0 :                                 ret = Py_None;
    2364           0 :                                 Py_INCREF(ret);
    2365             :                         } else {
    2366           0 :                                 ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
    2367             :                         }
    2368           0 :                         return ret;
    2369             : 
    2370           0 :                 case NetlogonServiceTransitiveInformation:
    2371           0 :                         if (in->password == NULL) {
    2372           0 :                                 ret = Py_None;
    2373           0 :                                 Py_INCREF(ret);
    2374             :                         } else {
    2375           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2376             :                         }
    2377           0 :                         return ret;
    2378             : 
    2379           0 :                 default:
    2380           0 :                         ret = Py_None;
    2381           0 :                         Py_INCREF(ret);
    2382           0 :                         return ret;
    2383             : 
    2384             :         }
    2385             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    2386             :         return NULL;
    2387             : }
    2388             : 
    2389         175 : static union netr_LogonLevel *py_export_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    2390             : {
    2391         175 :         union netr_LogonLevel *ret = talloc_zero(mem_ctx, union netr_LogonLevel);
    2392         175 :         switch (level) {
    2393          70 :                 case NetlogonInteractiveInformation:
    2394          70 :                         if (in == NULL) {
    2395           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2396           0 :                                 talloc_free(ret); return NULL;
    2397             :                         }
    2398          70 :                         if (in == Py_None) {
    2399           0 :                                 ret->password = NULL;
    2400             :                         } else {
    2401          70 :                                 ret->password = NULL;
    2402          70 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2403          70 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2404           0 :                                         PyErr_NoMemory();
    2405           0 :                                         talloc_free(ret); return NULL;
    2406             :                                 }
    2407          70 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2408             :                         }
    2409          70 :                         break;
    2410             : 
    2411          86 :                 case NetlogonNetworkInformation:
    2412          86 :                         if (in == NULL) {
    2413           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->network");
    2414           0 :                                 talloc_free(ret); return NULL;
    2415             :                         }
    2416          86 :                         if (in == Py_None) {
    2417           0 :                                 ret->network = NULL;
    2418             :                         } else {
    2419          86 :                                 ret->network = NULL;
    2420          86 :                                 PY_CHECK_TYPE(&netr_NetworkInfo_Type, in, talloc_free(ret); return NULL;);
    2421          86 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2422           0 :                                         PyErr_NoMemory();
    2423           0 :                                         talloc_free(ret); return NULL;
    2424             :                                 }
    2425          86 :                                 ret->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
    2426             :                         }
    2427          86 :                         break;
    2428             : 
    2429           0 :                 case NetlogonServiceInformation:
    2430           0 :                         if (in == NULL) {
    2431           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2432           0 :                                 talloc_free(ret); return NULL;
    2433             :                         }
    2434           0 :                         if (in == Py_None) {
    2435           0 :                                 ret->password = NULL;
    2436             :                         } else {
    2437           0 :                                 ret->password = NULL;
    2438           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2439           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2440           0 :                                         PyErr_NoMemory();
    2441           0 :                                         talloc_free(ret); return NULL;
    2442             :                                 }
    2443           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2444             :                         }
    2445           0 :                         break;
    2446             : 
    2447           0 :                 case NetlogonGenericInformation:
    2448           0 :                         if (in == NULL) {
    2449           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->generic");
    2450           0 :                                 talloc_free(ret); return NULL;
    2451             :                         }
    2452           0 :                         if (in == Py_None) {
    2453           0 :                                 ret->generic = NULL;
    2454             :                         } else {
    2455           0 :                                 ret->generic = NULL;
    2456           0 :                                 PY_CHECK_TYPE(&netr_GenericInfo_Type, in, talloc_free(ret); return NULL;);
    2457           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2458           0 :                                         PyErr_NoMemory();
    2459           0 :                                         talloc_free(ret); return NULL;
    2460             :                                 }
    2461           0 :                                 ret->generic = (struct netr_GenericInfo *)pytalloc_get_ptr(in);
    2462             :                         }
    2463           0 :                         break;
    2464             : 
    2465           0 :                 case NetlogonInteractiveTransitiveInformation:
    2466           0 :                         if (in == NULL) {
    2467           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2468           0 :                                 talloc_free(ret); return NULL;
    2469             :                         }
    2470           0 :                         if (in == Py_None) {
    2471           0 :                                 ret->password = NULL;
    2472             :                         } else {
    2473           0 :                                 ret->password = NULL;
    2474           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2475           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2476           0 :                                         PyErr_NoMemory();
    2477           0 :                                         talloc_free(ret); return NULL;
    2478             :                                 }
    2479           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2480             :                         }
    2481           0 :                         break;
    2482             : 
    2483          19 :                 case NetlogonNetworkTransitiveInformation:
    2484          19 :                         if (in == NULL) {
    2485           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->network");
    2486           0 :                                 talloc_free(ret); return NULL;
    2487             :                         }
    2488          19 :                         if (in == Py_None) {
    2489           0 :                                 ret->network = NULL;
    2490             :                         } else {
    2491          19 :                                 ret->network = NULL;
    2492          19 :                                 PY_CHECK_TYPE(&netr_NetworkInfo_Type, in, talloc_free(ret); return NULL;);
    2493          19 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2494           0 :                                         PyErr_NoMemory();
    2495           0 :                                         talloc_free(ret); return NULL;
    2496             :                                 }
    2497          19 :                                 ret->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
    2498             :                         }
    2499          19 :                         break;
    2500             : 
    2501           0 :                 case NetlogonServiceTransitiveInformation:
    2502           0 :                         if (in == NULL) {
    2503           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2504           0 :                                 talloc_free(ret); return NULL;
    2505             :                         }
    2506           0 :                         if (in == Py_None) {
    2507           0 :                                 ret->password = NULL;
    2508             :                         } else {
    2509           0 :                                 ret->password = NULL;
    2510           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2511           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2512           0 :                                         PyErr_NoMemory();
    2513           0 :                                         talloc_free(ret); return NULL;
    2514             :                                 }
    2515           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2516             :                         }
    2517           0 :                         break;
    2518             : 
    2519           0 :                 default:
    2520           0 :                         break;
    2521             : 
    2522             :         }
    2523             : 
    2524         175 :         return ret;
    2525             : }
    2526             : 
    2527           0 : static PyObject *py_netr_LogonLevel_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2528             : {
    2529           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2530           0 :         PyObject *mem_ctx_obj = NULL;
    2531           0 :         TALLOC_CTX *mem_ctx = NULL;
    2532           0 :         int level = 0;
    2533           0 :         PyObject *in_obj = NULL;
    2534           0 :         union netr_LogonLevel *in = NULL;
    2535             : 
    2536           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    2537             :                 discard_const_p(char *, kwnames),
    2538             :                 &mem_ctx_obj,
    2539             :                 &level,
    2540             :                 &in_obj)) {
    2541           0 :                 return NULL;
    2542             :         }
    2543           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2544           0 :         if (mem_ctx == NULL) {
    2545           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2546           0 :                 return NULL;
    2547             :         }
    2548           0 :         in = (union netr_LogonLevel *)pytalloc_get_ptr(in_obj);
    2549           0 :         if (in == NULL) {
    2550           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_LogonLevel!");
    2551           0 :                 return NULL;
    2552             :         }
    2553             : 
    2554           0 :         return py_import_netr_LogonLevel(mem_ctx, level, in);
    2555             : }
    2556             : 
    2557         175 : static PyObject *py_netr_LogonLevel_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2558             : {
    2559         175 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2560         175 :         PyObject *mem_ctx_obj = NULL;
    2561         175 :         TALLOC_CTX *mem_ctx = NULL;
    2562         175 :         int level = 0;
    2563         175 :         PyObject *in = NULL;
    2564         175 :         union netr_LogonLevel *out = NULL;
    2565             : 
    2566         175 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    2567             :                 discard_const_p(char *, kwnames),
    2568             :                 &mem_ctx_obj,
    2569             :                 &level,
    2570             :                 &in)) {
    2571           0 :                 return NULL;
    2572             :         }
    2573         175 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2574         175 :         if (mem_ctx == NULL) {
    2575           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2576           0 :                 return NULL;
    2577             :         }
    2578             : 
    2579         175 :         out = py_export_netr_LogonLevel(mem_ctx, level, in);
    2580         175 :         if (out == NULL) {
    2581           0 :                 return NULL;
    2582             :         }
    2583             : 
    2584         175 :         return pytalloc_GenericObject_reference(out);
    2585             : }
    2586             : 
    2587             : static PyMethodDef py_netr_LogonLevel_methods[] = {
    2588             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_import),
    2589             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2590             :                 "T.__import__(mem_ctx, level, in) => ret." },
    2591             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_export),
    2592             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2593             :                 "T.__export__(mem_ctx, level, in) => ret." },
    2594             :         { NULL, NULL, 0, NULL }
    2595             : };
    2596             : 
    2597           0 : static PyObject *py_netr_LogonLevel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2598             : {
    2599           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    2600           0 :         return NULL;
    2601             : }
    2602             : 
    2603             : 
    2604             : static PyTypeObject netr_LogonLevel_Type = {
    2605             :         PyVarObject_HEAD_INIT(NULL, 0)
    2606             :         .tp_name = "netlogon.netr_LogonLevel",
    2607             :         .tp_getset = NULL,
    2608             :         .tp_methods = py_netr_LogonLevel_methods,
    2609             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2610             :         .tp_new = py_netr_LogonLevel_new,
    2611             : };
    2612             : 
    2613             : 
    2614           0 : static PyObject *py_netr_UserSessionKey_get_key(PyObject *obj, void *closure)
    2615             : {
    2616           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(obj);
    2617           0 :         PyObject *py_key;
    2618           0 :         py_key = PyList_New(16);
    2619           0 :         if (py_key == NULL) {
    2620           0 :                 return NULL;
    2621             :         }
    2622             :         {
    2623             :                 int key_cntr_0;
    2624           0 :                 for (key_cntr_0 = 0; key_cntr_0 < (16); key_cntr_0++) {
    2625           0 :                         PyObject *py_key_0;
    2626           0 :                         py_key_0 = PyLong_FromLong((uint16_t)object->key[key_cntr_0]);
    2627           0 :                         PyList_SetItem(py_key, key_cntr_0, py_key_0);
    2628             :                 }
    2629             :         }
    2630           0 :         return py_key;
    2631             : }
    2632             : 
    2633           0 : static int py_netr_UserSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
    2634             : {
    2635           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2636           0 :         if (value == NULL) {
    2637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key");
    2638           0 :                 return -1;
    2639             :         }
    2640           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2641             :         {
    2642           0 :                 int key_cntr_0;
    2643           0 :                 if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
    2644           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));
    2645           0 :                         return -1;
    2646             :                 }
    2647           0 :                 for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
    2648           0 :                         if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
    2649           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key[key_cntr_0]");
    2650           0 :                                 return -1;
    2651             :                         }
    2652             :                         {
    2653           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->key[key_cntr_0]));
    2654           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
    2655           0 :                                         unsigned long long test_var;
    2656           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
    2657           0 :                                         if (PyErr_Occurred() != NULL) {
    2658           0 :                                                 return -1;
    2659             :                                         }
    2660           0 :                                         if (test_var > uint_max) {
    2661           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2662             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2663           0 :                                                 return -1;
    2664             :                                         }
    2665           0 :                                         object->key[key_cntr_0] = test_var;
    2666             :                                 } else {
    2667           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2668             :                                           PyLong_Type.tp_name);
    2669           0 :                                         return -1;
    2670             :                                 }
    2671             :                         }
    2672             :                 }
    2673             :         }
    2674           0 :         return 0;
    2675             : }
    2676             : 
    2677             : static PyGetSetDef py_netr_UserSessionKey_getsetters[] = {
    2678             :         {
    2679             :                 .name = discard_const_p(char, "key"),
    2680             :                 .get = py_netr_UserSessionKey_get_key,
    2681             :                 .set = py_netr_UserSessionKey_set_key,
    2682             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2683             :         },
    2684             :         { .name = NULL }
    2685             : };
    2686             : 
    2687           0 : static PyObject *py_netr_UserSessionKey_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2688             : {
    2689           0 :         return pytalloc_new(struct netr_UserSessionKey, type);
    2690             : }
    2691             : 
    2692           0 : static PyObject *py_netr_UserSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2693             : {
    2694           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2695           0 :         PyObject *ret = NULL;
    2696           0 :         DATA_BLOB blob;
    2697           0 :         enum ndr_err_code err;
    2698           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2699           0 :         if (tmp_ctx == NULL) {
    2700           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2701           0 :                 return NULL;
    2702             :         }
    2703           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_UserSessionKey);
    2704           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2705           0 :                 TALLOC_FREE(tmp_ctx);
    2706           0 :                 PyErr_SetNdrError(err);
    2707           0 :                 return NULL;
    2708             :         }
    2709             : 
    2710           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2711           0 :         TALLOC_FREE(tmp_ctx);
    2712           0 :         return ret;
    2713             : }
    2714             : 
    2715           0 : static PyObject *py_netr_UserSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2716             : {
    2717           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2718           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2719           0 :         Py_ssize_t blob_length = 0;
    2720           0 :         enum ndr_err_code err;
    2721           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2722           0 :         PyObject *allow_remaining_obj = NULL;
    2723           0 :         bool allow_remaining = false;
    2724             : 
    2725           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2726             :                 discard_const_p(char *, kwnames),
    2727             :                 &blob.data, &blob_length,
    2728             :                 &allow_remaining_obj)) {
    2729           0 :                 return NULL;
    2730             :         }
    2731           0 :         blob.length = blob_length;
    2732             : 
    2733           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2734           0 :                 allow_remaining = true;
    2735             :         }
    2736             : 
    2737           0 :         if (allow_remaining) {
    2738           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_UserSessionKey);
    2739             :         } else {
    2740           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_UserSessionKey);
    2741             :         }
    2742           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2743           0 :                 PyErr_SetNdrError(err);
    2744           0 :                 return NULL;
    2745             :         }
    2746             : 
    2747           0 :         Py_RETURN_NONE;
    2748             : }
    2749             : 
    2750           0 : static PyObject *py_netr_UserSessionKey_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2751             : {
    2752           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2753           0 :         PyObject *ret;
    2754           0 :         char *retstr;
    2755             : 
    2756           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_UserSessionKey, "netr_UserSessionKey", object);
    2757           0 :         ret = PyUnicode_FromString(retstr);
    2758           0 :         talloc_free(retstr);
    2759             : 
    2760           0 :         return ret;
    2761             : }
    2762             : 
    2763             : static PyMethodDef py_netr_UserSessionKey_methods[] = {
    2764             :         { "__ndr_pack__", (PyCFunction)py_netr_UserSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2765             :         { "__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" },
    2766             :         { "__ndr_print__", (PyCFunction)py_netr_UserSessionKey_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2767             :         { NULL, NULL, 0, NULL }
    2768             : };
    2769             : 
    2770             : 
    2771             : static PyTypeObject netr_UserSessionKey_Type = {
    2772             :         PyVarObject_HEAD_INIT(NULL, 0)
    2773             :         .tp_name = "netlogon.netr_UserSessionKey",
    2774             :         .tp_getset = py_netr_UserSessionKey_getsetters,
    2775             :         .tp_methods = py_netr_UserSessionKey_methods,
    2776             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2777             :         .tp_new = py_netr_UserSessionKey_new,
    2778             : };
    2779             : 
    2780             : 
    2781           0 : static PyObject *py_netr_LMSessionKey_get_key(PyObject *obj, void *closure)
    2782             : {
    2783           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(obj);
    2784           0 :         PyObject *py_key;
    2785           0 :         py_key = PyList_New(8);
    2786           0 :         if (py_key == NULL) {
    2787           0 :                 return NULL;
    2788             :         }
    2789             :         {
    2790             :                 int key_cntr_0;
    2791           0 :                 for (key_cntr_0 = 0; key_cntr_0 < (8); key_cntr_0++) {
    2792           0 :                         PyObject *py_key_0;
    2793           0 :                         py_key_0 = PyLong_FromLong((uint16_t)object->key[key_cntr_0]);
    2794           0 :                         PyList_SetItem(py_key, key_cntr_0, py_key_0);
    2795             :                 }
    2796             :         }
    2797           0 :         return py_key;
    2798             : }
    2799             : 
    2800           0 : static int py_netr_LMSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
    2801             : {
    2802           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2803           0 :         if (value == NULL) {
    2804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key");
    2805           0 :                 return -1;
    2806             :         }
    2807           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2808             :         {
    2809           0 :                 int key_cntr_0;
    2810           0 :                 if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
    2811           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));
    2812           0 :                         return -1;
    2813             :                 }
    2814           0 :                 for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
    2815           0 :                         if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
    2816           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key[key_cntr_0]");
    2817           0 :                                 return -1;
    2818             :                         }
    2819             :                         {
    2820           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->key[key_cntr_0]));
    2821           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
    2822           0 :                                         unsigned long long test_var;
    2823           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
    2824           0 :                                         if (PyErr_Occurred() != NULL) {
    2825           0 :                                                 return -1;
    2826             :                                         }
    2827           0 :                                         if (test_var > uint_max) {
    2828           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2829             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2830           0 :                                                 return -1;
    2831             :                                         }
    2832           0 :                                         object->key[key_cntr_0] = test_var;
    2833             :                                 } else {
    2834           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2835             :                                           PyLong_Type.tp_name);
    2836           0 :                                         return -1;
    2837             :                                 }
    2838             :                         }
    2839             :                 }
    2840             :         }
    2841           0 :         return 0;
    2842             : }
    2843             : 
    2844             : static PyGetSetDef py_netr_LMSessionKey_getsetters[] = {
    2845             :         {
    2846             :                 .name = discard_const_p(char, "key"),
    2847             :                 .get = py_netr_LMSessionKey_get_key,
    2848             :                 .set = py_netr_LMSessionKey_set_key,
    2849             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2850             :         },
    2851             :         { .name = NULL }
    2852             : };
    2853             : 
    2854           0 : static PyObject *py_netr_LMSessionKey_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2855             : {
    2856           0 :         return pytalloc_new(struct netr_LMSessionKey, type);
    2857             : }
    2858             : 
    2859           0 : static PyObject *py_netr_LMSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2860             : {
    2861           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2862           0 :         PyObject *ret = NULL;
    2863           0 :         DATA_BLOB blob;
    2864           0 :         enum ndr_err_code err;
    2865           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2866           0 :         if (tmp_ctx == NULL) {
    2867           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2868           0 :                 return NULL;
    2869             :         }
    2870           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_LMSessionKey);
    2871           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2872           0 :                 TALLOC_FREE(tmp_ctx);
    2873           0 :                 PyErr_SetNdrError(err);
    2874           0 :                 return NULL;
    2875             :         }
    2876             : 
    2877           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2878           0 :         TALLOC_FREE(tmp_ctx);
    2879           0 :         return ret;
    2880             : }
    2881             : 
    2882           0 : static PyObject *py_netr_LMSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2883             : {
    2884           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2885           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2886           0 :         Py_ssize_t blob_length = 0;
    2887           0 :         enum ndr_err_code err;
    2888           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2889           0 :         PyObject *allow_remaining_obj = NULL;
    2890           0 :         bool allow_remaining = false;
    2891             : 
    2892           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2893             :                 discard_const_p(char *, kwnames),
    2894             :                 &blob.data, &blob_length,
    2895             :                 &allow_remaining_obj)) {
    2896           0 :                 return NULL;
    2897             :         }
    2898           0 :         blob.length = blob_length;
    2899             : 
    2900           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2901           0 :                 allow_remaining = true;
    2902             :         }
    2903             : 
    2904           0 :         if (allow_remaining) {
    2905           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_LMSessionKey);
    2906             :         } else {
    2907           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_LMSessionKey);
    2908             :         }
    2909           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2910           0 :                 PyErr_SetNdrError(err);
    2911           0 :                 return NULL;
    2912             :         }
    2913             : 
    2914           0 :         Py_RETURN_NONE;
    2915             : }
    2916             : 
    2917           0 : static PyObject *py_netr_LMSessionKey_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2918             : {
    2919           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2920           0 :         PyObject *ret;
    2921           0 :         char *retstr;
    2922             : 
    2923           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_LMSessionKey, "netr_LMSessionKey", object);
    2924           0 :         ret = PyUnicode_FromString(retstr);
    2925           0 :         talloc_free(retstr);
    2926             : 
    2927           0 :         return ret;
    2928             : }
    2929             : 
    2930             : static PyMethodDef py_netr_LMSessionKey_methods[] = {
    2931             :         { "__ndr_pack__", (PyCFunction)py_netr_LMSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2932             :         { "__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" },
    2933             :         { "__ndr_print__", (PyCFunction)py_netr_LMSessionKey_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2934             :         { NULL, NULL, 0, NULL }
    2935             : };
    2936             : 
    2937             : 
    2938             : static PyTypeObject netr_LMSessionKey_Type = {
    2939             :         PyVarObject_HEAD_INIT(NULL, 0)
    2940             :         .tp_name = "netlogon.netr_LMSessionKey",
    2941             :         .tp_getset = py_netr_LMSessionKey_getsetters,
    2942             :         .tp_methods = py_netr_LMSessionKey_methods,
    2943             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2944             :         .tp_new = py_netr_LMSessionKey_new,
    2945             : };
    2946             : 
    2947             : 
    2948           0 : static PyObject *py_netr_SamBaseInfo_get_logon_time(PyObject *obj, void *closure)
    2949             : {
    2950           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    2951           0 :         PyObject *py_logon_time;
    2952           0 :         py_logon_time = PyLong_FromUnsignedLongLong(object->logon_time);
    2953           0 :         return py_logon_time;
    2954             : }
    2955             : 
    2956           0 : static int py_netr_SamBaseInfo_set_logon_time(PyObject *py_obj, PyObject *value, void *closure)
    2957             : {
    2958           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    2959           0 :         if (value == NULL) {
    2960           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_time");
    2961           0 :                 return -1;
    2962             :         }
    2963             :         {
    2964           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_time));
    2965           0 :                 if (PyLong_Check(value)) {
    2966           0 :                         unsigned long long test_var;
    2967           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2968           0 :                         if (PyErr_Occurred() != NULL) {
    2969           0 :                                 return -1;
    2970             :                         }
    2971           0 :                         if (test_var > uint_max) {
    2972           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2973             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2974           0 :                                 return -1;
    2975             :                         }
    2976           0 :                         object->logon_time = test_var;
    2977             :                 } else {
    2978           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2979             :                           PyLong_Type.tp_name);
    2980           0 :                         return -1;
    2981             :                 }
    2982             :         }
    2983           0 :         return 0;
    2984             : }
    2985             : 
    2986           0 : static PyObject *py_netr_SamBaseInfo_get_logoff_time(PyObject *obj, void *closure)
    2987             : {
    2988           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    2989           0 :         PyObject *py_logoff_time;
    2990           0 :         py_logoff_time = PyLong_FromUnsignedLongLong(object->logoff_time);
    2991           0 :         return py_logoff_time;
    2992             : }
    2993             : 
    2994           0 : static int py_netr_SamBaseInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
    2995             : {
    2996           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    2997           0 :         if (value == NULL) {
    2998           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logoff_time");
    2999           0 :                 return -1;
    3000             :         }
    3001             :         {
    3002           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logoff_time));
    3003           0 :                 if (PyLong_Check(value)) {
    3004           0 :                         unsigned long long test_var;
    3005           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3006           0 :                         if (PyErr_Occurred() != NULL) {
    3007           0 :                                 return -1;
    3008             :                         }
    3009           0 :                         if (test_var > uint_max) {
    3010           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3011             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3012           0 :                                 return -1;
    3013             :                         }
    3014           0 :                         object->logoff_time = test_var;
    3015             :                 } else {
    3016           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3017             :                           PyLong_Type.tp_name);
    3018           0 :                         return -1;
    3019             :                 }
    3020             :         }
    3021           0 :         return 0;
    3022             : }
    3023             : 
    3024           0 : static PyObject *py_netr_SamBaseInfo_get_kickoff_time(PyObject *obj, void *closure)
    3025             : {
    3026           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3027           0 :         PyObject *py_kickoff_time;
    3028           0 :         py_kickoff_time = PyLong_FromUnsignedLongLong(object->kickoff_time);
    3029           0 :         return py_kickoff_time;
    3030             : }
    3031             : 
    3032           0 : static int py_netr_SamBaseInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
    3033             : {
    3034           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3035           0 :         if (value == NULL) {
    3036           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->kickoff_time");
    3037           0 :                 return -1;
    3038             :         }
    3039             :         {
    3040           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->kickoff_time));
    3041           0 :                 if (PyLong_Check(value)) {
    3042           0 :                         unsigned long long test_var;
    3043           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3044           0 :                         if (PyErr_Occurred() != NULL) {
    3045           0 :                                 return -1;
    3046             :                         }
    3047           0 :                         if (test_var > uint_max) {
    3048           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3049             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3050           0 :                                 return -1;
    3051             :                         }
    3052           0 :                         object->kickoff_time = test_var;
    3053             :                 } else {
    3054           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3055             :                           PyLong_Type.tp_name);
    3056           0 :                         return -1;
    3057             :                 }
    3058             :         }
    3059           0 :         return 0;
    3060             : }
    3061             : 
    3062           0 : static PyObject *py_netr_SamBaseInfo_get_last_password_change(PyObject *obj, void *closure)
    3063             : {
    3064           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3065           0 :         PyObject *py_last_password_change;
    3066           0 :         py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
    3067           0 :         return py_last_password_change;
    3068             : }
    3069             : 
    3070           0 : static int py_netr_SamBaseInfo_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3071             : {
    3072           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3073           0 :         if (value == NULL) {
    3074           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_password_change");
    3075           0 :                 return -1;
    3076             :         }
    3077             :         {
    3078           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
    3079           0 :                 if (PyLong_Check(value)) {
    3080           0 :                         unsigned long long test_var;
    3081           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3082           0 :                         if (PyErr_Occurred() != NULL) {
    3083           0 :                                 return -1;
    3084             :                         }
    3085           0 :                         if (test_var > uint_max) {
    3086           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3087             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3088           0 :                                 return -1;
    3089             :                         }
    3090           0 :                         object->last_password_change = test_var;
    3091             :                 } else {
    3092           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3093             :                           PyLong_Type.tp_name);
    3094           0 :                         return -1;
    3095             :                 }
    3096             :         }
    3097           0 :         return 0;
    3098             : }
    3099             : 
    3100           0 : static PyObject *py_netr_SamBaseInfo_get_allow_password_change(PyObject *obj, void *closure)
    3101             : {
    3102           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3103           0 :         PyObject *py_allow_password_change;
    3104           0 :         py_allow_password_change = PyLong_FromUnsignedLongLong(object->allow_password_change);
    3105           0 :         return py_allow_password_change;
    3106             : }
    3107             : 
    3108           0 : static int py_netr_SamBaseInfo_set_allow_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3109             : {
    3110           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3111           0 :         if (value == NULL) {
    3112           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->allow_password_change");
    3113           0 :                 return -1;
    3114             :         }
    3115             :         {
    3116           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->allow_password_change));
    3117           0 :                 if (PyLong_Check(value)) {
    3118           0 :                         unsigned long long test_var;
    3119           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3120           0 :                         if (PyErr_Occurred() != NULL) {
    3121           0 :                                 return -1;
    3122             :                         }
    3123           0 :                         if (test_var > uint_max) {
    3124           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3125             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3126           0 :                                 return -1;
    3127             :                         }
    3128           0 :                         object->allow_password_change = test_var;
    3129             :                 } else {
    3130           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3131             :                           PyLong_Type.tp_name);
    3132           0 :                         return -1;
    3133             :                 }
    3134             :         }
    3135           0 :         return 0;
    3136             : }
    3137             : 
    3138           0 : static PyObject *py_netr_SamBaseInfo_get_force_password_change(PyObject *obj, void *closure)
    3139             : {
    3140           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3141           0 :         PyObject *py_force_password_change;
    3142           0 :         py_force_password_change = PyLong_FromUnsignedLongLong(object->force_password_change);
    3143           0 :         return py_force_password_change;
    3144             : }
    3145             : 
    3146           0 : static int py_netr_SamBaseInfo_set_force_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3147             : {
    3148           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3149           0 :         if (value == NULL) {
    3150           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->force_password_change");
    3151           0 :                 return -1;
    3152             :         }
    3153             :         {
    3154           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->force_password_change));
    3155           0 :                 if (PyLong_Check(value)) {
    3156           0 :                         unsigned long long test_var;
    3157           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3158           0 :                         if (PyErr_Occurred() != NULL) {
    3159           0 :                                 return -1;
    3160             :                         }
    3161           0 :                         if (test_var > uint_max) {
    3162           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3163             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3164           0 :                                 return -1;
    3165             :                         }
    3166           0 :                         object->force_password_change = test_var;
    3167             :                 } else {
    3168           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3169             :                           PyLong_Type.tp_name);
    3170           0 :                         return -1;
    3171             :                 }
    3172             :         }
    3173           0 :         return 0;
    3174             : }
    3175             : 
    3176         697 : static PyObject *py_netr_SamBaseInfo_get_account_name(PyObject *obj, void *closure)
    3177             : {
    3178         697 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3179           2 :         PyObject *py_account_name;
    3180         697 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    3181         697 :         return py_account_name;
    3182             : }
    3183             : 
    3184           0 : static int py_netr_SamBaseInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    3185             : {
    3186           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3187           0 :         if (value == NULL) {
    3188           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    3189           0 :                 return -1;
    3190             :         }
    3191           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3192           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3193           0 :                 PyErr_NoMemory();
    3194           0 :                 return -1;
    3195             :         }
    3196           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    3197           0 :         return 0;
    3198             : }
    3199             : 
    3200           0 : static PyObject *py_netr_SamBaseInfo_get_full_name(PyObject *obj, void *closure)
    3201             : {
    3202           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3203           0 :         PyObject *py_full_name;
    3204           0 :         py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
    3205           0 :         return py_full_name;
    3206             : }
    3207             : 
    3208           0 : static int py_netr_SamBaseInfo_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
    3209             : {
    3210           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3211           0 :         if (value == NULL) {
    3212           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->full_name");
    3213           0 :                 return -1;
    3214             :         }
    3215           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3216           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3217           0 :                 PyErr_NoMemory();
    3218           0 :                 return -1;
    3219             :         }
    3220           0 :         object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    3221           0 :         return 0;
    3222             : }
    3223             : 
    3224           0 : static PyObject *py_netr_SamBaseInfo_get_logon_script(PyObject *obj, void *closure)
    3225             : {
    3226           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3227           0 :         PyObject *py_logon_script;
    3228           0 :         py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
    3229           0 :         return py_logon_script;
    3230             : }
    3231             : 
    3232           0 : static int py_netr_SamBaseInfo_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
    3233             : {
    3234           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3235           0 :         if (value == NULL) {
    3236           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_script");
    3237           0 :                 return -1;
    3238             :         }
    3239           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3240           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3241           0 :                 PyErr_NoMemory();
    3242           0 :                 return -1;
    3243             :         }
    3244           0 :         object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
    3245           0 :         return 0;
    3246             : }
    3247             : 
    3248           0 : static PyObject *py_netr_SamBaseInfo_get_profile_path(PyObject *obj, void *closure)
    3249             : {
    3250           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3251           0 :         PyObject *py_profile_path;
    3252           0 :         py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
    3253           0 :         return py_profile_path;
    3254             : }
    3255             : 
    3256           0 : static int py_netr_SamBaseInfo_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
    3257             : {
    3258           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3259           0 :         if (value == NULL) {
    3260           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->profile_path");
    3261           0 :                 return -1;
    3262             :         }
    3263           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3264           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3265           0 :                 PyErr_NoMemory();
    3266           0 :                 return -1;
    3267             :         }
    3268           0 :         object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
    3269           0 :         return 0;
    3270             : }
    3271             : 
    3272           0 : static PyObject *py_netr_SamBaseInfo_get_home_directory(PyObject *obj, void *closure)
    3273             : {
    3274           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3275           0 :         PyObject *py_home_directory;
    3276           0 :         py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
    3277           0 :         return py_home_directory;
    3278             : }
    3279             : 
    3280           0 : static int py_netr_SamBaseInfo_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
    3281             : {
    3282           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3283           0 :         if (value == NULL) {
    3284           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_directory");
    3285           0 :                 return -1;
    3286             :         }
    3287           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3288           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3289           0 :                 PyErr_NoMemory();
    3290           0 :                 return -1;
    3291             :         }
    3292           0 :         object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
    3293           0 :         return 0;
    3294             : }
    3295             : 
    3296           0 : static PyObject *py_netr_SamBaseInfo_get_home_drive(PyObject *obj, void *closure)
    3297             : {
    3298           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3299           0 :         PyObject *py_home_drive;
    3300           0 :         py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
    3301           0 :         return py_home_drive;
    3302             : }
    3303             : 
    3304           0 : static int py_netr_SamBaseInfo_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
    3305             : {
    3306           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3307           0 :         if (value == NULL) {
    3308           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_drive");
    3309           0 :                 return -1;
    3310             :         }
    3311           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3312           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3313           0 :                 PyErr_NoMemory();
    3314           0 :                 return -1;
    3315             :         }
    3316           0 :         object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
    3317           0 :         return 0;
    3318             : }
    3319             : 
    3320           0 : static PyObject *py_netr_SamBaseInfo_get_logon_count(PyObject *obj, void *closure)
    3321             : {
    3322           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3323           0 :         PyObject *py_logon_count;
    3324           0 :         py_logon_count = PyLong_FromLong((uint16_t)object->logon_count);
    3325           0 :         return py_logon_count;
    3326             : }
    3327             : 
    3328           0 : static int py_netr_SamBaseInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    3329             : {
    3330           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3331           0 :         if (value == NULL) {
    3332           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
    3333           0 :                 return -1;
    3334             :         }
    3335             :         {
    3336           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    3337           0 :                 if (PyLong_Check(value)) {
    3338           0 :                         unsigned long long test_var;
    3339           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3340           0 :                         if (PyErr_Occurred() != NULL) {
    3341           0 :                                 return -1;
    3342             :                         }
    3343           0 :                         if (test_var > uint_max) {
    3344           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3345             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3346           0 :                                 return -1;
    3347             :                         }
    3348           0 :                         object->logon_count = test_var;
    3349             :                 } else {
    3350           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3351             :                           PyLong_Type.tp_name);
    3352           0 :                         return -1;
    3353             :                 }
    3354             :         }
    3355           0 :         return 0;
    3356             : }
    3357             : 
    3358           0 : static PyObject *py_netr_SamBaseInfo_get_bad_password_count(PyObject *obj, void *closure)
    3359             : {
    3360           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3361           0 :         PyObject *py_bad_password_count;
    3362           0 :         py_bad_password_count = PyLong_FromLong((uint16_t)object->bad_password_count);
    3363           0 :         return py_bad_password_count;
    3364             : }
    3365             : 
    3366           0 : static int py_netr_SamBaseInfo_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
    3367             : {
    3368           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3369           0 :         if (value == NULL) {
    3370           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_password_count");
    3371           0 :                 return -1;
    3372             :         }
    3373             :         {
    3374           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
    3375           0 :                 if (PyLong_Check(value)) {
    3376           0 :                         unsigned long long test_var;
    3377           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3378           0 :                         if (PyErr_Occurred() != NULL) {
    3379           0 :                                 return -1;
    3380             :                         }
    3381           0 :                         if (test_var > uint_max) {
    3382           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3383             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3384           0 :                                 return -1;
    3385             :                         }
    3386           0 :                         object->bad_password_count = test_var;
    3387             :                 } else {
    3388           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3389             :                           PyLong_Type.tp_name);
    3390           0 :                         return -1;
    3391             :                 }
    3392             :         }
    3393           0 :         return 0;
    3394             : }
    3395             : 
    3396         537 : static PyObject *py_netr_SamBaseInfo_get_rid(PyObject *obj, void *closure)
    3397             : {
    3398         537 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3399           0 :         PyObject *py_rid;
    3400         537 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
    3401         537 :         return py_rid;
    3402             : }
    3403             : 
    3404         210 : static int py_netr_SamBaseInfo_set_rid(PyObject *py_obj, PyObject *value, void *closure)
    3405             : {
    3406         210 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3407         210 :         if (value == NULL) {
    3408           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
    3409           0 :                 return -1;
    3410             :         }
    3411             :         {
    3412         210 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
    3413         210 :                 if (PyLong_Check(value)) {
    3414           0 :                         unsigned long long test_var;
    3415         210 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3416         210 :                         if (PyErr_Occurred() != NULL) {
    3417           0 :                                 return -1;
    3418             :                         }
    3419         210 :                         if (test_var > uint_max) {
    3420           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3421             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3422           0 :                                 return -1;
    3423             :                         }
    3424         210 :                         object->rid = test_var;
    3425             :                 } else {
    3426           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3427             :                           PyLong_Type.tp_name);
    3428           0 :                         return -1;
    3429             :                 }
    3430             :         }
    3431         210 :         return 0;
    3432             : }
    3433             : 
    3434         330 : static PyObject *py_netr_SamBaseInfo_get_primary_gid(PyObject *obj, void *closure)
    3435             : {
    3436         330 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3437           0 :         PyObject *py_primary_gid;
    3438         330 :         py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)object->primary_gid);
    3439         330 :         return py_primary_gid;
    3440             : }
    3441             : 
    3442         443 : static int py_netr_SamBaseInfo_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
    3443             : {
    3444         443 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3445         443 :         if (value == NULL) {
    3446           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_gid");
    3447           0 :                 return -1;
    3448             :         }
    3449             :         {
    3450         443 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
    3451         443 :                 if (PyLong_Check(value)) {
    3452           0 :                         unsigned long long test_var;
    3453         443 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3454         443 :                         if (PyErr_Occurred() != NULL) {
    3455           0 :                                 return -1;
    3456             :                         }
    3457         443 :                         if (test_var > uint_max) {
    3458           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3459             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3460           0 :                                 return -1;
    3461             :                         }
    3462         443 :                         object->primary_gid = test_var;
    3463             :                 } else {
    3464           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3465             :                           PyLong_Type.tp_name);
    3466           0 :                         return -1;
    3467             :                 }
    3468             :         }
    3469         443 :         return 0;
    3470             : }
    3471             : 
    3472        1982 : static PyObject *py_netr_SamBaseInfo_get_groups(PyObject *obj, void *closure)
    3473             : {
    3474        1982 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3475           0 :         PyObject *py_groups;
    3476        1982 :         py_groups = pytalloc_reference_ex(samr_RidWithAttributeArray_Type, pytalloc_get_mem_ctx(obj), &object->groups);
    3477        1982 :         return py_groups;
    3478             : }
    3479             : 
    3480           0 : static int py_netr_SamBaseInfo_set_groups(PyObject *py_obj, PyObject *value, void *closure)
    3481             : {
    3482           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3483           0 :         if (value == NULL) {
    3484           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->groups");
    3485           0 :                 return -1;
    3486             :         }
    3487           0 :         PY_CHECK_TYPE(samr_RidWithAttributeArray_Type, value, return -1;);
    3488           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3489           0 :                 PyErr_NoMemory();
    3490           0 :                 return -1;
    3491             :         }
    3492           0 :         object->groups = *(struct samr_RidWithAttributeArray *)pytalloc_get_ptr(value);
    3493           0 :         return 0;
    3494             : }
    3495             : 
    3496        2656 : static PyObject *py_netr_SamBaseInfo_get_user_flags(PyObject *obj, void *closure)
    3497             : {
    3498        2656 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3499           0 :         PyObject *py_user_flags;
    3500        2656 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
    3501        2656 :         return py_user_flags;
    3502             : }
    3503             : 
    3504        1996 : static int py_netr_SamBaseInfo_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    3505             : {
    3506        1996 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3507        1996 :         if (value == NULL) {
    3508           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_flags");
    3509           0 :                 return -1;
    3510             :         }
    3511             :         {
    3512        1996 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    3513        1996 :                 if (PyLong_Check(value)) {
    3514           0 :                         unsigned long long test_var;
    3515        1996 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3516        1996 :                         if (PyErr_Occurred() != NULL) {
    3517           0 :                                 return -1;
    3518             :                         }
    3519        1996 :                         if (test_var > uint_max) {
    3520           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3521             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3522           0 :                                 return -1;
    3523             :                         }
    3524        1996 :                         object->user_flags = test_var;
    3525             :                 } else {
    3526           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3527             :                           PyLong_Type.tp_name);
    3528           0 :                         return -1;
    3529             :                 }
    3530             :         }
    3531        1996 :         return 0;
    3532             : }
    3533             : 
    3534           0 : static PyObject *py_netr_SamBaseInfo_get_key(PyObject *obj, void *closure)
    3535             : {
    3536           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3537           0 :         PyObject *py_key;
    3538           0 :         py_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->key);
    3539           0 :         return py_key;
    3540             : }
    3541             : 
    3542           0 : static int py_netr_SamBaseInfo_set_key(PyObject *py_obj, PyObject *value, void *closure)
    3543             : {
    3544           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3545           0 :         if (value == NULL) {
    3546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key");
    3547           0 :                 return -1;
    3548             :         }
    3549           0 :         PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
    3550           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3551           0 :                 PyErr_NoMemory();
    3552           0 :                 return -1;
    3553             :         }
    3554           0 :         object->key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
    3555           0 :         return 0;
    3556             : }
    3557             : 
    3558           0 : static PyObject *py_netr_SamBaseInfo_get_logon_server(PyObject *obj, void *closure)
    3559             : {
    3560           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3561           0 :         PyObject *py_logon_server;
    3562           0 :         py_logon_server = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
    3563           0 :         return py_logon_server;
    3564             : }
    3565             : 
    3566           0 : static int py_netr_SamBaseInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
    3567             : {
    3568           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3569           0 :         if (value == NULL) {
    3570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_server");
    3571           0 :                 return -1;
    3572             :         }
    3573           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
    3574           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3575           0 :                 PyErr_NoMemory();
    3576           0 :                 return -1;
    3577             :         }
    3578           0 :         object->logon_server = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
    3579           0 :         return 0;
    3580             : }
    3581             : 
    3582           0 : static PyObject *py_netr_SamBaseInfo_get_logon_domain(PyObject *obj, void *closure)
    3583             : {
    3584           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3585           0 :         PyObject *py_logon_domain;
    3586           0 :         py_logon_domain = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
    3587           0 :         return py_logon_domain;
    3588             : }
    3589             : 
    3590           0 : static int py_netr_SamBaseInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
    3591             : {
    3592           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3593           0 :         if (value == NULL) {
    3594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_domain");
    3595           0 :                 return -1;
    3596             :         }
    3597           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
    3598           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3599           0 :                 PyErr_NoMemory();
    3600           0 :                 return -1;
    3601             :         }
    3602           0 :         object->logon_domain = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
    3603           0 :         return 0;
    3604             : }
    3605             : 
    3606        8017 : static PyObject *py_netr_SamBaseInfo_get_domain_sid(PyObject *obj, void *closure)
    3607             : {
    3608        8017 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3609           0 :         PyObject *py_domain_sid;
    3610        8017 :         if (object->domain_sid == NULL) {
    3611           0 :                 Py_RETURN_NONE;
    3612             :         }
    3613        8017 :         if (object->domain_sid == NULL) {
    3614           0 :                 py_domain_sid = Py_None;
    3615           0 :                 Py_INCREF(py_domain_sid);
    3616             :         } else {
    3617        8017 :                 py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->domain_sid, object->domain_sid);
    3618             :         }
    3619        8017 :         return py_domain_sid;
    3620             : }
    3621             : 
    3622         499 : static int py_netr_SamBaseInfo_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
    3623             : {
    3624         499 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3625         499 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain_sid));
    3626         499 :         if (value == NULL) {
    3627           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_sid");
    3628           0 :                 return -1;
    3629             :         }
    3630         499 :         if (value == Py_None) {
    3631           0 :                 object->domain_sid = NULL;
    3632             :         } else {
    3633         499 :                 object->domain_sid = NULL;
    3634         499 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    3635         499 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3636           0 :                         PyErr_NoMemory();
    3637           0 :                         return -1;
    3638             :                 }
    3639         499 :                 object->domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
    3640             :         }
    3641         499 :         return 0;
    3642             : }
    3643             : 
    3644           0 : static PyObject *py_netr_SamBaseInfo_get_LMSessKey(PyObject *obj, void *closure)
    3645             : {
    3646           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3647           0 :         PyObject *py_LMSessKey;
    3648           0 :         py_LMSessKey = pytalloc_reference_ex(&netr_LMSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->LMSessKey);
    3649           0 :         return py_LMSessKey;
    3650             : }
    3651             : 
    3652           0 : static int py_netr_SamBaseInfo_set_LMSessKey(PyObject *py_obj, PyObject *value, void *closure)
    3653             : {
    3654           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3655           0 :         if (value == NULL) {
    3656           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->LMSessKey");
    3657           0 :                 return -1;
    3658             :         }
    3659           0 :         PY_CHECK_TYPE(&netr_LMSessionKey_Type, value, return -1;);
    3660           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3661           0 :                 PyErr_NoMemory();
    3662           0 :                 return -1;
    3663             :         }
    3664           0 :         object->LMSessKey = *(struct netr_LMSessionKey *)pytalloc_get_ptr(value);
    3665           0 :         return 0;
    3666             : }
    3667             : 
    3668           0 : static PyObject *py_netr_SamBaseInfo_get_acct_flags(PyObject *obj, void *closure)
    3669             : {
    3670           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3671           0 :         PyObject *py_acct_flags;
    3672           0 :         py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)object->acct_flags);
    3673           0 :         return py_acct_flags;
    3674             : }
    3675             : 
    3676           0 : static int py_netr_SamBaseInfo_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
    3677             : {
    3678           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3679           0 :         if (value == NULL) {
    3680           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_flags");
    3681           0 :                 return -1;
    3682             :         }
    3683             :         {
    3684           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
    3685           0 :                 if (PyLong_Check(value)) {
    3686           0 :                         unsigned long long test_var;
    3687           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3688           0 :                         if (PyErr_Occurred() != NULL) {
    3689           0 :                                 return -1;
    3690             :                         }
    3691           0 :                         if (test_var > uint_max) {
    3692           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3693             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3694           0 :                                 return -1;
    3695             :                         }
    3696           0 :                         object->acct_flags = test_var;
    3697             :                 } else {
    3698           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3699             :                           PyLong_Type.tp_name);
    3700           0 :                         return -1;
    3701             :                 }
    3702             :         }
    3703           0 :         return 0;
    3704             : }
    3705             : 
    3706           0 : static PyObject *py_netr_SamBaseInfo_get_sub_auth_status(PyObject *obj, void *closure)
    3707             : {
    3708           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3709           0 :         PyObject *py_sub_auth_status;
    3710           0 :         py_sub_auth_status = PyLong_FromUnsignedLongLong((uint32_t)object->sub_auth_status);
    3711           0 :         return py_sub_auth_status;
    3712             : }
    3713             : 
    3714           0 : static int py_netr_SamBaseInfo_set_sub_auth_status(PyObject *py_obj, PyObject *value, void *closure)
    3715             : {
    3716           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3717           0 :         if (value == NULL) {
    3718           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sub_auth_status");
    3719           0 :                 return -1;
    3720             :         }
    3721             :         {
    3722           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sub_auth_status));
    3723           0 :                 if (PyLong_Check(value)) {
    3724           0 :                         unsigned long long test_var;
    3725           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3726           0 :                         if (PyErr_Occurred() != NULL) {
    3727           0 :                                 return -1;
    3728             :                         }
    3729           0 :                         if (test_var > uint_max) {
    3730           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3731             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3732           0 :                                 return -1;
    3733             :                         }
    3734           0 :                         object->sub_auth_status = test_var;
    3735             :                 } else {
    3736           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3737             :                           PyLong_Type.tp_name);
    3738           0 :                         return -1;
    3739             :                 }
    3740             :         }
    3741           0 :         return 0;
    3742             : }
    3743             : 
    3744           0 : static PyObject *py_netr_SamBaseInfo_get_last_successful_logon(PyObject *obj, void *closure)
    3745             : {
    3746           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3747           0 :         PyObject *py_last_successful_logon;
    3748           0 :         py_last_successful_logon = PyLong_FromUnsignedLongLong(object->last_successful_logon);
    3749           0 :         return py_last_successful_logon;
    3750             : }
    3751             : 
    3752           0 : static int py_netr_SamBaseInfo_set_last_successful_logon(PyObject *py_obj, PyObject *value, void *closure)
    3753             : {
    3754           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3755           0 :         if (value == NULL) {
    3756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_successful_logon");
    3757           0 :                 return -1;
    3758             :         }
    3759             :         {
    3760           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_successful_logon));
    3761           0 :                 if (PyLong_Check(value)) {
    3762           0 :                         unsigned long long test_var;
    3763           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3764           0 :                         if (PyErr_Occurred() != NULL) {
    3765           0 :                                 return -1;
    3766             :                         }
    3767           0 :                         if (test_var > uint_max) {
    3768           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3769             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3770           0 :                                 return -1;
    3771             :                         }
    3772           0 :                         object->last_successful_logon = test_var;
    3773             :                 } else {
    3774           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3775             :                           PyLong_Type.tp_name);
    3776           0 :                         return -1;
    3777             :                 }
    3778             :         }
    3779           0 :         return 0;
    3780             : }
    3781             : 
    3782           0 : static PyObject *py_netr_SamBaseInfo_get_last_failed_logon(PyObject *obj, void *closure)
    3783             : {
    3784           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3785           0 :         PyObject *py_last_failed_logon;
    3786           0 :         py_last_failed_logon = PyLong_FromUnsignedLongLong(object->last_failed_logon);
    3787           0 :         return py_last_failed_logon;
    3788             : }
    3789             : 
    3790           0 : static int py_netr_SamBaseInfo_set_last_failed_logon(PyObject *py_obj, PyObject *value, void *closure)
    3791             : {
    3792           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3793           0 :         if (value == NULL) {
    3794           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_failed_logon");
    3795           0 :                 return -1;
    3796             :         }
    3797             :         {
    3798           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_failed_logon));
    3799           0 :                 if (PyLong_Check(value)) {
    3800           0 :                         unsigned long long test_var;
    3801           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3802           0 :                         if (PyErr_Occurred() != NULL) {
    3803           0 :                                 return -1;
    3804             :                         }
    3805           0 :                         if (test_var > uint_max) {
    3806           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3807             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3808           0 :                                 return -1;
    3809             :                         }
    3810           0 :                         object->last_failed_logon = test_var;
    3811             :                 } else {
    3812           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3813             :                           PyLong_Type.tp_name);
    3814           0 :                         return -1;
    3815             :                 }
    3816             :         }
    3817           0 :         return 0;
    3818             : }
    3819             : 
    3820           0 : static PyObject *py_netr_SamBaseInfo_get_failed_logon_count(PyObject *obj, void *closure)
    3821             : {
    3822           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3823           0 :         PyObject *py_failed_logon_count;
    3824           0 :         py_failed_logon_count = PyLong_FromUnsignedLongLong((uint32_t)object->failed_logon_count);
    3825           0 :         return py_failed_logon_count;
    3826             : }
    3827             : 
    3828           0 : static int py_netr_SamBaseInfo_set_failed_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    3829             : {
    3830           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3831           0 :         if (value == NULL) {
    3832           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->failed_logon_count");
    3833           0 :                 return -1;
    3834             :         }
    3835             :         {
    3836           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->failed_logon_count));
    3837           0 :                 if (PyLong_Check(value)) {
    3838           0 :                         unsigned long long test_var;
    3839           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3840           0 :                         if (PyErr_Occurred() != NULL) {
    3841           0 :                                 return -1;
    3842             :                         }
    3843           0 :                         if (test_var > uint_max) {
    3844           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3845             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3846           0 :                                 return -1;
    3847             :                         }
    3848           0 :                         object->failed_logon_count = test_var;
    3849             :                 } else {
    3850           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3851             :                           PyLong_Type.tp_name);
    3852           0 :                         return -1;
    3853             :                 }
    3854             :         }
    3855           0 :         return 0;
    3856             : }
    3857             : 
    3858           0 : static PyObject *py_netr_SamBaseInfo_get_reserved(PyObject *obj, void *closure)
    3859             : {
    3860           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3861           0 :         PyObject *py_reserved;
    3862           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
    3863           0 :         return py_reserved;
    3864             : }
    3865             : 
    3866           0 : static int py_netr_SamBaseInfo_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    3867             : {
    3868           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3869           0 :         if (value == NULL) {
    3870           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    3871           0 :                 return -1;
    3872             :         }
    3873             :         {
    3874           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    3875           0 :                 if (PyLong_Check(value)) {
    3876           0 :                         unsigned long long test_var;
    3877           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3878           0 :                         if (PyErr_Occurred() != NULL) {
    3879           0 :                                 return -1;
    3880             :                         }
    3881           0 :                         if (test_var > uint_max) {
    3882           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3883             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3884           0 :                                 return -1;
    3885             :                         }
    3886           0 :                         object->reserved = test_var;
    3887             :                 } else {
    3888           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3889             :                           PyLong_Type.tp_name);
    3890           0 :                         return -1;
    3891             :                 }
    3892             :         }
    3893           0 :         return 0;
    3894             : }
    3895             : 
    3896             : static PyGetSetDef py_netr_SamBaseInfo_getsetters[] = {
    3897             :         {
    3898             :                 .name = discard_const_p(char, "logon_time"),
    3899             :                 .get = py_netr_SamBaseInfo_get_logon_time,
    3900             :                 .set = py_netr_SamBaseInfo_set_logon_time,
    3901             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3902             :         },
    3903             :         {
    3904             :                 .name = discard_const_p(char, "logoff_time"),
    3905             :                 .get = py_netr_SamBaseInfo_get_logoff_time,
    3906             :                 .set = py_netr_SamBaseInfo_set_logoff_time,
    3907             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3908             :         },
    3909             :         {
    3910             :                 .name = discard_const_p(char, "kickoff_time"),
    3911             :                 .get = py_netr_SamBaseInfo_get_kickoff_time,
    3912             :                 .set = py_netr_SamBaseInfo_set_kickoff_time,
    3913             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3914             :         },
    3915             :         {
    3916             :                 .name = discard_const_p(char, "last_password_change"),
    3917             :                 .get = py_netr_SamBaseInfo_get_last_password_change,
    3918             :                 .set = py_netr_SamBaseInfo_set_last_password_change,
    3919             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3920             :         },
    3921             :         {
    3922             :                 .name = discard_const_p(char, "allow_password_change"),
    3923             :                 .get = py_netr_SamBaseInfo_get_allow_password_change,
    3924             :                 .set = py_netr_SamBaseInfo_set_allow_password_change,
    3925             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3926             :         },
    3927             :         {
    3928             :                 .name = discard_const_p(char, "force_password_change"),
    3929             :                 .get = py_netr_SamBaseInfo_get_force_password_change,
    3930             :                 .set = py_netr_SamBaseInfo_set_force_password_change,
    3931             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3932             :         },
    3933             :         {
    3934             :                 .name = discard_const_p(char, "account_name"),
    3935             :                 .get = py_netr_SamBaseInfo_get_account_name,
    3936             :                 .set = py_netr_SamBaseInfo_set_account_name,
    3937             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3938             :         },
    3939             :         {
    3940             :                 .name = discard_const_p(char, "full_name"),
    3941             :                 .get = py_netr_SamBaseInfo_get_full_name,
    3942             :                 .set = py_netr_SamBaseInfo_set_full_name,
    3943             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3944             :         },
    3945             :         {
    3946             :                 .name = discard_const_p(char, "logon_script"),
    3947             :                 .get = py_netr_SamBaseInfo_get_logon_script,
    3948             :                 .set = py_netr_SamBaseInfo_set_logon_script,
    3949             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3950             :         },
    3951             :         {
    3952             :                 .name = discard_const_p(char, "profile_path"),
    3953             :                 .get = py_netr_SamBaseInfo_get_profile_path,
    3954             :                 .set = py_netr_SamBaseInfo_set_profile_path,
    3955             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3956             :         },
    3957             :         {
    3958             :                 .name = discard_const_p(char, "home_directory"),
    3959             :                 .get = py_netr_SamBaseInfo_get_home_directory,
    3960             :                 .set = py_netr_SamBaseInfo_set_home_directory,
    3961             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3962             :         },
    3963             :         {
    3964             :                 .name = discard_const_p(char, "home_drive"),
    3965             :                 .get = py_netr_SamBaseInfo_get_home_drive,
    3966             :                 .set = py_netr_SamBaseInfo_set_home_drive,
    3967             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3968             :         },
    3969             :         {
    3970             :                 .name = discard_const_p(char, "logon_count"),
    3971             :                 .get = py_netr_SamBaseInfo_get_logon_count,
    3972             :                 .set = py_netr_SamBaseInfo_set_logon_count,
    3973             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3974             :         },
    3975             :         {
    3976             :                 .name = discard_const_p(char, "bad_password_count"),
    3977             :                 .get = py_netr_SamBaseInfo_get_bad_password_count,
    3978             :                 .set = py_netr_SamBaseInfo_set_bad_password_count,
    3979             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3980             :         },
    3981             :         {
    3982             :                 .name = discard_const_p(char, "rid"),
    3983             :                 .get = py_netr_SamBaseInfo_get_rid,
    3984             :                 .set = py_netr_SamBaseInfo_set_rid,
    3985             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3986             :         },
    3987             :         {
    3988             :                 .name = discard_const_p(char, "primary_gid"),
    3989             :                 .get = py_netr_SamBaseInfo_get_primary_gid,
    3990             :                 .set = py_netr_SamBaseInfo_set_primary_gid,
    3991             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3992             :         },
    3993             :         {
    3994             :                 .name = discard_const_p(char, "groups"),
    3995             :                 .get = py_netr_SamBaseInfo_get_groups,
    3996             :                 .set = py_netr_SamBaseInfo_set_groups,
    3997             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_RidWithAttributeArray")
    3998             :         },
    3999             :         {
    4000             :                 .name = discard_const_p(char, "user_flags"),
    4001             :                 .get = py_netr_SamBaseInfo_get_user_flags,
    4002             :                 .set = py_netr_SamBaseInfo_set_user_flags,
    4003             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserFlags")
    4004             :         },
    4005             :         {
    4006             :                 .name = discard_const_p(char, "key"),
    4007             :                 .get = py_netr_SamBaseInfo_get_key,
    4008             :                 .set = py_netr_SamBaseInfo_set_key,
    4009             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
    4010             :         },
    4011             :         {
    4012             :                 .name = discard_const_p(char, "logon_server"),
    4013             :                 .get = py_netr_SamBaseInfo_get_logon_server,
    4014             :                 .set = py_netr_SamBaseInfo_set_logon_server,
    4015             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
    4016             :         },
    4017             :         {
    4018             :                 .name = discard_const_p(char, "logon_domain"),
    4019             :                 .get = py_netr_SamBaseInfo_get_logon_domain,
    4020             :                 .set = py_netr_SamBaseInfo_set_logon_domain,
    4021             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
    4022             :         },
    4023             :         {
    4024             :                 .name = discard_const_p(char, "domain_sid"),
    4025             :                 .get = py_netr_SamBaseInfo_get_domain_sid,
    4026             :                 .set = py_netr_SamBaseInfo_set_domain_sid,
    4027             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
    4028             :         },
    4029             :         {
    4030             :                 .name = discard_const_p(char, "LMSessKey"),
    4031             :                 .get = py_netr_SamBaseInfo_get_LMSessKey,
    4032             :                 .set = py_netr_SamBaseInfo_set_LMSessKey,
    4033             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LMSessionKey")
    4034             :         },
    4035             :         {
    4036             :                 .name = discard_const_p(char, "acct_flags"),
    4037             :                 .get = py_netr_SamBaseInfo_get_acct_flags,
    4038             :                 .set = py_netr_SamBaseInfo_set_acct_flags,
    4039             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
    4040             :         },
    4041             :         {
    4042             :                 .name = discard_const_p(char, "sub_auth_status"),
    4043             :                 .get = py_netr_SamBaseInfo_get_sub_auth_status,
    4044             :                 .set = py_netr_SamBaseInfo_set_sub_auth_status,
    4045             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4046             :         },
    4047             :         {
    4048             :                 .name = discard_const_p(char, "last_successful_logon"),
    4049             :                 .get = py_netr_SamBaseInfo_get_last_successful_logon,
    4050             :                 .set = py_netr_SamBaseInfo_set_last_successful_logon,
    4051             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    4052             :         },
    4053             :         {
    4054             :                 .name = discard_const_p(char, "last_failed_logon"),
    4055             :                 .get = py_netr_SamBaseInfo_get_last_failed_logon,
    4056             :                 .set = py_netr_SamBaseInfo_set_last_failed_logon,
    4057             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    4058             :         },
    4059             :         {
    4060             :                 .name = discard_const_p(char, "failed_logon_count"),
    4061             :                 .get = py_netr_SamBaseInfo_get_failed_logon_count,
    4062             :                 .set = py_netr_SamBaseInfo_set_failed_logon_count,
    4063             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4064             :         },
    4065             :         {
    4066             :                 .name = discard_const_p(char, "reserved"),
    4067             :                 .get = py_netr_SamBaseInfo_get_reserved,
    4068             :                 .set = py_netr_SamBaseInfo_set_reserved,
    4069             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4070             :         },
    4071             :         { .name = NULL }
    4072             : };
    4073             : 
    4074           0 : static PyObject *py_netr_SamBaseInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4075             : {
    4076           0 :         return pytalloc_new(struct netr_SamBaseInfo, type);
    4077             : }
    4078             : 
    4079             : 
    4080             : static PyTypeObject netr_SamBaseInfo_Type = {
    4081             :         PyVarObject_HEAD_INIT(NULL, 0)
    4082             :         .tp_name = "netlogon.netr_SamBaseInfo",
    4083             :         .tp_getset = py_netr_SamBaseInfo_getsetters,
    4084             :         .tp_methods = NULL,
    4085             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4086             :         .tp_new = py_netr_SamBaseInfo_new,
    4087             : };
    4088             : 
    4089             : 
    4090           2 : static PyObject *py_netr_SamInfo2_get_base(PyObject *obj, void *closure)
    4091             : {
    4092           2 :         struct netr_SamInfo2 *object = (struct netr_SamInfo2 *)pytalloc_get_ptr(obj);
    4093           0 :         PyObject *py_base;
    4094           2 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4095           2 :         return py_base;
    4096             : }
    4097             : 
    4098           0 : static int py_netr_SamInfo2_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4099             : {
    4100           0 :         struct netr_SamInfo2 *object = (struct netr_SamInfo2 *)pytalloc_get_ptr(py_obj);
    4101           0 :         if (value == NULL) {
    4102           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->base");
    4103           0 :                 return -1;
    4104             :         }
    4105           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4106           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4107           0 :                 PyErr_NoMemory();
    4108           0 :                 return -1;
    4109             :         }
    4110           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4111           0 :         return 0;
    4112             : }
    4113             : 
    4114             : static PyGetSetDef py_netr_SamInfo2_getsetters[] = {
    4115             :         {
    4116             :                 .name = discard_const_p(char, "base"),
    4117             :                 .get = py_netr_SamInfo2_get_base,
    4118             :                 .set = py_netr_SamInfo2_set_base,
    4119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4120             :         },
    4121             :         { .name = NULL }
    4122             : };
    4123             : 
    4124           0 : static PyObject *py_netr_SamInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4125             : {
    4126           0 :         return pytalloc_new(struct netr_SamInfo2, type);
    4127             : }
    4128             : 
    4129             : 
    4130             : static PyTypeObject netr_SamInfo2_Type = {
    4131             :         PyVarObject_HEAD_INIT(NULL, 0)
    4132             :         .tp_name = "netlogon.netr_SamInfo2",
    4133             :         .tp_getset = py_netr_SamInfo2_getsetters,
    4134             :         .tp_methods = NULL,
    4135             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4136             :         .tp_new = py_netr_SamInfo2_new,
    4137             : };
    4138             : 
    4139             : 
    4140         811 : static PyObject *py_netr_SidAttr_get_sid(PyObject *obj, void *closure)
    4141             : {
    4142         811 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(obj);
    4143           0 :         PyObject *py_sid;
    4144         811 :         if (object->sid == NULL) {
    4145           0 :                 Py_RETURN_NONE;
    4146             :         }
    4147         811 :         if (object->sid == NULL) {
    4148           0 :                 py_sid = Py_None;
    4149           0 :                 Py_INCREF(py_sid);
    4150             :         } else {
    4151         811 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
    4152             :         }
    4153         811 :         return py_sid;
    4154             : }
    4155             : 
    4156         816 : static int py_netr_SidAttr_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    4157             : {
    4158         816 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4159         816 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
    4160         816 :         if (value == NULL) {
    4161           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
    4162           0 :                 return -1;
    4163             :         }
    4164         816 :         if (value == Py_None) {
    4165           0 :                 object->sid = NULL;
    4166             :         } else {
    4167         816 :                 object->sid = NULL;
    4168         816 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    4169         816 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4170           0 :                         PyErr_NoMemory();
    4171           0 :                         return -1;
    4172             :                 }
    4173         816 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
    4174             :         }
    4175         816 :         return 0;
    4176             : }
    4177             : 
    4178         733 : static PyObject *py_netr_SidAttr_get_attributes(PyObject *obj, void *closure)
    4179             : {
    4180         733 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(obj);
    4181           0 :         PyObject *py_attributes;
    4182         733 :         py_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->attributes);
    4183         733 :         return py_attributes;
    4184             : }
    4185             : 
    4186         816 : static int py_netr_SidAttr_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
    4187             : {
    4188         816 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4189         816 :         if (value == NULL) {
    4190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attributes");
    4191           0 :                 return -1;
    4192             :         }
    4193             :         {
    4194         816 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attributes));
    4195         816 :                 if (PyLong_Check(value)) {
    4196           0 :                         unsigned long long test_var;
    4197         816 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4198         816 :                         if (PyErr_Occurred() != NULL) {
    4199           0 :                                 return -1;
    4200             :                         }
    4201         816 :                         if (test_var > uint_max) {
    4202           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4203             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4204           0 :                                 return -1;
    4205             :                         }
    4206         816 :                         object->attributes = test_var;
    4207             :                 } else {
    4208           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4209             :                           PyLong_Type.tp_name);
    4210           0 :                         return -1;
    4211             :                 }
    4212             :         }
    4213         816 :         return 0;
    4214             : }
    4215             : 
    4216             : static PyGetSetDef py_netr_SidAttr_getsetters[] = {
    4217             :         {
    4218             :                 .name = discard_const_p(char, "sid"),
    4219             :                 .get = py_netr_SidAttr_get_sid,
    4220             :                 .set = py_netr_SidAttr_set_sid,
    4221             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
    4222             :         },
    4223             :         {
    4224             :                 .name = discard_const_p(char, "attributes"),
    4225             :                 .get = py_netr_SidAttr_get_attributes,
    4226             :                 .set = py_netr_SidAttr_set_attributes,
    4227             :                 .doc = discard_const_p(char, "PIDL-generated element of base type security_GroupAttrs")
    4228             :         },
    4229             :         { .name = NULL }
    4230             : };
    4231             : 
    4232         816 : static PyObject *py_netr_SidAttr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4233             : {
    4234         816 :         return pytalloc_new(struct netr_SidAttr, type);
    4235             : }
    4236             : 
    4237           0 : static PyObject *py_netr_SidAttr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4238             : {
    4239           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4240           0 :         PyObject *ret = NULL;
    4241           0 :         DATA_BLOB blob;
    4242           0 :         enum ndr_err_code err;
    4243           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4244           0 :         if (tmp_ctx == NULL) {
    4245           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4246           0 :                 return NULL;
    4247             :         }
    4248           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SidAttr);
    4249           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4250           0 :                 TALLOC_FREE(tmp_ctx);
    4251           0 :                 PyErr_SetNdrError(err);
    4252           0 :                 return NULL;
    4253             :         }
    4254             : 
    4255           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4256           0 :         TALLOC_FREE(tmp_ctx);
    4257           0 :         return ret;
    4258             : }
    4259             : 
    4260           0 : static PyObject *py_netr_SidAttr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4261             : {
    4262           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4263           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4264           0 :         Py_ssize_t blob_length = 0;
    4265           0 :         enum ndr_err_code err;
    4266           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4267           0 :         PyObject *allow_remaining_obj = NULL;
    4268           0 :         bool allow_remaining = false;
    4269             : 
    4270           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4271             :                 discard_const_p(char *, kwnames),
    4272             :                 &blob.data, &blob_length,
    4273             :                 &allow_remaining_obj)) {
    4274           0 :                 return NULL;
    4275             :         }
    4276           0 :         blob.length = blob_length;
    4277             : 
    4278           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4279           0 :                 allow_remaining = true;
    4280             :         }
    4281             : 
    4282           0 :         if (allow_remaining) {
    4283           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SidAttr);
    4284             :         } else {
    4285           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SidAttr);
    4286             :         }
    4287           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4288           0 :                 PyErr_SetNdrError(err);
    4289           0 :                 return NULL;
    4290             :         }
    4291             : 
    4292           0 :         Py_RETURN_NONE;
    4293             : }
    4294             : 
    4295           0 : static PyObject *py_netr_SidAttr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4296             : {
    4297           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4298           0 :         PyObject *ret;
    4299           0 :         char *retstr;
    4300             : 
    4301           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SidAttr, "netr_SidAttr", object);
    4302           0 :         ret = PyUnicode_FromString(retstr);
    4303           0 :         talloc_free(retstr);
    4304             : 
    4305           0 :         return ret;
    4306             : }
    4307             : 
    4308             : static PyMethodDef py_netr_SidAttr_methods[] = {
    4309             :         { "__ndr_pack__", (PyCFunction)py_netr_SidAttr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4310             :         { "__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" },
    4311             :         { "__ndr_print__", (PyCFunction)py_netr_SidAttr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4312             :         { NULL, NULL, 0, NULL }
    4313             : };
    4314             : 
    4315             : 
    4316             : static PyTypeObject netr_SidAttr_Type = {
    4317             :         PyVarObject_HEAD_INIT(NULL, 0)
    4318             :         .tp_name = "netlogon.netr_SidAttr",
    4319             :         .tp_getset = py_netr_SidAttr_getsetters,
    4320             :         .tp_methods = py_netr_SidAttr_methods,
    4321             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4322             :         .tp_new = py_netr_SidAttr_new,
    4323             : };
    4324             : 
    4325             : 
    4326       20244 : static PyObject *py_netr_SamInfo3_get_base(PyObject *obj, void *closure)
    4327             : {
    4328       20244 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(obj);
    4329           2 :         PyObject *py_base;
    4330       20244 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4331       20244 :         return py_base;
    4332             : }
    4333             : 
    4334           0 : static int py_netr_SamInfo3_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4335             : {
    4336           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4337           0 :         if (value == NULL) {
    4338           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->base");
    4339           0 :                 return -1;
    4340             :         }
    4341           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4342           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4343           0 :                 PyErr_NoMemory();
    4344           0 :                 return -1;
    4345             :         }
    4346           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4347           0 :         return 0;
    4348             : }
    4349             : 
    4350           2 : static PyObject *py_netr_SamInfo3_get_sidcount(PyObject *obj, void *closure)
    4351             : {
    4352           2 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(obj);
    4353           0 :         PyObject *py_sidcount;
    4354           2 :         py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)object->sidcount);
    4355           2 :         return py_sidcount;
    4356             : }
    4357             : 
    4358         499 : static int py_netr_SamInfo3_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
    4359             : {
    4360         499 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4361         499 :         if (value == NULL) {
    4362           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sidcount");
    4363           0 :                 return -1;
    4364             :         }
    4365             :         {
    4366         499 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
    4367         499 :                 if (PyLong_Check(value)) {
    4368           0 :                         unsigned long long test_var;
    4369         499 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4370         499 :                         if (PyErr_Occurred() != NULL) {
    4371           0 :                                 return -1;
    4372             :                         }
    4373         499 :                         if (test_var > uint_max) {
    4374           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4375             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4376           0 :                                 return -1;
    4377             :                         }
    4378         499 :                         object->sidcount = test_var;
    4379             :                 } else {
    4380           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4381             :                           PyLong_Type.tp_name);
    4382           0 :                         return -1;
    4383             :                 }
    4384             :         }
    4385         499 :         return 0;
    4386             : }
    4387             : 
    4388         974 : static PyObject *py_netr_SamInfo3_get_sids(PyObject *obj, void *closure)
    4389             : {
    4390         974 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(obj);
    4391           0 :         PyObject *py_sids;
    4392         974 :         if (object->sids == NULL) {
    4393           0 :                 Py_RETURN_NONE;
    4394             :         }
    4395         974 :         if (object->sids == NULL) {
    4396           0 :                 py_sids = Py_None;
    4397           0 :                 Py_INCREF(py_sids);
    4398             :         } else {
    4399         974 :                 py_sids = PyList_New(object->sidcount);
    4400         974 :                 if (py_sids == NULL) {
    4401           0 :                         return NULL;
    4402             :                 }
    4403             :                 {
    4404             :                         int sids_cntr_1;
    4405        2935 :                         for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
    4406           0 :                                 PyObject *py_sids_1;
    4407        1961 :                                 py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &object->sids[sids_cntr_1]);
    4408        1961 :                                 PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
    4409             :                         }
    4410             :                 }
    4411             :         }
    4412         974 :         return py_sids;
    4413             : }
    4414             : 
    4415         499 : static int py_netr_SamInfo3_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4416             : {
    4417         499 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4418         499 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
    4419         499 :         if (value == NULL) {
    4420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
    4421           0 :                 return -1;
    4422             :         }
    4423         499 :         if (value == Py_None) {
    4424          91 :                 object->sids = NULL;
    4425             :         } else {
    4426         408 :                 object->sids = NULL;
    4427         408 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4428             :                 {
    4429           0 :                         int sids_cntr_1;
    4430         408 :                         object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    4431         408 :                         if (!object->sids) { return -1; }
    4432         408 :                         talloc_set_name_const(object->sids, "ARRAY: object->sids");
    4433        1128 :                         for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
    4434         720 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
    4435           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids[sids_cntr_1]");
    4436           0 :                                         return -1;
    4437             :                                 }
    4438         720 :                                 PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
    4439         720 :                                 if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
    4440           0 :                                         PyErr_NoMemory();
    4441           0 :                                         return -1;
    4442             :                                 }
    4443         720 :                                 object->sids[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
    4444             :                         }
    4445             :                 }
    4446             :         }
    4447         499 :         return 0;
    4448             : }
    4449             : 
    4450             : static PyGetSetDef py_netr_SamInfo3_getsetters[] = {
    4451             :         {
    4452             :                 .name = discard_const_p(char, "base"),
    4453             :                 .get = py_netr_SamInfo3_get_base,
    4454             :                 .set = py_netr_SamInfo3_set_base,
    4455             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4456             :         },
    4457             :         {
    4458             :                 .name = discard_const_p(char, "sidcount"),
    4459             :                 .get = py_netr_SamInfo3_get_sidcount,
    4460             :                 .set = py_netr_SamInfo3_set_sidcount,
    4461             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4462             :         },
    4463             :         {
    4464             :                 .name = discard_const_p(char, "sids"),
    4465             :                 .get = py_netr_SamInfo3_get_sids,
    4466             :                 .set = py_netr_SamInfo3_set_sids,
    4467             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
    4468             :         },
    4469             :         { .name = NULL }
    4470             : };
    4471             : 
    4472           0 : static PyObject *py_netr_SamInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4473             : {
    4474           0 :         return pytalloc_new(struct netr_SamInfo3, type);
    4475             : }
    4476             : 
    4477           0 : static PyObject *py_netr_SamInfo3_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4478             : {
    4479           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4480           0 :         PyObject *ret = NULL;
    4481           0 :         DATA_BLOB blob;
    4482           0 :         enum ndr_err_code err;
    4483           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4484           0 :         if (tmp_ctx == NULL) {
    4485           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4486           0 :                 return NULL;
    4487             :         }
    4488           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SamInfo3);
    4489           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4490           0 :                 TALLOC_FREE(tmp_ctx);
    4491           0 :                 PyErr_SetNdrError(err);
    4492           0 :                 return NULL;
    4493             :         }
    4494             : 
    4495           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4496           0 :         TALLOC_FREE(tmp_ctx);
    4497           0 :         return ret;
    4498             : }
    4499             : 
    4500           0 : static PyObject *py_netr_SamInfo3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4501             : {
    4502           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4503           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4504           0 :         Py_ssize_t blob_length = 0;
    4505           0 :         enum ndr_err_code err;
    4506           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4507           0 :         PyObject *allow_remaining_obj = NULL;
    4508           0 :         bool allow_remaining = false;
    4509             : 
    4510           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4511             :                 discard_const_p(char *, kwnames),
    4512             :                 &blob.data, &blob_length,
    4513             :                 &allow_remaining_obj)) {
    4514           0 :                 return NULL;
    4515             :         }
    4516           0 :         blob.length = blob_length;
    4517             : 
    4518           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4519           0 :                 allow_remaining = true;
    4520             :         }
    4521             : 
    4522           0 :         if (allow_remaining) {
    4523           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
    4524             :         } else {
    4525           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
    4526             :         }
    4527           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4528           0 :                 PyErr_SetNdrError(err);
    4529           0 :                 return NULL;
    4530             :         }
    4531             : 
    4532           0 :         Py_RETURN_NONE;
    4533             : }
    4534             : 
    4535           0 : static PyObject *py_netr_SamInfo3_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4536             : {
    4537           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4538           0 :         PyObject *ret;
    4539           0 :         char *retstr;
    4540             : 
    4541           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo3, "netr_SamInfo3", object);
    4542           0 :         ret = PyUnicode_FromString(retstr);
    4543           0 :         talloc_free(retstr);
    4544             : 
    4545           0 :         return ret;
    4546             : }
    4547             : 
    4548             : static PyMethodDef py_netr_SamInfo3_methods[] = {
    4549             :         { "__ndr_pack__", (PyCFunction)py_netr_SamInfo3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4550             :         { "__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" },
    4551             :         { "__ndr_print__", (PyCFunction)py_netr_SamInfo3_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4552             :         { NULL, NULL, 0, NULL }
    4553             : };
    4554             : 
    4555             : 
    4556             : static PyTypeObject netr_SamInfo3_Type = {
    4557             :         PyVarObject_HEAD_INIT(NULL, 0)
    4558             :         .tp_name = "netlogon.netr_SamInfo3",
    4559             :         .tp_getset = py_netr_SamInfo3_getsetters,
    4560             :         .tp_methods = py_netr_SamInfo3_methods,
    4561             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4562             :         .tp_new = py_netr_SamInfo3_new,
    4563             : };
    4564             : 
    4565             : 
    4566           2 : static PyObject *py_netr_SamInfo6_get_base(PyObject *obj, void *closure)
    4567             : {
    4568           2 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4569           0 :         PyObject *py_base;
    4570           2 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4571           2 :         return py_base;
    4572             : }
    4573             : 
    4574           0 : static int py_netr_SamInfo6_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4575             : {
    4576           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4577           0 :         if (value == NULL) {
    4578           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->base");
    4579           0 :                 return -1;
    4580             :         }
    4581           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4582           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4583           0 :                 PyErr_NoMemory();
    4584           0 :                 return -1;
    4585             :         }
    4586           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4587           0 :         return 0;
    4588             : }
    4589             : 
    4590           2 : static PyObject *py_netr_SamInfo6_get_sidcount(PyObject *obj, void *closure)
    4591             : {
    4592           2 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4593           0 :         PyObject *py_sidcount;
    4594           2 :         py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)object->sidcount);
    4595           2 :         return py_sidcount;
    4596             : }
    4597             : 
    4598           0 : static int py_netr_SamInfo6_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
    4599             : {
    4600           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4601           0 :         if (value == NULL) {
    4602           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sidcount");
    4603           0 :                 return -1;
    4604             :         }
    4605             :         {
    4606           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
    4607           0 :                 if (PyLong_Check(value)) {
    4608           0 :                         unsigned long long test_var;
    4609           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4610           0 :                         if (PyErr_Occurred() != NULL) {
    4611           0 :                                 return -1;
    4612             :                         }
    4613           0 :                         if (test_var > uint_max) {
    4614           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4615             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4616           0 :                                 return -1;
    4617             :                         }
    4618           0 :                         object->sidcount = test_var;
    4619             :                 } else {
    4620           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4621             :                           PyLong_Type.tp_name);
    4622           0 :                         return -1;
    4623             :                 }
    4624             :         }
    4625           0 :         return 0;
    4626             : }
    4627             : 
    4628           2 : static PyObject *py_netr_SamInfo6_get_sids(PyObject *obj, void *closure)
    4629             : {
    4630           2 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4631           0 :         PyObject *py_sids;
    4632           2 :         if (object->sids == NULL) {
    4633           0 :                 Py_RETURN_NONE;
    4634             :         }
    4635           2 :         if (object->sids == NULL) {
    4636           0 :                 py_sids = Py_None;
    4637           0 :                 Py_INCREF(py_sids);
    4638             :         } else {
    4639           2 :                 py_sids = PyList_New(object->sidcount);
    4640           2 :                 if (py_sids == NULL) {
    4641           0 :                         return NULL;
    4642             :                 }
    4643             :                 {
    4644             :                         int sids_cntr_1;
    4645           4 :                         for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
    4646           0 :                                 PyObject *py_sids_1;
    4647           2 :                                 py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &object->sids[sids_cntr_1]);
    4648           2 :                                 PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
    4649             :                         }
    4650             :                 }
    4651             :         }
    4652           2 :         return py_sids;
    4653             : }
    4654             : 
    4655           0 : static int py_netr_SamInfo6_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4656             : {
    4657           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4658           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
    4659           0 :         if (value == NULL) {
    4660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
    4661           0 :                 return -1;
    4662             :         }
    4663           0 :         if (value == Py_None) {
    4664           0 :                 object->sids = NULL;
    4665             :         } else {
    4666           0 :                 object->sids = NULL;
    4667           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4668             :                 {
    4669           0 :                         int sids_cntr_1;
    4670           0 :                         object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    4671           0 :                         if (!object->sids) { return -1; }
    4672           0 :                         talloc_set_name_const(object->sids, "ARRAY: object->sids");
    4673           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
    4674           0 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
    4675           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids[sids_cntr_1]");
    4676           0 :                                         return -1;
    4677             :                                 }
    4678           0 :                                 PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
    4679           0 :                                 if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
    4680           0 :                                         PyErr_NoMemory();
    4681           0 :                                         return -1;
    4682             :                                 }
    4683           0 :                                 object->sids[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
    4684             :                         }
    4685             :                 }
    4686             :         }
    4687           0 :         return 0;
    4688             : }
    4689             : 
    4690           0 : static PyObject *py_netr_SamInfo6_get_dns_domainname(PyObject *obj, void *closure)
    4691             : {
    4692           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4693           0 :         PyObject *py_dns_domainname;
    4694           0 :         py_dns_domainname = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dns_domainname);
    4695           0 :         return py_dns_domainname;
    4696             : }
    4697             : 
    4698           0 : static int py_netr_SamInfo6_set_dns_domainname(PyObject *py_obj, PyObject *value, void *closure)
    4699             : {
    4700           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4701           0 :         if (value == NULL) {
    4702           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domainname");
    4703           0 :                 return -1;
    4704             :         }
    4705           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4706           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4707           0 :                 PyErr_NoMemory();
    4708           0 :                 return -1;
    4709             :         }
    4710           0 :         object->dns_domainname = *(struct lsa_String *)pytalloc_get_ptr(value);
    4711           0 :         return 0;
    4712             : }
    4713             : 
    4714           0 : static PyObject *py_netr_SamInfo6_get_principal_name(PyObject *obj, void *closure)
    4715             : {
    4716           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4717           0 :         PyObject *py_principal_name;
    4718           0 :         py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
    4719           0 :         return py_principal_name;
    4720             : }
    4721             : 
    4722           0 : static int py_netr_SamInfo6_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
    4723             : {
    4724           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4725           0 :         if (value == NULL) {
    4726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principal_name");
    4727           0 :                 return -1;
    4728             :         }
    4729           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4730           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4731           0 :                 PyErr_NoMemory();
    4732           0 :                 return -1;
    4733             :         }
    4734           0 :         object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    4735           0 :         return 0;
    4736             : }
    4737             : 
    4738           0 : static PyObject *py_netr_SamInfo6_get_unknown4(PyObject *obj, void *closure)
    4739             : {
    4740           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4741           0 :         PyObject *py_unknown4;
    4742           0 :         py_unknown4 = PyList_New(20);
    4743           0 :         if (py_unknown4 == NULL) {
    4744           0 :                 return NULL;
    4745             :         }
    4746             :         {
    4747             :                 int unknown4_cntr_0;
    4748           0 :                 for (unknown4_cntr_0 = 0; unknown4_cntr_0 < (20); unknown4_cntr_0++) {
    4749           0 :                         PyObject *py_unknown4_0;
    4750           0 :                         py_unknown4_0 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4[unknown4_cntr_0]);
    4751           0 :                         PyList_SetItem(py_unknown4, unknown4_cntr_0, py_unknown4_0);
    4752             :                 }
    4753             :         }
    4754           0 :         return py_unknown4;
    4755             : }
    4756             : 
    4757           0 : static int py_netr_SamInfo6_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    4758             : {
    4759           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4760           0 :         if (value == NULL) {
    4761           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    4762           0 :                 return -1;
    4763             :         }
    4764           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4765             :         {
    4766           0 :                 int unknown4_cntr_0;
    4767           0 :                 if (ARRAY_SIZE(object->unknown4) != PyList_GET_SIZE(value)) {
    4768           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));
    4769           0 :                         return -1;
    4770             :                 }
    4771           0 :                 for (unknown4_cntr_0 = 0; unknown4_cntr_0 < PyList_GET_SIZE(value); unknown4_cntr_0++) {
    4772           0 :                         if (PyList_GET_ITEM(value, unknown4_cntr_0) == NULL) {
    4773           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4[unknown4_cntr_0]");
    4774           0 :                                 return -1;
    4775             :                         }
    4776             :                         {
    4777           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4[unknown4_cntr_0]));
    4778           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, unknown4_cntr_0))) {
    4779           0 :                                         unsigned long long test_var;
    4780           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, unknown4_cntr_0));
    4781           0 :                                         if (PyErr_Occurred() != NULL) {
    4782           0 :                                                 return -1;
    4783             :                                         }
    4784           0 :                                         if (test_var > uint_max) {
    4785           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4786             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    4787           0 :                                                 return -1;
    4788             :                                         }
    4789           0 :                                         object->unknown4[unknown4_cntr_0] = test_var;
    4790             :                                 } else {
    4791           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4792             :                                           PyLong_Type.tp_name);
    4793           0 :                                         return -1;
    4794             :                                 }
    4795             :                         }
    4796             :                 }
    4797             :         }
    4798           0 :         return 0;
    4799             : }
    4800             : 
    4801             : static PyGetSetDef py_netr_SamInfo6_getsetters[] = {
    4802             :         {
    4803             :                 .name = discard_const_p(char, "base"),
    4804             :                 .get = py_netr_SamInfo6_get_base,
    4805             :                 .set = py_netr_SamInfo6_set_base,
    4806             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4807             :         },
    4808             :         {
    4809             :                 .name = discard_const_p(char, "sidcount"),
    4810             :                 .get = py_netr_SamInfo6_get_sidcount,
    4811             :                 .set = py_netr_SamInfo6_set_sidcount,
    4812             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4813             :         },
    4814             :         {
    4815             :                 .name = discard_const_p(char, "sids"),
    4816             :                 .get = py_netr_SamInfo6_get_sids,
    4817             :                 .set = py_netr_SamInfo6_set_sids,
    4818             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
    4819             :         },
    4820             :         {
    4821             :                 .name = discard_const_p(char, "dns_domainname"),
    4822             :                 .get = py_netr_SamInfo6_get_dns_domainname,
    4823             :                 .set = py_netr_SamInfo6_set_dns_domainname,
    4824             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    4825             :         },
    4826             :         {
    4827             :                 .name = discard_const_p(char, "principal_name"),
    4828             :                 .get = py_netr_SamInfo6_get_principal_name,
    4829             :                 .set = py_netr_SamInfo6_set_principal_name,
    4830             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    4831             :         },
    4832             :         {
    4833             :                 .name = discard_const_p(char, "unknown4"),
    4834             :                 .get = py_netr_SamInfo6_get_unknown4,
    4835             :                 .set = py_netr_SamInfo6_set_unknown4,
    4836             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4837             :         },
    4838             :         { .name = NULL }
    4839             : };
    4840             : 
    4841           0 : static PyObject *py_netr_SamInfo6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4842             : {
    4843           0 :         return pytalloc_new(struct netr_SamInfo6, type);
    4844             : }
    4845             : 
    4846             : 
    4847             : static PyTypeObject netr_SamInfo6_Type = {
    4848             :         PyVarObject_HEAD_INIT(NULL, 0)
    4849             :         .tp_name = "netlogon.netr_SamInfo6",
    4850             :         .tp_getset = py_netr_SamInfo6_getsetters,
    4851             :         .tp_methods = NULL,
    4852             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4853             :         .tp_new = py_netr_SamInfo6_new,
    4854             : };
    4855             : 
    4856             : 
    4857           0 : static PyObject *py_netr_PacInfo_get_pac_size(PyObject *obj, void *closure)
    4858             : {
    4859           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4860           0 :         PyObject *py_pac_size;
    4861           0 :         py_pac_size = PyLong_FromUnsignedLongLong((uint32_t)object->pac_size);
    4862           0 :         return py_pac_size;
    4863             : }
    4864             : 
    4865           0 : static int py_netr_PacInfo_set_pac_size(PyObject *py_obj, PyObject *value, void *closure)
    4866             : {
    4867           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    4868           0 :         if (value == NULL) {
    4869           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pac_size");
    4870           0 :                 return -1;
    4871             :         }
    4872             :         {
    4873           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pac_size));
    4874           0 :                 if (PyLong_Check(value)) {
    4875           0 :                         unsigned long long test_var;
    4876           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4877           0 :                         if (PyErr_Occurred() != NULL) {
    4878           0 :                                 return -1;
    4879             :                         }
    4880           0 :                         if (test_var > uint_max) {
    4881           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4882             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4883           0 :                                 return -1;
    4884             :                         }
    4885           0 :                         object->pac_size = test_var;
    4886             :                 } else {
    4887           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4888             :                           PyLong_Type.tp_name);
    4889           0 :                         return -1;
    4890             :                 }
    4891             :         }
    4892           0 :         return 0;
    4893             : }
    4894             : 
    4895           0 : static PyObject *py_netr_PacInfo_get_pac(PyObject *obj, void *closure)
    4896             : {
    4897           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4898           0 :         PyObject *py_pac;
    4899           0 :         if (object->pac == NULL) {
    4900           0 :                 Py_RETURN_NONE;
    4901             :         }
    4902           0 :         if (object->pac == NULL) {
    4903           0 :                 py_pac = Py_None;
    4904           0 :                 Py_INCREF(py_pac);
    4905             :         } else {
    4906           0 :                 py_pac = PyList_New(object->pac_size);
    4907           0 :                 if (py_pac == NULL) {
    4908           0 :                         return NULL;
    4909             :                 }
    4910             :                 {
    4911             :                         int pac_cntr_1;
    4912           0 :                         for (pac_cntr_1 = 0; pac_cntr_1 < (object->pac_size); pac_cntr_1++) {
    4913           0 :                                 PyObject *py_pac_1;
    4914           0 :                                 py_pac_1 = PyLong_FromLong((uint16_t)object->pac[pac_cntr_1]);
    4915           0 :                                 PyList_SetItem(py_pac, pac_cntr_1, py_pac_1);
    4916             :                         }
    4917             :                 }
    4918             :         }
    4919           0 :         return py_pac;
    4920             : }
    4921             : 
    4922           0 : static int py_netr_PacInfo_set_pac(PyObject *py_obj, PyObject *value, void *closure)
    4923             : {
    4924           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    4925           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pac));
    4926           0 :         if (value == NULL) {
    4927           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pac");
    4928           0 :                 return -1;
    4929             :         }
    4930           0 :         if (value == Py_None) {
    4931           0 :                 object->pac = NULL;
    4932             :         } else {
    4933           0 :                 object->pac = NULL;
    4934           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4935             :                 {
    4936           0 :                         int pac_cntr_1;
    4937           0 :                         object->pac = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pac, PyList_GET_SIZE(value));
    4938           0 :                         if (!object->pac) { return -1; }
    4939           0 :                         talloc_set_name_const(object->pac, "ARRAY: object->pac");
    4940           0 :                         for (pac_cntr_1 = 0; pac_cntr_1 < PyList_GET_SIZE(value); pac_cntr_1++) {
    4941           0 :                                 if (PyList_GET_ITEM(value, pac_cntr_1) == NULL) {
    4942           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pac[pac_cntr_1]");
    4943           0 :                                         return -1;
    4944             :                                 }
    4945             :                                 {
    4946           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pac[pac_cntr_1]));
    4947           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, pac_cntr_1))) {
    4948           0 :                                                 unsigned long long test_var;
    4949           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, pac_cntr_1));
    4950           0 :                                                 if (PyErr_Occurred() != NULL) {
    4951           0 :                                                         return -1;
    4952             :                                                 }
    4953           0 :                                                 if (test_var > uint_max) {
    4954           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4955             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    4956           0 :                                                         return -1;
    4957             :                                                 }
    4958           0 :                                                 object->pac[pac_cntr_1] = test_var;
    4959             :                                         } else {
    4960           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    4961             :                                                   PyLong_Type.tp_name);
    4962           0 :                                                 return -1;
    4963             :                                         }
    4964             :                                 }
    4965             :                         }
    4966             :                 }
    4967             :         }
    4968           0 :         return 0;
    4969             : }
    4970             : 
    4971           0 : static PyObject *py_netr_PacInfo_get_logon_domain(PyObject *obj, void *closure)
    4972             : {
    4973           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4974           0 :         PyObject *py_logon_domain;
    4975           0 :         py_logon_domain = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
    4976           0 :         return py_logon_domain;
    4977             : }
    4978             : 
    4979           0 : static int py_netr_PacInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
    4980             : {
    4981           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    4982           0 :         if (value == NULL) {
    4983           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_domain");
    4984           0 :                 return -1;
    4985             :         }
    4986           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4987           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4988           0 :                 PyErr_NoMemory();
    4989           0 :                 return -1;
    4990             :         }
    4991           0 :         object->logon_domain = *(struct lsa_String *)pytalloc_get_ptr(value);
    4992           0 :         return 0;
    4993             : }
    4994             : 
    4995           0 : static PyObject *py_netr_PacInfo_get_logon_server(PyObject *obj, void *closure)
    4996             : {
    4997           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4998           0 :         PyObject *py_logon_server;
    4999           0 :         py_logon_server = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
    5000           0 :         return py_logon_server;
    5001             : }
    5002             : 
    5003           0 : static int py_netr_PacInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
    5004             : {
    5005           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5006           0 :         if (value == NULL) {
    5007           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_server");
    5008           0 :                 return -1;
    5009             :         }
    5010           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5011           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5012           0 :                 PyErr_NoMemory();
    5013           0 :                 return -1;
    5014             :         }
    5015           0 :         object->logon_server = *(struct lsa_String *)pytalloc_get_ptr(value);
    5016           0 :         return 0;
    5017             : }
    5018             : 
    5019           0 : static PyObject *py_netr_PacInfo_get_principal_name(PyObject *obj, void *closure)
    5020             : {
    5021           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5022           0 :         PyObject *py_principal_name;
    5023           0 :         py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
    5024           0 :         return py_principal_name;
    5025             : }
    5026             : 
    5027           0 : static int py_netr_PacInfo_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
    5028             : {
    5029           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5030           0 :         if (value == NULL) {
    5031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principal_name");
    5032           0 :                 return -1;
    5033             :         }
    5034           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5035           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5036           0 :                 PyErr_NoMemory();
    5037           0 :                 return -1;
    5038             :         }
    5039           0 :         object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    5040           0 :         return 0;
    5041             : }
    5042             : 
    5043           0 : static PyObject *py_netr_PacInfo_get_auth_size(PyObject *obj, void *closure)
    5044             : {
    5045           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5046           0 :         PyObject *py_auth_size;
    5047           0 :         py_auth_size = PyLong_FromUnsignedLongLong((uint32_t)object->auth_size);
    5048           0 :         return py_auth_size;
    5049             : }
    5050             : 
    5051           0 : static int py_netr_PacInfo_set_auth_size(PyObject *py_obj, PyObject *value, void *closure)
    5052             : {
    5053           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5054           0 :         if (value == NULL) {
    5055           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_size");
    5056           0 :                 return -1;
    5057             :         }
    5058             :         {
    5059           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_size));
    5060           0 :                 if (PyLong_Check(value)) {
    5061           0 :                         unsigned long long test_var;
    5062           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5063           0 :                         if (PyErr_Occurred() != NULL) {
    5064           0 :                                 return -1;
    5065             :                         }
    5066           0 :                         if (test_var > uint_max) {
    5067           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5068             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5069           0 :                                 return -1;
    5070             :                         }
    5071           0 :                         object->auth_size = test_var;
    5072             :                 } else {
    5073           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5074             :                           PyLong_Type.tp_name);
    5075           0 :                         return -1;
    5076             :                 }
    5077             :         }
    5078           0 :         return 0;
    5079             : }
    5080             : 
    5081           0 : static PyObject *py_netr_PacInfo_get_auth(PyObject *obj, void *closure)
    5082             : {
    5083           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5084           0 :         PyObject *py_auth;
    5085           0 :         if (object->auth == NULL) {
    5086           0 :                 Py_RETURN_NONE;
    5087             :         }
    5088           0 :         if (object->auth == NULL) {
    5089           0 :                 py_auth = Py_None;
    5090           0 :                 Py_INCREF(py_auth);
    5091             :         } else {
    5092           0 :                 py_auth = PyList_New(object->auth_size);
    5093           0 :                 if (py_auth == NULL) {
    5094           0 :                         return NULL;
    5095             :                 }
    5096             :                 {
    5097             :                         int auth_cntr_1;
    5098           0 :                         for (auth_cntr_1 = 0; auth_cntr_1 < (object->auth_size); auth_cntr_1++) {
    5099           0 :                                 PyObject *py_auth_1;
    5100           0 :                                 py_auth_1 = PyLong_FromLong((uint16_t)object->auth[auth_cntr_1]);
    5101           0 :                                 PyList_SetItem(py_auth, auth_cntr_1, py_auth_1);
    5102             :                         }
    5103             :                 }
    5104             :         }
    5105           0 :         return py_auth;
    5106             : }
    5107             : 
    5108           0 : static int py_netr_PacInfo_set_auth(PyObject *py_obj, PyObject *value, void *closure)
    5109             : {
    5110           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5111           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->auth));
    5112           0 :         if (value == NULL) {
    5113           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth");
    5114           0 :                 return -1;
    5115             :         }
    5116           0 :         if (value == Py_None) {
    5117           0 :                 object->auth = NULL;
    5118             :         } else {
    5119           0 :                 object->auth = NULL;
    5120           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5121             :                 {
    5122           0 :                         int auth_cntr_1;
    5123           0 :                         object->auth = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->auth, PyList_GET_SIZE(value));
    5124           0 :                         if (!object->auth) { return -1; }
    5125           0 :                         talloc_set_name_const(object->auth, "ARRAY: object->auth");
    5126           0 :                         for (auth_cntr_1 = 0; auth_cntr_1 < PyList_GET_SIZE(value); auth_cntr_1++) {
    5127           0 :                                 if (PyList_GET_ITEM(value, auth_cntr_1) == NULL) {
    5128           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth[auth_cntr_1]");
    5129           0 :                                         return -1;
    5130             :                                 }
    5131             :                                 {
    5132           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth[auth_cntr_1]));
    5133           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, auth_cntr_1))) {
    5134           0 :                                                 unsigned long long test_var;
    5135           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, auth_cntr_1));
    5136           0 :                                                 if (PyErr_Occurred() != NULL) {
    5137           0 :                                                         return -1;
    5138             :                                                 }
    5139           0 :                                                 if (test_var > uint_max) {
    5140           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5141             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    5142           0 :                                                         return -1;
    5143             :                                                 }
    5144           0 :                                                 object->auth[auth_cntr_1] = test_var;
    5145             :                                         } else {
    5146           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    5147             :                                                   PyLong_Type.tp_name);
    5148           0 :                                                 return -1;
    5149             :                                         }
    5150             :                                 }
    5151             :                         }
    5152             :                 }
    5153             :         }
    5154           0 :         return 0;
    5155             : }
    5156             : 
    5157           0 : static PyObject *py_netr_PacInfo_get_user_session_key(PyObject *obj, void *closure)
    5158             : {
    5159           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5160           0 :         PyObject *py_user_session_key;
    5161           0 :         py_user_session_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->user_session_key);
    5162           0 :         return py_user_session_key;
    5163             : }
    5164             : 
    5165           0 : static int py_netr_PacInfo_set_user_session_key(PyObject *py_obj, PyObject *value, void *closure)
    5166             : {
    5167           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5168           0 :         if (value == NULL) {
    5169           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_session_key");
    5170           0 :                 return -1;
    5171             :         }
    5172           0 :         PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
    5173           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5174           0 :                 PyErr_NoMemory();
    5175           0 :                 return -1;
    5176             :         }
    5177           0 :         object->user_session_key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
    5178           0 :         return 0;
    5179             : }
    5180             : 
    5181           0 : static PyObject *py_netr_PacInfo_get_expansionroom(PyObject *obj, void *closure)
    5182             : {
    5183           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5184           0 :         PyObject *py_expansionroom;
    5185           0 :         py_expansionroom = PyList_New(10);
    5186           0 :         if (py_expansionroom == NULL) {
    5187           0 :                 return NULL;
    5188             :         }
    5189             :         {
    5190             :                 int expansionroom_cntr_0;
    5191           0 :                 for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < (10); expansionroom_cntr_0++) {
    5192           0 :                         PyObject *py_expansionroom_0;
    5193           0 :                         py_expansionroom_0 = PyLong_FromUnsignedLongLong((uint32_t)object->expansionroom[expansionroom_cntr_0]);
    5194           0 :                         PyList_SetItem(py_expansionroom, expansionroom_cntr_0, py_expansionroom_0);
    5195             :                 }
    5196             :         }
    5197           0 :         return py_expansionroom;
    5198             : }
    5199             : 
    5200           0 : static int py_netr_PacInfo_set_expansionroom(PyObject *py_obj, PyObject *value, void *closure)
    5201             : {
    5202           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5203           0 :         if (value == NULL) {
    5204           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->expansionroom");
    5205           0 :                 return -1;
    5206             :         }
    5207           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5208             :         {
    5209           0 :                 int expansionroom_cntr_0;
    5210           0 :                 if (ARRAY_SIZE(object->expansionroom) != PyList_GET_SIZE(value)) {
    5211           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));
    5212           0 :                         return -1;
    5213             :                 }
    5214           0 :                 for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < PyList_GET_SIZE(value); expansionroom_cntr_0++) {
    5215           0 :                         if (PyList_GET_ITEM(value, expansionroom_cntr_0) == NULL) {
    5216           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->expansionroom[expansionroom_cntr_0]");
    5217           0 :                                 return -1;
    5218             :                         }
    5219             :                         {
    5220           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->expansionroom[expansionroom_cntr_0]));
    5221           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, expansionroom_cntr_0))) {
    5222           0 :                                         unsigned long long test_var;
    5223           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, expansionroom_cntr_0));
    5224           0 :                                         if (PyErr_Occurred() != NULL) {
    5225           0 :                                                 return -1;
    5226             :                                         }
    5227           0 :                                         if (test_var > uint_max) {
    5228           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5229             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5230           0 :                                                 return -1;
    5231             :                                         }
    5232           0 :                                         object->expansionroom[expansionroom_cntr_0] = test_var;
    5233             :                                 } else {
    5234           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5235             :                                           PyLong_Type.tp_name);
    5236           0 :                                         return -1;
    5237             :                                 }
    5238             :                         }
    5239             :                 }
    5240             :         }
    5241           0 :         return 0;
    5242             : }
    5243             : 
    5244           0 : static PyObject *py_netr_PacInfo_get_unknown1(PyObject *obj, void *closure)
    5245             : {
    5246           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5247           0 :         PyObject *py_unknown1;
    5248           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
    5249           0 :         return py_unknown1;
    5250             : }
    5251             : 
    5252           0 : static int py_netr_PacInfo_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    5253             : {
    5254           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5255           0 :         if (value == NULL) {
    5256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
    5257           0 :                 return -1;
    5258             :         }
    5259           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5260           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5261           0 :                 PyErr_NoMemory();
    5262           0 :                 return -1;
    5263             :         }
    5264           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5265           0 :         return 0;
    5266             : }
    5267             : 
    5268           0 : static PyObject *py_netr_PacInfo_get_unknown2(PyObject *obj, void *closure)
    5269             : {
    5270           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5271           0 :         PyObject *py_unknown2;
    5272           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    5273           0 :         return py_unknown2;
    5274             : }
    5275             : 
    5276           0 : static int py_netr_PacInfo_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    5277             : {
    5278           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5279           0 :         if (value == NULL) {
    5280           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    5281           0 :                 return -1;
    5282             :         }
    5283           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5284           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5285           0 :                 PyErr_NoMemory();
    5286           0 :                 return -1;
    5287             :         }
    5288           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5289           0 :         return 0;
    5290             : }
    5291             : 
    5292           0 : static PyObject *py_netr_PacInfo_get_unknown3(PyObject *obj, void *closure)
    5293             : {
    5294           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5295           0 :         PyObject *py_unknown3;
    5296           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    5297           0 :         return py_unknown3;
    5298             : }
    5299             : 
    5300           0 : static int py_netr_PacInfo_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    5301             : {
    5302           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5303           0 :         if (value == NULL) {
    5304           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    5305           0 :                 return -1;
    5306             :         }
    5307           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5308           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5309           0 :                 PyErr_NoMemory();
    5310           0 :                 return -1;
    5311             :         }
    5312           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5313           0 :         return 0;
    5314             : }
    5315             : 
    5316           0 : static PyObject *py_netr_PacInfo_get_unknown4(PyObject *obj, void *closure)
    5317             : {
    5318           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5319           0 :         PyObject *py_unknown4;
    5320           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    5321           0 :         return py_unknown4;
    5322             : }
    5323             : 
    5324           0 : static int py_netr_PacInfo_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    5325             : {
    5326           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5327           0 :         if (value == NULL) {
    5328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    5329           0 :                 return -1;
    5330             :         }
    5331           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5332           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5333           0 :                 PyErr_NoMemory();
    5334           0 :                 return -1;
    5335             :         }
    5336           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5337           0 :         return 0;
    5338             : }
    5339             : 
    5340             : static PyGetSetDef py_netr_PacInfo_getsetters[] = {
    5341             :         {
    5342             :                 .name = discard_const_p(char, "pac_size"),
    5343             :                 .get = py_netr_PacInfo_get_pac_size,
    5344             :                 .set = py_netr_PacInfo_set_pac_size,
    5345             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5346             :         },
    5347             :         {
    5348             :                 .name = discard_const_p(char, "pac"),
    5349             :                 .get = py_netr_PacInfo_get_pac,
    5350             :                 .set = py_netr_PacInfo_set_pac,
    5351             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5352             :         },
    5353             :         {
    5354             :                 .name = discard_const_p(char, "logon_domain"),
    5355             :                 .get = py_netr_PacInfo_get_logon_domain,
    5356             :                 .set = py_netr_PacInfo_set_logon_domain,
    5357             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5358             :         },
    5359             :         {
    5360             :                 .name = discard_const_p(char, "logon_server"),
    5361             :                 .get = py_netr_PacInfo_get_logon_server,
    5362             :                 .set = py_netr_PacInfo_set_logon_server,
    5363             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5364             :         },
    5365             :         {
    5366             :                 .name = discard_const_p(char, "principal_name"),
    5367             :                 .get = py_netr_PacInfo_get_principal_name,
    5368             :                 .set = py_netr_PacInfo_set_principal_name,
    5369             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5370             :         },
    5371             :         {
    5372             :                 .name = discard_const_p(char, "auth_size"),
    5373             :                 .get = py_netr_PacInfo_get_auth_size,
    5374             :                 .set = py_netr_PacInfo_set_auth_size,
    5375             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5376             :         },
    5377             :         {
    5378             :                 .name = discard_const_p(char, "auth"),
    5379             :                 .get = py_netr_PacInfo_get_auth,
    5380             :                 .set = py_netr_PacInfo_set_auth,
    5381             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5382             :         },
    5383             :         {
    5384             :                 .name = discard_const_p(char, "user_session_key"),
    5385             :                 .get = py_netr_PacInfo_get_user_session_key,
    5386             :                 .set = py_netr_PacInfo_set_user_session_key,
    5387             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
    5388             :         },
    5389             :         {
    5390             :                 .name = discard_const_p(char, "expansionroom"),
    5391             :                 .get = py_netr_PacInfo_get_expansionroom,
    5392             :                 .set = py_netr_PacInfo_set_expansionroom,
    5393             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5394             :         },
    5395             :         {
    5396             :                 .name = discard_const_p(char, "unknown1"),
    5397             :                 .get = py_netr_PacInfo_get_unknown1,
    5398             :                 .set = py_netr_PacInfo_set_unknown1,
    5399             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5400             :         },
    5401             :         {
    5402             :                 .name = discard_const_p(char, "unknown2"),
    5403             :                 .get = py_netr_PacInfo_get_unknown2,
    5404             :                 .set = py_netr_PacInfo_set_unknown2,
    5405             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5406             :         },
    5407             :         {
    5408             :                 .name = discard_const_p(char, "unknown3"),
    5409             :                 .get = py_netr_PacInfo_get_unknown3,
    5410             :                 .set = py_netr_PacInfo_set_unknown3,
    5411             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5412             :         },
    5413             :         {
    5414             :                 .name = discard_const_p(char, "unknown4"),
    5415             :                 .get = py_netr_PacInfo_get_unknown4,
    5416             :                 .set = py_netr_PacInfo_set_unknown4,
    5417             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5418             :         },
    5419             :         { .name = NULL }
    5420             : };
    5421             : 
    5422           0 : static PyObject *py_netr_PacInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5423             : {
    5424           0 :         return pytalloc_new(struct netr_PacInfo, type);
    5425             : }
    5426             : 
    5427             : 
    5428             : static PyTypeObject netr_PacInfo_Type = {
    5429             :         PyVarObject_HEAD_INIT(NULL, 0)
    5430             :         .tp_name = "netlogon.netr_PacInfo",
    5431             :         .tp_getset = py_netr_PacInfo_getsetters,
    5432             :         .tp_methods = NULL,
    5433             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5434             :         .tp_new = py_netr_PacInfo_new,
    5435             : };
    5436             : 
    5437             : 
    5438           0 : static PyObject *py_netr_GenericInfo2_get_length(PyObject *obj, void *closure)
    5439             : {
    5440           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(obj);
    5441           0 :         PyObject *py_length;
    5442           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
    5443           0 :         return py_length;
    5444             : }
    5445             : 
    5446           0 : static int py_netr_GenericInfo2_set_length(PyObject *py_obj, PyObject *value, void *closure)
    5447             : {
    5448           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(py_obj);
    5449           0 :         if (value == NULL) {
    5450           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    5451           0 :                 return -1;
    5452             :         }
    5453             :         {
    5454           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    5455           0 :                 if (PyLong_Check(value)) {
    5456           0 :                         unsigned long long test_var;
    5457           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5458           0 :                         if (PyErr_Occurred() != NULL) {
    5459           0 :                                 return -1;
    5460             :                         }
    5461           0 :                         if (test_var > uint_max) {
    5462           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5463             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5464           0 :                                 return -1;
    5465             :                         }
    5466           0 :                         object->length = test_var;
    5467             :                 } else {
    5468           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5469             :                           PyLong_Type.tp_name);
    5470           0 :                         return -1;
    5471             :                 }
    5472             :         }
    5473           0 :         return 0;
    5474             : }
    5475             : 
    5476           0 : static PyObject *py_netr_GenericInfo2_get_data(PyObject *obj, void *closure)
    5477             : {
    5478           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(obj);
    5479           0 :         PyObject *py_data;
    5480           0 :         if (object->data == NULL) {
    5481           0 :                 Py_RETURN_NONE;
    5482             :         }
    5483           0 :         if (object->data == NULL) {
    5484           0 :                 py_data = Py_None;
    5485           0 :                 Py_INCREF(py_data);
    5486             :         } else {
    5487           0 :                 py_data = PyList_New(object->length);
    5488           0 :                 if (py_data == NULL) {
    5489           0 :                         return NULL;
    5490             :                 }
    5491             :                 {
    5492             :                         int data_cntr_1;
    5493           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    5494           0 :                                 PyObject *py_data_1;
    5495           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
    5496           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    5497             :                         }
    5498             :                 }
    5499             :         }
    5500           0 :         return py_data;
    5501             : }
    5502             : 
    5503           0 : static int py_netr_GenericInfo2_set_data(PyObject *py_obj, PyObject *value, void *closure)
    5504             : {
    5505           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(py_obj);
    5506           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    5507           0 :         if (value == NULL) {
    5508           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    5509           0 :                 return -1;
    5510             :         }
    5511           0 :         if (value == Py_None) {
    5512           0 :                 object->data = NULL;
    5513             :         } else {
    5514           0 :                 object->data = NULL;
    5515           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5516             :                 {
    5517           0 :                         int data_cntr_1;
    5518           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    5519           0 :                         if (!object->data) { return -1; }
    5520           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    5521           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    5522           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    5523           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
    5524           0 :                                         return -1;
    5525             :                                 }
    5526             :                                 {
    5527           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
    5528           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    5529           0 :                                                 unsigned long long test_var;
    5530           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    5531           0 :                                                 if (PyErr_Occurred() != NULL) {
    5532           0 :                                                         return -1;
    5533             :                                                 }
    5534           0 :                                                 if (test_var > uint_max) {
    5535           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5536             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    5537           0 :                                                         return -1;
    5538             :                                                 }
    5539           0 :                                                 object->data[data_cntr_1] = test_var;
    5540             :                                         } else {
    5541           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    5542             :                                                   PyLong_Type.tp_name);
    5543           0 :                                                 return -1;
    5544             :                                         }
    5545             :                                 }
    5546             :                         }
    5547             :                 }
    5548             :         }
    5549           0 :         return 0;
    5550             : }
    5551             : 
    5552             : static PyGetSetDef py_netr_GenericInfo2_getsetters[] = {
    5553             :         {
    5554             :                 .name = discard_const_p(char, "length"),
    5555             :                 .get = py_netr_GenericInfo2_get_length,
    5556             :                 .set = py_netr_GenericInfo2_set_length,
    5557             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5558             :         },
    5559             :         {
    5560             :                 .name = discard_const_p(char, "data"),
    5561             :                 .get = py_netr_GenericInfo2_get_data,
    5562             :                 .set = py_netr_GenericInfo2_set_data,
    5563             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5564             :         },
    5565             :         { .name = NULL }
    5566             : };
    5567             : 
    5568           0 : static PyObject *py_netr_GenericInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5569             : {
    5570           0 :         return pytalloc_new(struct netr_GenericInfo2, type);
    5571             : }
    5572             : 
    5573             : 
    5574             : static PyTypeObject netr_GenericInfo2_Type = {
    5575             :         PyVarObject_HEAD_INIT(NULL, 0)
    5576             :         .tp_name = "netlogon.netr_GenericInfo2",
    5577             :         .tp_getset = py_netr_GenericInfo2_getsetters,
    5578             :         .tp_methods = NULL,
    5579             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5580             :         .tp_new = py_netr_GenericInfo2_new,
    5581             : };
    5582             : 
    5583         175 : static PyObject *py_import_netr_Validation(TALLOC_CTX *mem_ctx, int level, union netr_Validation *in)
    5584             : {
    5585           0 :         PyObject *ret;
    5586             : 
    5587         175 :         switch (level) {
    5588           2 :                 case NetlogonValidationSamInfo:
    5589           2 :                         if (in->sam2 == NULL) {
    5590           0 :                                 ret = Py_None;
    5591           0 :                                 Py_INCREF(ret);
    5592             :                         } else {
    5593           2 :                                 ret = pytalloc_reference_ex(&netr_SamInfo2_Type, in->sam2, in->sam2);
    5594             :                         }
    5595           2 :                         return ret;
    5596             : 
    5597         152 :                 case NetlogonValidationSamInfo2:
    5598         152 :                         if (in->sam3 == NULL) {
    5599          76 :                                 ret = Py_None;
    5600          76 :                                 Py_INCREF(ret);
    5601             :                         } else {
    5602          76 :                                 ret = pytalloc_reference_ex(&netr_SamInfo3_Type, in->sam3, in->sam3);
    5603             :                         }
    5604         152 :                         return ret;
    5605             : 
    5606           0 :                 case 4:
    5607           0 :                         if (in->pac == NULL) {
    5608           0 :                                 ret = Py_None;
    5609           0 :                                 Py_INCREF(ret);
    5610             :                         } else {
    5611           0 :                                 ret = pytalloc_reference_ex(&netr_PacInfo_Type, in->pac, in->pac);
    5612             :                         }
    5613           0 :                         return ret;
    5614             : 
    5615           0 :                 case NetlogonValidationGenericInfo2:
    5616           0 :                         if (in->generic == NULL) {
    5617           0 :                                 ret = Py_None;
    5618           0 :                                 Py_INCREF(ret);
    5619             :                         } else {
    5620           0 :                                 ret = pytalloc_reference_ex(&netr_GenericInfo2_Type, in->generic, in->generic);
    5621             :                         }
    5622           0 :                         return ret;
    5623             : 
    5624          21 :                 case NetlogonValidationSamInfo4:
    5625          21 :                         if (in->sam6 == NULL) {
    5626           3 :                                 ret = Py_None;
    5627           3 :                                 Py_INCREF(ret);
    5628             :                         } else {
    5629          18 :                                 ret = pytalloc_reference_ex(&netr_SamInfo6_Type, in->sam6, in->sam6);
    5630             :                         }
    5631          21 :                         return ret;
    5632             : 
    5633           0 :                 default:
    5634           0 :                         ret = Py_None;
    5635           0 :                         Py_INCREF(ret);
    5636           0 :                         return ret;
    5637             : 
    5638             :         }
    5639             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    5640             :         return NULL;
    5641             : }
    5642             : 
    5643           0 : static union netr_Validation *py_export_netr_Validation(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    5644             : {
    5645           0 :         union netr_Validation *ret = talloc_zero(mem_ctx, union netr_Validation);
    5646           0 :         switch (level) {
    5647           0 :                 case NetlogonValidationSamInfo:
    5648           0 :                         if (in == NULL) {
    5649           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sam2");
    5650           0 :                                 talloc_free(ret); return NULL;
    5651             :                         }
    5652           0 :                         if (in == Py_None) {
    5653           0 :                                 ret->sam2 = NULL;
    5654             :                         } else {
    5655           0 :                                 ret->sam2 = NULL;
    5656           0 :                                 PY_CHECK_TYPE(&netr_SamInfo2_Type, in, talloc_free(ret); return NULL;);
    5657           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5658           0 :                                         PyErr_NoMemory();
    5659           0 :                                         talloc_free(ret); return NULL;
    5660             :                                 }
    5661           0 :                                 ret->sam2 = (struct netr_SamInfo2 *)pytalloc_get_ptr(in);
    5662             :                         }
    5663           0 :                         break;
    5664             : 
    5665           0 :                 case NetlogonValidationSamInfo2:
    5666           0 :                         if (in == NULL) {
    5667           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sam3");
    5668           0 :                                 talloc_free(ret); return NULL;
    5669             :                         }
    5670           0 :                         if (in == Py_None) {
    5671           0 :                                 ret->sam3 = NULL;
    5672             :                         } else {
    5673           0 :                                 ret->sam3 = NULL;
    5674           0 :                                 PY_CHECK_TYPE(&netr_SamInfo3_Type, in, talloc_free(ret); return NULL;);
    5675           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5676           0 :                                         PyErr_NoMemory();
    5677           0 :                                         talloc_free(ret); return NULL;
    5678             :                                 }
    5679           0 :                                 ret->sam3 = (struct netr_SamInfo3 *)pytalloc_get_ptr(in);
    5680             :                         }
    5681           0 :                         break;
    5682             : 
    5683           0 :                 case 4:
    5684           0 :                         if (in == NULL) {
    5685           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->pac");
    5686           0 :                                 talloc_free(ret); return NULL;
    5687             :                         }
    5688           0 :                         if (in == Py_None) {
    5689           0 :                                 ret->pac = NULL;
    5690             :                         } else {
    5691           0 :                                 ret->pac = NULL;
    5692           0 :                                 PY_CHECK_TYPE(&netr_PacInfo_Type, in, talloc_free(ret); return NULL;);
    5693           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5694           0 :                                         PyErr_NoMemory();
    5695           0 :                                         talloc_free(ret); return NULL;
    5696             :                                 }
    5697           0 :                                 ret->pac = (struct netr_PacInfo *)pytalloc_get_ptr(in);
    5698             :                         }
    5699           0 :                         break;
    5700             : 
    5701           0 :                 case NetlogonValidationGenericInfo2:
    5702           0 :                         if (in == NULL) {
    5703           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->generic");
    5704           0 :                                 talloc_free(ret); return NULL;
    5705             :                         }
    5706           0 :                         if (in == Py_None) {
    5707           0 :                                 ret->generic = NULL;
    5708             :                         } else {
    5709           0 :                                 ret->generic = NULL;
    5710           0 :                                 PY_CHECK_TYPE(&netr_GenericInfo2_Type, in, talloc_free(ret); return NULL;);
    5711           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5712           0 :                                         PyErr_NoMemory();
    5713           0 :                                         talloc_free(ret); return NULL;
    5714             :                                 }
    5715           0 :                                 ret->generic = (struct netr_GenericInfo2 *)pytalloc_get_ptr(in);
    5716             :                         }
    5717           0 :                         break;
    5718             : 
    5719           0 :                 case NetlogonValidationSamInfo4:
    5720           0 :                         if (in == NULL) {
    5721           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sam6");
    5722           0 :                                 talloc_free(ret); return NULL;
    5723             :                         }
    5724           0 :                         if (in == Py_None) {
    5725           0 :                                 ret->sam6 = NULL;
    5726             :                         } else {
    5727           0 :                                 ret->sam6 = NULL;
    5728           0 :                                 PY_CHECK_TYPE(&netr_SamInfo6_Type, in, talloc_free(ret); return NULL;);
    5729           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5730           0 :                                         PyErr_NoMemory();
    5731           0 :                                         talloc_free(ret); return NULL;
    5732             :                                 }
    5733           0 :                                 ret->sam6 = (struct netr_SamInfo6 *)pytalloc_get_ptr(in);
    5734             :                         }
    5735           0 :                         break;
    5736             : 
    5737           0 :                 default:
    5738           0 :                         break;
    5739             : 
    5740             :         }
    5741             : 
    5742           0 :         return ret;
    5743             : }
    5744             : 
    5745         175 : static PyObject *py_netr_Validation_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5746             : {
    5747         175 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5748         175 :         PyObject *mem_ctx_obj = NULL;
    5749         175 :         TALLOC_CTX *mem_ctx = NULL;
    5750         175 :         int level = 0;
    5751         175 :         PyObject *in_obj = NULL;
    5752         175 :         union netr_Validation *in = NULL;
    5753             : 
    5754         175 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    5755             :                 discard_const_p(char *, kwnames),
    5756             :                 &mem_ctx_obj,
    5757             :                 &level,
    5758             :                 &in_obj)) {
    5759           0 :                 return NULL;
    5760             :         }
    5761         175 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5762         175 :         if (mem_ctx == NULL) {
    5763           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5764           0 :                 return NULL;
    5765             :         }
    5766         175 :         in = (union netr_Validation *)pytalloc_get_ptr(in_obj);
    5767         175 :         if (in == NULL) {
    5768           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_Validation!");
    5769           0 :                 return NULL;
    5770             :         }
    5771             : 
    5772         175 :         return py_import_netr_Validation(mem_ctx, level, in);
    5773             : }
    5774             : 
    5775           0 : static PyObject *py_netr_Validation_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5776             : {
    5777           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5778           0 :         PyObject *mem_ctx_obj = NULL;
    5779           0 :         TALLOC_CTX *mem_ctx = NULL;
    5780           0 :         int level = 0;
    5781           0 :         PyObject *in = NULL;
    5782           0 :         union netr_Validation *out = NULL;
    5783             : 
    5784           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    5785             :                 discard_const_p(char *, kwnames),
    5786             :                 &mem_ctx_obj,
    5787             :                 &level,
    5788             :                 &in)) {
    5789           0 :                 return NULL;
    5790             :         }
    5791           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5792           0 :         if (mem_ctx == NULL) {
    5793           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5794           0 :                 return NULL;
    5795             :         }
    5796             : 
    5797           0 :         out = py_export_netr_Validation(mem_ctx, level, in);
    5798           0 :         if (out == NULL) {
    5799           0 :                 return NULL;
    5800             :         }
    5801             : 
    5802           0 :         return pytalloc_GenericObject_reference(out);
    5803             : }
    5804             : 
    5805             : static PyMethodDef py_netr_Validation_methods[] = {
    5806             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_import),
    5807             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5808             :                 "T.__import__(mem_ctx, level, in) => ret." },
    5809             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_export),
    5810             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5811             :                 "T.__export__(mem_ctx, level, in) => ret." },
    5812             :         { NULL, NULL, 0, NULL }
    5813             : };
    5814             : 
    5815           0 : static PyObject *py_netr_Validation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5816             : {
    5817           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    5818           0 :         return NULL;
    5819             : }
    5820             : 
    5821             : 
    5822             : static PyTypeObject netr_Validation_Type = {
    5823             :         PyVarObject_HEAD_INIT(NULL, 0)
    5824             :         .tp_name = "netlogon.netr_Validation",
    5825             :         .tp_getset = NULL,
    5826             :         .tp_methods = py_netr_Validation_methods,
    5827             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5828             :         .tp_new = py_netr_Validation_new,
    5829             : };
    5830             : 
    5831             : 
    5832           0 : static PyObject *py_netr_Credential_get_data(PyObject *obj, void *closure)
    5833             : {
    5834           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(obj);
    5835           0 :         PyObject *py_data;
    5836           0 :         py_data = PyList_New(8);
    5837           0 :         if (py_data == NULL) {
    5838           0 :                 return NULL;
    5839             :         }
    5840             :         {
    5841             :                 int data_cntr_0;
    5842           0 :                 for (data_cntr_0 = 0; data_cntr_0 < (8); data_cntr_0++) {
    5843           0 :                         PyObject *py_data_0;
    5844           0 :                         py_data_0 = PyLong_FromLong((uint16_t)object->data[data_cntr_0]);
    5845           0 :                         PyList_SetItem(py_data, data_cntr_0, py_data_0);
    5846             :                 }
    5847             :         }
    5848           0 :         return py_data;
    5849             : }
    5850             : 
    5851          39 : static int py_netr_Credential_set_data(PyObject *py_obj, PyObject *value, void *closure)
    5852             : {
    5853          39 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5854          39 :         if (value == NULL) {
    5855           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    5856           0 :                 return -1;
    5857             :         }
    5858          39 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5859             :         {
    5860           0 :                 int data_cntr_0;
    5861          39 :                 if (ARRAY_SIZE(object->data) != PyList_GET_SIZE(value)) {
    5862           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));
    5863           0 :                         return -1;
    5864             :                 }
    5865         351 :                 for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
    5866         312 :                         if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
    5867           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_0]");
    5868           0 :                                 return -1;
    5869             :                         }
    5870             :                         {
    5871         312 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_0]));
    5872         312 :                                 if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
    5873           0 :                                         unsigned long long test_var;
    5874         312 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
    5875         312 :                                         if (PyErr_Occurred() != NULL) {
    5876           0 :                                                 return -1;
    5877             :                                         }
    5878         312 :                                         if (test_var > uint_max) {
    5879           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5880             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5881           0 :                                                 return -1;
    5882             :                                         }
    5883         312 :                                         object->data[data_cntr_0] = test_var;
    5884             :                                 } else {
    5885           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5886             :                                           PyLong_Type.tp_name);
    5887           0 :                                         return -1;
    5888             :                                 }
    5889             :                         }
    5890             :                 }
    5891             :         }
    5892          39 :         return 0;
    5893             : }
    5894             : 
    5895             : static PyGetSetDef py_netr_Credential_getsetters[] = {
    5896             :         {
    5897             :                 .name = discard_const_p(char, "data"),
    5898             :                 .get = py_netr_Credential_get_data,
    5899             :                 .set = py_netr_Credential_set_data,
    5900             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5901             :         },
    5902             :         { .name = NULL }
    5903             : };
    5904             : 
    5905           4 : static PyObject *py_netr_Credential_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5906             : {
    5907           4 :         return pytalloc_new(struct netr_Credential, type);
    5908             : }
    5909             : 
    5910           0 : static PyObject *py_netr_Credential_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5911             : {
    5912           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5913           0 :         PyObject *ret = NULL;
    5914           0 :         DATA_BLOB blob;
    5915           0 :         enum ndr_err_code err;
    5916           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5917           0 :         if (tmp_ctx == NULL) {
    5918           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5919           0 :                 return NULL;
    5920             :         }
    5921           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Credential);
    5922           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5923           0 :                 TALLOC_FREE(tmp_ctx);
    5924           0 :                 PyErr_SetNdrError(err);
    5925           0 :                 return NULL;
    5926             :         }
    5927             : 
    5928           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5929           0 :         TALLOC_FREE(tmp_ctx);
    5930           0 :         return ret;
    5931             : }
    5932             : 
    5933           0 : static PyObject *py_netr_Credential_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5934             : {
    5935           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5936           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5937           0 :         Py_ssize_t blob_length = 0;
    5938           0 :         enum ndr_err_code err;
    5939           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5940           0 :         PyObject *allow_remaining_obj = NULL;
    5941           0 :         bool allow_remaining = false;
    5942             : 
    5943           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5944             :                 discard_const_p(char *, kwnames),
    5945             :                 &blob.data, &blob_length,
    5946             :                 &allow_remaining_obj)) {
    5947           0 :                 return NULL;
    5948             :         }
    5949           0 :         blob.length = blob_length;
    5950             : 
    5951           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5952           0 :                 allow_remaining = true;
    5953             :         }
    5954             : 
    5955           0 :         if (allow_remaining) {
    5956           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Credential);
    5957             :         } else {
    5958           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Credential);
    5959             :         }
    5960           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5961           0 :                 PyErr_SetNdrError(err);
    5962           0 :                 return NULL;
    5963             :         }
    5964             : 
    5965           0 :         Py_RETURN_NONE;
    5966             : }
    5967             : 
    5968           0 : static PyObject *py_netr_Credential_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5969             : {
    5970           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5971           0 :         PyObject *ret;
    5972           0 :         char *retstr;
    5973             : 
    5974           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Credential, "netr_Credential", object);
    5975           0 :         ret = PyUnicode_FromString(retstr);
    5976           0 :         talloc_free(retstr);
    5977             : 
    5978           0 :         return ret;
    5979             : }
    5980             : 
    5981             : static PyMethodDef py_netr_Credential_methods[] = {
    5982             :         { "__ndr_pack__", (PyCFunction)py_netr_Credential_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5983             :         { "__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" },
    5984             :         { "__ndr_print__", (PyCFunction)py_netr_Credential_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5985             :         { NULL, NULL, 0, NULL }
    5986             : };
    5987             : 
    5988             : 
    5989             : static PyTypeObject netr_Credential_Type = {
    5990             :         PyVarObject_HEAD_INIT(NULL, 0)
    5991             :         .tp_name = "netlogon.netr_Credential",
    5992             :         .tp_getset = py_netr_Credential_getsetters,
    5993             :         .tp_methods = py_netr_Credential_methods,
    5994             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5995             :         .tp_new = py_netr_Credential_new,
    5996             : };
    5997             : 
    5998             : 
    5999           0 : static PyObject *py_netlogon_server_pipe_state_get_client_challenge(PyObject *obj, void *closure)
    6000             : {
    6001           0 :         struct netlogon_server_pipe_state *object = (struct netlogon_server_pipe_state *)pytalloc_get_ptr(obj);
    6002           0 :         PyObject *py_client_challenge;
    6003           0 :         py_client_challenge = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->client_challenge);
    6004           0 :         return py_client_challenge;
    6005             : }
    6006             : 
    6007           0 : static int py_netlogon_server_pipe_state_set_client_challenge(PyObject *py_obj, PyObject *value, void *closure)
    6008             : {
    6009           0 :         struct netlogon_server_pipe_state *object = (struct netlogon_server_pipe_state *)pytalloc_get_ptr(py_obj);
    6010           0 :         if (value == NULL) {
    6011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_challenge");
    6012           0 :                 return -1;
    6013             :         }
    6014           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
    6015           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6016           0 :                 PyErr_NoMemory();
    6017           0 :                 return -1;
    6018             :         }
    6019           0 :         object->client_challenge = *(struct netr_Credential *)pytalloc_get_ptr(value);
    6020           0 :         return 0;
    6021             : }
    6022             : 
    6023           0 : static PyObject *py_netlogon_server_pipe_state_get_server_challenge(PyObject *obj, void *closure)
    6024             : {
    6025           0 :         struct netlogon_server_pipe_state *object = (struct netlogon_server_pipe_state *)pytalloc_get_ptr(obj);
    6026           0 :         PyObject *py_server_challenge;
    6027           0 :         py_server_challenge = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->server_challenge);
    6028           0 :         return py_server_challenge;
    6029             : }
    6030             : 
    6031           0 : static int py_netlogon_server_pipe_state_set_server_challenge(PyObject *py_obj, PyObject *value, void *closure)
    6032             : {
    6033           0 :         struct netlogon_server_pipe_state *object = (struct netlogon_server_pipe_state *)pytalloc_get_ptr(py_obj);
    6034           0 :         if (value == NULL) {
    6035           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_challenge");
    6036           0 :                 return -1;
    6037             :         }
    6038           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
    6039           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6040           0 :                 PyErr_NoMemory();
    6041           0 :                 return -1;
    6042             :         }
    6043           0 :         object->server_challenge = *(struct netr_Credential *)pytalloc_get_ptr(value);
    6044           0 :         return 0;
    6045             : }
    6046             : 
    6047             : static PyGetSetDef py_netlogon_server_pipe_state_getsetters[] = {
    6048             :         {
    6049             :                 .name = discard_const_p(char, "client_challenge"),
    6050             :                 .get = py_netlogon_server_pipe_state_get_client_challenge,
    6051             :                 .set = py_netlogon_server_pipe_state_set_client_challenge,
    6052             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
    6053             :         },
    6054             :         {
    6055             :                 .name = discard_const_p(char, "server_challenge"),
    6056             :                 .get = py_netlogon_server_pipe_state_get_server_challenge,
    6057             :                 .set = py_netlogon_server_pipe_state_set_server_challenge,
    6058             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
    6059             :         },
    6060             :         { .name = NULL }
    6061             : };
    6062             : 
    6063           0 : static PyObject *py_netlogon_server_pipe_state_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6064             : {
    6065           0 :         return pytalloc_new(struct netlogon_server_pipe_state, type);
    6066             : }
    6067             : 
    6068           0 : static PyObject *py_netlogon_server_pipe_state_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6069             : {
    6070           0 :         struct netlogon_server_pipe_state *object = (struct netlogon_server_pipe_state *)pytalloc_get_ptr(py_obj);
    6071           0 :         PyObject *ret = NULL;
    6072           0 :         DATA_BLOB blob;
    6073           0 :         enum ndr_err_code err;
    6074           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6075           0 :         if (tmp_ctx == NULL) {
    6076           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6077           0 :                 return NULL;
    6078             :         }
    6079           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netlogon_server_pipe_state);
    6080           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6081           0 :                 TALLOC_FREE(tmp_ctx);
    6082           0 :                 PyErr_SetNdrError(err);
    6083           0 :                 return NULL;
    6084             :         }
    6085             : 
    6086           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6087           0 :         TALLOC_FREE(tmp_ctx);
    6088           0 :         return ret;
    6089             : }
    6090             : 
    6091           0 : static PyObject *py_netlogon_server_pipe_state_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6092             : {
    6093           0 :         struct netlogon_server_pipe_state *object = (struct netlogon_server_pipe_state *)pytalloc_get_ptr(py_obj);
    6094           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6095           0 :         Py_ssize_t blob_length = 0;
    6096           0 :         enum ndr_err_code err;
    6097           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6098           0 :         PyObject *allow_remaining_obj = NULL;
    6099           0 :         bool allow_remaining = false;
    6100             : 
    6101           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6102             :                 discard_const_p(char *, kwnames),
    6103             :                 &blob.data, &blob_length,
    6104             :                 &allow_remaining_obj)) {
    6105           0 :                 return NULL;
    6106             :         }
    6107           0 :         blob.length = blob_length;
    6108             : 
    6109           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6110           0 :                 allow_remaining = true;
    6111             :         }
    6112             : 
    6113           0 :         if (allow_remaining) {
    6114           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netlogon_server_pipe_state);
    6115             :         } else {
    6116           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netlogon_server_pipe_state);
    6117             :         }
    6118           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6119           0 :                 PyErr_SetNdrError(err);
    6120           0 :                 return NULL;
    6121             :         }
    6122             : 
    6123           0 :         Py_RETURN_NONE;
    6124             : }
    6125             : 
    6126           0 : static PyObject *py_netlogon_server_pipe_state_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6127             : {
    6128           0 :         struct netlogon_server_pipe_state *object = (struct netlogon_server_pipe_state *)pytalloc_get_ptr(py_obj);
    6129           0 :         PyObject *ret;
    6130           0 :         char *retstr;
    6131             : 
    6132           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netlogon_server_pipe_state, "netlogon_server_pipe_state", object);
    6133           0 :         ret = PyUnicode_FromString(retstr);
    6134           0 :         talloc_free(retstr);
    6135             : 
    6136           0 :         return ret;
    6137             : }
    6138             : 
    6139             : static PyMethodDef py_netlogon_server_pipe_state_methods[] = {
    6140             :         { "__ndr_pack__", (PyCFunction)py_netlogon_server_pipe_state_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6141             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netlogon_server_pipe_state_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6142             :         { "__ndr_print__", (PyCFunction)py_netlogon_server_pipe_state_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6143             :         { NULL, NULL, 0, NULL }
    6144             : };
    6145             : 
    6146             : 
    6147             : static PyTypeObject netlogon_server_pipe_state_Type = {
    6148             :         PyVarObject_HEAD_INIT(NULL, 0)
    6149             :         .tp_name = "netlogon.server_pipe_state",
    6150             :         .tp_getset = py_netlogon_server_pipe_state_getsetters,
    6151             :         .tp_methods = py_netlogon_server_pipe_state_methods,
    6152             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6153             :         .tp_new = py_netlogon_server_pipe_state_new,
    6154             : };
    6155             : 
    6156             : 
    6157          39 : static PyObject *py_netr_Authenticator_get_cred(PyObject *obj, void *closure)
    6158             : {
    6159          39 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(obj);
    6160           0 :         PyObject *py_cred;
    6161          39 :         py_cred = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->cred);
    6162          39 :         return py_cred;
    6163             : }
    6164             : 
    6165           0 : static int py_netr_Authenticator_set_cred(PyObject *py_obj, PyObject *value, void *closure)
    6166             : {
    6167           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6168           0 :         if (value == NULL) {
    6169           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cred");
    6170           0 :                 return -1;
    6171             :         }
    6172           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
    6173           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6174           0 :                 PyErr_NoMemory();
    6175           0 :                 return -1;
    6176             :         }
    6177           0 :         object->cred = *(struct netr_Credential *)pytalloc_get_ptr(value);
    6178           0 :         return 0;
    6179             : }
    6180             : 
    6181           0 : static PyObject *py_netr_Authenticator_get_timestamp(PyObject *obj, void *closure)
    6182             : {
    6183           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(obj);
    6184           0 :         PyObject *py_timestamp;
    6185           0 :         py_timestamp = PyLong_FromLong(object->timestamp);
    6186           0 :         return py_timestamp;
    6187             : }
    6188             : 
    6189          39 : static int py_netr_Authenticator_set_timestamp(PyObject *py_obj, PyObject *value, void *closure)
    6190             : {
    6191          39 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6192          39 :         if (value == NULL) {
    6193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timestamp");
    6194           0 :                 return -1;
    6195             :         }
    6196             :         {
    6197          39 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->timestamp));
    6198          39 :                 const long long int_min = -int_max - 1;
    6199          39 :                 if (PyLong_Check(value)) {
    6200           0 :                         long long test_var;
    6201          39 :                         test_var = PyLong_AsLongLong(value);
    6202          39 :                         if (PyErr_Occurred() != NULL) {
    6203           0 :                                 return -1;
    6204             :                         }
    6205          39 :                         if (test_var < int_min || test_var > int_max) {
    6206           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    6207             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    6208           0 :                                 return -1;
    6209             :                         }
    6210          39 :                         object->timestamp = test_var;
    6211             :                 } else {
    6212           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6213             :                           PyLong_Type.tp_name);
    6214           0 :                         return -1;
    6215             :                 }
    6216             :         }
    6217          39 :         return 0;
    6218             : }
    6219             : 
    6220             : static PyGetSetDef py_netr_Authenticator_getsetters[] = {
    6221             :         {
    6222             :                 .name = discard_const_p(char, "cred"),
    6223             :                 .get = py_netr_Authenticator_get_cred,
    6224             :                 .set = py_netr_Authenticator_set_cred,
    6225             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
    6226             :         },
    6227             :         {
    6228             :                 .name = discard_const_p(char, "timestamp"),
    6229             :                 .get = py_netr_Authenticator_get_timestamp,
    6230             :                 .set = py_netr_Authenticator_set_timestamp,
    6231             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
    6232             :         },
    6233             :         { .name = NULL }
    6234             : };
    6235             : 
    6236          78 : static PyObject *py_netr_Authenticator_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6237             : {
    6238          78 :         return pytalloc_new(struct netr_Authenticator, type);
    6239             : }
    6240             : 
    6241           0 : static PyObject *py_netr_Authenticator_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6242             : {
    6243           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6244           0 :         PyObject *ret = NULL;
    6245           0 :         DATA_BLOB blob;
    6246           0 :         enum ndr_err_code err;
    6247           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6248           0 :         if (tmp_ctx == NULL) {
    6249           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6250           0 :                 return NULL;
    6251             :         }
    6252           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Authenticator);
    6253           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6254           0 :                 TALLOC_FREE(tmp_ctx);
    6255           0 :                 PyErr_SetNdrError(err);
    6256           0 :                 return NULL;
    6257             :         }
    6258             : 
    6259           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6260           0 :         TALLOC_FREE(tmp_ctx);
    6261           0 :         return ret;
    6262             : }
    6263             : 
    6264           0 : static PyObject *py_netr_Authenticator_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6265             : {
    6266           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6267           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6268           0 :         Py_ssize_t blob_length = 0;
    6269           0 :         enum ndr_err_code err;
    6270           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6271           0 :         PyObject *allow_remaining_obj = NULL;
    6272           0 :         bool allow_remaining = false;
    6273             : 
    6274           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6275             :                 discard_const_p(char *, kwnames),
    6276             :                 &blob.data, &blob_length,
    6277             :                 &allow_remaining_obj)) {
    6278           0 :                 return NULL;
    6279             :         }
    6280           0 :         blob.length = blob_length;
    6281             : 
    6282           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6283           0 :                 allow_remaining = true;
    6284             :         }
    6285             : 
    6286           0 :         if (allow_remaining) {
    6287           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Authenticator);
    6288             :         } else {
    6289           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Authenticator);
    6290             :         }
    6291           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6292           0 :                 PyErr_SetNdrError(err);
    6293           0 :                 return NULL;
    6294             :         }
    6295             : 
    6296           0 :         Py_RETURN_NONE;
    6297             : }
    6298             : 
    6299           0 : static PyObject *py_netr_Authenticator_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6300             : {
    6301           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6302           0 :         PyObject *ret;
    6303           0 :         char *retstr;
    6304             : 
    6305           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Authenticator, "netr_Authenticator", object);
    6306           0 :         ret = PyUnicode_FromString(retstr);
    6307           0 :         talloc_free(retstr);
    6308             : 
    6309           0 :         return ret;
    6310             : }
    6311             : 
    6312             : static PyMethodDef py_netr_Authenticator_methods[] = {
    6313             :         { "__ndr_pack__", (PyCFunction)py_netr_Authenticator_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6314             :         { "__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" },
    6315             :         { "__ndr_print__", (PyCFunction)py_netr_Authenticator_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6316             :         { NULL, NULL, 0, NULL }
    6317             : };
    6318             : 
    6319             : 
    6320             : static PyTypeObject netr_Authenticator_Type = {
    6321             :         PyVarObject_HEAD_INIT(NULL, 0)
    6322             :         .tp_name = "netlogon.netr_Authenticator",
    6323             :         .tp_getset = py_netr_Authenticator_getsetters,
    6324             :         .tp_methods = py_netr_Authenticator_methods,
    6325             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6326             :         .tp_new = py_netr_Authenticator_new,
    6327             : };
    6328             : 
    6329             : 
    6330           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_account_name(PyObject *obj, void *closure)
    6331             : {
    6332           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6333           0 :         PyObject *py_account_name;
    6334           0 :         if (object->account_name == NULL) {
    6335           0 :                 Py_RETURN_NONE;
    6336             :         }
    6337           0 :         if (object->account_name == NULL) {
    6338           0 :                 py_account_name = Py_None;
    6339           0 :                 Py_INCREF(py_account_name);
    6340             :         } else {
    6341           0 :                 if (object->account_name == NULL) {
    6342           0 :                         py_account_name = Py_None;
    6343           0 :                         Py_INCREF(py_account_name);
    6344             :                 } else {
    6345           0 :                         py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
    6346             :                 }
    6347             :         }
    6348           0 :         return py_account_name;
    6349             : }
    6350             : 
    6351           0 : static int py_netr_DELTA_DELETE_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    6352             : {
    6353           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6354           0 :         if (value == NULL) {
    6355           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    6356           0 :                 return -1;
    6357             :         }
    6358           0 :         if (value == Py_None) {
    6359           0 :                 object->account_name = NULL;
    6360             :         } else {
    6361           0 :                 object->account_name = NULL;
    6362             :                 {
    6363           0 :                         const char *test_str;
    6364           0 :                         const char *talloc_str;
    6365           0 :                         PyObject *unicode = NULL;
    6366           0 :                         if (PyUnicode_Check(value)) {
    6367           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6368           0 :                                 if (unicode == NULL) {
    6369           0 :                                         PyErr_NoMemory();
    6370           0 :                                         return -1;
    6371             :                                 }
    6372           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6373           0 :                         } else if (PyBytes_Check(value)) {
    6374           0 :                                 test_str = PyBytes_AS_STRING(value);
    6375             :                         } else {
    6376           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6377           0 :                                 return -1;
    6378             :                         }
    6379           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6380           0 :                         if (unicode != NULL) {
    6381           0 :                                 Py_DECREF(unicode);
    6382             :                         }
    6383           0 :                         if (talloc_str == NULL) {
    6384           0 :                                 PyErr_NoMemory();
    6385           0 :                                 return -1;
    6386             :                         }
    6387           0 :                         object->account_name = talloc_str;
    6388             :                 }
    6389             :         }
    6390           0 :         return 0;
    6391             : }
    6392             : 
    6393           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown1(PyObject *obj, void *closure)
    6394             : {
    6395           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6396           0 :         PyObject *py_unknown1;
    6397           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
    6398           0 :         return py_unknown1;
    6399             : }
    6400             : 
    6401           0 : static int py_netr_DELTA_DELETE_USER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    6402             : {
    6403           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6404           0 :         if (value == NULL) {
    6405           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
    6406           0 :                 return -1;
    6407             :         }
    6408           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6409           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6410           0 :                 PyErr_NoMemory();
    6411           0 :                 return -1;
    6412             :         }
    6413           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6414           0 :         return 0;
    6415             : }
    6416             : 
    6417           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown2(PyObject *obj, void *closure)
    6418             : {
    6419           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6420           0 :         PyObject *py_unknown2;
    6421           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    6422           0 :         return py_unknown2;
    6423             : }
    6424             : 
    6425           0 : static int py_netr_DELTA_DELETE_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    6426             : {
    6427           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6428           0 :         if (value == NULL) {
    6429           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    6430           0 :                 return -1;
    6431             :         }
    6432           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6433           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6434           0 :                 PyErr_NoMemory();
    6435           0 :                 return -1;
    6436             :         }
    6437           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6438           0 :         return 0;
    6439             : }
    6440             : 
    6441           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown3(PyObject *obj, void *closure)
    6442             : {
    6443           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6444           0 :         PyObject *py_unknown3;
    6445           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    6446           0 :         return py_unknown3;
    6447             : }
    6448             : 
    6449           0 : static int py_netr_DELTA_DELETE_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    6450             : {
    6451           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6452           0 :         if (value == NULL) {
    6453           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    6454           0 :                 return -1;
    6455             :         }
    6456           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6457           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6458           0 :                 PyErr_NoMemory();
    6459           0 :                 return -1;
    6460             :         }
    6461           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6462           0 :         return 0;
    6463             : }
    6464             : 
    6465           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown4(PyObject *obj, void *closure)
    6466             : {
    6467           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6468           0 :         PyObject *py_unknown4;
    6469           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    6470           0 :         return py_unknown4;
    6471             : }
    6472             : 
    6473           0 : static int py_netr_DELTA_DELETE_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    6474             : {
    6475           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6476           0 :         if (value == NULL) {
    6477           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    6478           0 :                 return -1;
    6479             :         }
    6480           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6481           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6482           0 :                 PyErr_NoMemory();
    6483           0 :                 return -1;
    6484             :         }
    6485           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6486           0 :         return 0;
    6487             : }
    6488             : 
    6489           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown5(PyObject *obj, void *closure)
    6490             : {
    6491           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6492           0 :         PyObject *py_unknown5;
    6493           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
    6494           0 :         return py_unknown5;
    6495             : }
    6496             : 
    6497           0 : static int py_netr_DELTA_DELETE_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
    6498             : {
    6499           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6500           0 :         if (value == NULL) {
    6501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
    6502           0 :                 return -1;
    6503             :         }
    6504             :         {
    6505           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
    6506           0 :                 if (PyLong_Check(value)) {
    6507           0 :                         unsigned long long test_var;
    6508           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6509           0 :                         if (PyErr_Occurred() != NULL) {
    6510           0 :                                 return -1;
    6511             :                         }
    6512           0 :                         if (test_var > uint_max) {
    6513           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6514             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6515           0 :                                 return -1;
    6516             :                         }
    6517           0 :                         object->unknown5 = test_var;
    6518             :                 } else {
    6519           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6520             :                           PyLong_Type.tp_name);
    6521           0 :                         return -1;
    6522             :                 }
    6523             :         }
    6524           0 :         return 0;
    6525             : }
    6526             : 
    6527           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown6(PyObject *obj, void *closure)
    6528             : {
    6529           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6530           0 :         PyObject *py_unknown6;
    6531           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
    6532           0 :         return py_unknown6;
    6533             : }
    6534             : 
    6535           0 : static int py_netr_DELTA_DELETE_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    6536             : {
    6537           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6538           0 :         if (value == NULL) {
    6539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
    6540           0 :                 return -1;
    6541             :         }
    6542             :         {
    6543           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    6544           0 :                 if (PyLong_Check(value)) {
    6545           0 :                         unsigned long long test_var;
    6546           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6547           0 :                         if (PyErr_Occurred() != NULL) {
    6548           0 :                                 return -1;
    6549             :                         }
    6550           0 :                         if (test_var > uint_max) {
    6551           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6552             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6553           0 :                                 return -1;
    6554             :                         }
    6555           0 :                         object->unknown6 = test_var;
    6556             :                 } else {
    6557           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6558             :                           PyLong_Type.tp_name);
    6559           0 :                         return -1;
    6560             :                 }
    6561             :         }
    6562           0 :         return 0;
    6563             : }
    6564             : 
    6565           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown7(PyObject *obj, void *closure)
    6566             : {
    6567           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6568           0 :         PyObject *py_unknown7;
    6569           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
    6570           0 :         return py_unknown7;
    6571             : }
    6572             : 
    6573           0 : static int py_netr_DELTA_DELETE_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    6574             : {
    6575           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6576           0 :         if (value == NULL) {
    6577           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
    6578           0 :                 return -1;
    6579             :         }
    6580             :         {
    6581           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    6582           0 :                 if (PyLong_Check(value)) {
    6583           0 :                         unsigned long long test_var;
    6584           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6585           0 :                         if (PyErr_Occurred() != NULL) {
    6586           0 :                                 return -1;
    6587             :                         }
    6588           0 :                         if (test_var > uint_max) {
    6589           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6590             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6591           0 :                                 return -1;
    6592             :                         }
    6593           0 :                         object->unknown7 = test_var;
    6594             :                 } else {
    6595           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6596             :                           PyLong_Type.tp_name);
    6597           0 :                         return -1;
    6598             :                 }
    6599             :         }
    6600           0 :         return 0;
    6601             : }
    6602             : 
    6603           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown8(PyObject *obj, void *closure)
    6604             : {
    6605           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6606           0 :         PyObject *py_unknown8;
    6607           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
    6608           0 :         return py_unknown8;
    6609             : }
    6610             : 
    6611           0 : static int py_netr_DELTA_DELETE_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    6612             : {
    6613           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6614           0 :         if (value == NULL) {
    6615           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
    6616           0 :                 return -1;
    6617             :         }
    6618             :         {
    6619           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    6620           0 :                 if (PyLong_Check(value)) {
    6621           0 :                         unsigned long long test_var;
    6622           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6623           0 :                         if (PyErr_Occurred() != NULL) {
    6624           0 :                                 return -1;
    6625             :                         }
    6626           0 :                         if (test_var > uint_max) {
    6627           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6628             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6629           0 :                                 return -1;
    6630             :                         }
    6631           0 :                         object->unknown8 = test_var;
    6632             :                 } else {
    6633           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6634             :                           PyLong_Type.tp_name);
    6635           0 :                         return -1;
    6636             :                 }
    6637             :         }
    6638           0 :         return 0;
    6639             : }
    6640             : 
    6641             : static PyGetSetDef py_netr_DELTA_DELETE_USER_getsetters[] = {
    6642             :         {
    6643             :                 .name = discard_const_p(char, "account_name"),
    6644             :                 .get = py_netr_DELTA_DELETE_USER_get_account_name,
    6645             :                 .set = py_netr_DELTA_DELETE_USER_set_account_name,
    6646             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6647             :         },
    6648             :         {
    6649             :                 .name = discard_const_p(char, "unknown1"),
    6650             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown1,
    6651             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown1,
    6652             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6653             :         },
    6654             :         {
    6655             :                 .name = discard_const_p(char, "unknown2"),
    6656             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown2,
    6657             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown2,
    6658             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6659             :         },
    6660             :         {
    6661             :                 .name = discard_const_p(char, "unknown3"),
    6662             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown3,
    6663             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown3,
    6664             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6665             :         },
    6666             :         {
    6667             :                 .name = discard_const_p(char, "unknown4"),
    6668             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown4,
    6669             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown4,
    6670             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6671             :         },
    6672             :         {
    6673             :                 .name = discard_const_p(char, "unknown5"),
    6674             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown5,
    6675             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown5,
    6676             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6677             :         },
    6678             :         {
    6679             :                 .name = discard_const_p(char, "unknown6"),
    6680             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown6,
    6681             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown6,
    6682             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6683             :         },
    6684             :         {
    6685             :                 .name = discard_const_p(char, "unknown7"),
    6686             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown7,
    6687             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown7,
    6688             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6689             :         },
    6690             :         {
    6691             :                 .name = discard_const_p(char, "unknown8"),
    6692             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown8,
    6693             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown8,
    6694             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6695             :         },
    6696             :         { .name = NULL }
    6697             : };
    6698             : 
    6699           0 : static PyObject *py_netr_DELTA_DELETE_USER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6700             : {
    6701           0 :         return pytalloc_new(struct netr_DELTA_DELETE_USER, type);
    6702             : }
    6703             : 
    6704             : 
    6705             : static PyTypeObject netr_DELTA_DELETE_USER_Type = {
    6706             :         PyVarObject_HEAD_INIT(NULL, 0)
    6707             :         .tp_name = "netlogon.netr_DELTA_DELETE_USER",
    6708             :         .tp_getset = py_netr_DELTA_DELETE_USER_getsetters,
    6709             :         .tp_methods = NULL,
    6710             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6711             :         .tp_new = py_netr_DELTA_DELETE_USER_new,
    6712             : };
    6713             : 
    6714             : 
    6715           0 : static PyObject *py_netr_USER_KEY16_get_length(PyObject *obj, void *closure)
    6716             : {
    6717           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6718           0 :         PyObject *py_length;
    6719           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
    6720           0 :         return py_length;
    6721             : }
    6722             : 
    6723           0 : static int py_netr_USER_KEY16_set_length(PyObject *py_obj, PyObject *value, void *closure)
    6724             : {
    6725           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6726           0 :         if (value == NULL) {
    6727           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    6728           0 :                 return -1;
    6729             :         }
    6730             :         {
    6731           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    6732           0 :                 if (PyLong_Check(value)) {
    6733           0 :                         unsigned long long test_var;
    6734           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6735           0 :                         if (PyErr_Occurred() != NULL) {
    6736           0 :                                 return -1;
    6737             :                         }
    6738           0 :                         if (test_var > uint_max) {
    6739           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6740             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6741           0 :                                 return -1;
    6742             :                         }
    6743           0 :                         object->length = test_var;
    6744             :                 } else {
    6745           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6746             :                           PyLong_Type.tp_name);
    6747           0 :                         return -1;
    6748             :                 }
    6749             :         }
    6750           0 :         return 0;
    6751             : }
    6752             : 
    6753           0 : static PyObject *py_netr_USER_KEY16_get_size(PyObject *obj, void *closure)
    6754             : {
    6755           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6756           0 :         PyObject *py_size;
    6757           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
    6758           0 :         return py_size;
    6759             : }
    6760             : 
    6761           0 : static int py_netr_USER_KEY16_set_size(PyObject *py_obj, PyObject *value, void *closure)
    6762             : {
    6763           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6764           0 :         if (value == NULL) {
    6765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
    6766           0 :                 return -1;
    6767             :         }
    6768             :         {
    6769           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    6770           0 :                 if (PyLong_Check(value)) {
    6771           0 :                         unsigned long long test_var;
    6772           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6773           0 :                         if (PyErr_Occurred() != NULL) {
    6774           0 :                                 return -1;
    6775             :                         }
    6776           0 :                         if (test_var > uint_max) {
    6777           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6778             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6779           0 :                                 return -1;
    6780             :                         }
    6781           0 :                         object->size = test_var;
    6782             :                 } else {
    6783           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6784             :                           PyLong_Type.tp_name);
    6785           0 :                         return -1;
    6786             :                 }
    6787             :         }
    6788           0 :         return 0;
    6789             : }
    6790             : 
    6791           0 : static PyObject *py_netr_USER_KEY16_get_flags(PyObject *obj, void *closure)
    6792             : {
    6793           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6794           0 :         PyObject *py_flags;
    6795           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
    6796           0 :         return py_flags;
    6797             : }
    6798             : 
    6799           0 : static int py_netr_USER_KEY16_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    6800             : {
    6801           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6802           0 :         if (value == NULL) {
    6803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
    6804           0 :                 return -1;
    6805             :         }
    6806             :         {
    6807           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    6808           0 :                 if (PyLong_Check(value)) {
    6809           0 :                         unsigned long long test_var;
    6810           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6811           0 :                         if (PyErr_Occurred() != NULL) {
    6812           0 :                                 return -1;
    6813             :                         }
    6814           0 :                         if (test_var > uint_max) {
    6815           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6816             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6817           0 :                                 return -1;
    6818             :                         }
    6819           0 :                         object->flags = test_var;
    6820             :                 } else {
    6821           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6822             :                           PyLong_Type.tp_name);
    6823           0 :                         return -1;
    6824             :                 }
    6825             :         }
    6826           0 :         return 0;
    6827             : }
    6828             : 
    6829           0 : static PyObject *py_netr_USER_KEY16_get_pwd(PyObject *obj, void *closure)
    6830             : {
    6831           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6832           0 :         PyObject *py_pwd;
    6833           0 :         py_pwd = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->pwd);
    6834           0 :         return py_pwd;
    6835             : }
    6836             : 
    6837           0 : static int py_netr_USER_KEY16_set_pwd(PyObject *py_obj, PyObject *value, void *closure)
    6838             : {
    6839           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6840           0 :         if (value == NULL) {
    6841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwd");
    6842           0 :                 return -1;
    6843             :         }
    6844           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    6845           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6846           0 :                 PyErr_NoMemory();
    6847           0 :                 return -1;
    6848             :         }
    6849           0 :         object->pwd = *(struct samr_Password *)pytalloc_get_ptr(value);
    6850           0 :         return 0;
    6851             : }
    6852             : 
    6853             : static PyGetSetDef py_netr_USER_KEY16_getsetters[] = {
    6854             :         {
    6855             :                 .name = discard_const_p(char, "length"),
    6856             :                 .get = py_netr_USER_KEY16_get_length,
    6857             :                 .set = py_netr_USER_KEY16_set_length,
    6858             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6859             :         },
    6860             :         {
    6861             :                 .name = discard_const_p(char, "size"),
    6862             :                 .get = py_netr_USER_KEY16_get_size,
    6863             :                 .set = py_netr_USER_KEY16_set_size,
    6864             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6865             :         },
    6866             :         {
    6867             :                 .name = discard_const_p(char, "flags"),
    6868             :                 .get = py_netr_USER_KEY16_get_flags,
    6869             :                 .set = py_netr_USER_KEY16_set_flags,
    6870             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6871             :         },
    6872             :         {
    6873             :                 .name = discard_const_p(char, "pwd"),
    6874             :                 .get = py_netr_USER_KEY16_get_pwd,
    6875             :                 .set = py_netr_USER_KEY16_set_pwd,
    6876             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    6877             :         },
    6878             :         { .name = NULL }
    6879             : };
    6880             : 
    6881           0 : static PyObject *py_netr_USER_KEY16_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6882             : {
    6883           0 :         return pytalloc_new(struct netr_USER_KEY16, type);
    6884             : }
    6885             : 
    6886             : 
    6887             : static PyTypeObject netr_USER_KEY16_Type = {
    6888             :         PyVarObject_HEAD_INIT(NULL, 0)
    6889             :         .tp_name = "netlogon.netr_USER_KEY16",
    6890             :         .tp_getset = py_netr_USER_KEY16_getsetters,
    6891             :         .tp_methods = NULL,
    6892             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6893             :         .tp_new = py_netr_USER_KEY16_new,
    6894             : };
    6895             : 
    6896             : 
    6897           0 : static PyObject *py_netr_PasswordHistory_get_nt_length(PyObject *obj, void *closure)
    6898             : {
    6899           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6900           0 :         PyObject *py_nt_length;
    6901           0 :         py_nt_length = PyLong_FromLong((uint16_t)object->nt_length);
    6902           0 :         return py_nt_length;
    6903             : }
    6904             : 
    6905           0 : static int py_netr_PasswordHistory_set_nt_length(PyObject *py_obj, PyObject *value, void *closure)
    6906             : {
    6907           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6908           0 :         if (value == NULL) {
    6909           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_length");
    6910           0 :                 return -1;
    6911             :         }
    6912             :         {
    6913           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_length));
    6914           0 :                 if (PyLong_Check(value)) {
    6915           0 :                         unsigned long long test_var;
    6916           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6917           0 :                         if (PyErr_Occurred() != NULL) {
    6918           0 :                                 return -1;
    6919             :                         }
    6920           0 :                         if (test_var > uint_max) {
    6921           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6922             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6923           0 :                                 return -1;
    6924             :                         }
    6925           0 :                         object->nt_length = test_var;
    6926             :                 } else {
    6927           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6928             :                           PyLong_Type.tp_name);
    6929           0 :                         return -1;
    6930             :                 }
    6931             :         }
    6932           0 :         return 0;
    6933             : }
    6934             : 
    6935           0 : static PyObject *py_netr_PasswordHistory_get_nt_size(PyObject *obj, void *closure)
    6936             : {
    6937           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6938           0 :         PyObject *py_nt_size;
    6939           0 :         py_nt_size = PyLong_FromLong((uint16_t)object->nt_size);
    6940           0 :         return py_nt_size;
    6941             : }
    6942             : 
    6943           0 : static int py_netr_PasswordHistory_set_nt_size(PyObject *py_obj, PyObject *value, void *closure)
    6944             : {
    6945           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6946           0 :         if (value == NULL) {
    6947           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_size");
    6948           0 :                 return -1;
    6949             :         }
    6950             :         {
    6951           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_size));
    6952           0 :                 if (PyLong_Check(value)) {
    6953           0 :                         unsigned long long test_var;
    6954           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6955           0 :                         if (PyErr_Occurred() != NULL) {
    6956           0 :                                 return -1;
    6957             :                         }
    6958           0 :                         if (test_var > uint_max) {
    6959           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6960             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6961           0 :                                 return -1;
    6962             :                         }
    6963           0 :                         object->nt_size = test_var;
    6964             :                 } else {
    6965           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6966             :                           PyLong_Type.tp_name);
    6967           0 :                         return -1;
    6968             :                 }
    6969             :         }
    6970           0 :         return 0;
    6971             : }
    6972             : 
    6973           0 : static PyObject *py_netr_PasswordHistory_get_nt_flags(PyObject *obj, void *closure)
    6974             : {
    6975           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6976           0 :         PyObject *py_nt_flags;
    6977           0 :         py_nt_flags = PyLong_FromUnsignedLongLong((uint32_t)object->nt_flags);
    6978           0 :         return py_nt_flags;
    6979             : }
    6980             : 
    6981           0 : static int py_netr_PasswordHistory_set_nt_flags(PyObject *py_obj, PyObject *value, void *closure)
    6982             : {
    6983           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6984           0 :         if (value == NULL) {
    6985           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_flags");
    6986           0 :                 return -1;
    6987             :         }
    6988             :         {
    6989           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_flags));
    6990           0 :                 if (PyLong_Check(value)) {
    6991           0 :                         unsigned long long test_var;
    6992           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6993           0 :                         if (PyErr_Occurred() != NULL) {
    6994           0 :                                 return -1;
    6995             :                         }
    6996           0 :                         if (test_var > uint_max) {
    6997           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6998             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6999           0 :                                 return -1;
    7000             :                         }
    7001           0 :                         object->nt_flags = test_var;
    7002             :                 } else {
    7003           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7004             :                           PyLong_Type.tp_name);
    7005           0 :                         return -1;
    7006             :                 }
    7007             :         }
    7008           0 :         return 0;
    7009             : }
    7010             : 
    7011           0 : static PyObject *py_netr_PasswordHistory_get_lm_length(PyObject *obj, void *closure)
    7012             : {
    7013           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    7014           0 :         PyObject *py_lm_length;
    7015           0 :         py_lm_length = PyLong_FromLong((uint16_t)object->lm_length);
    7016           0 :         return py_lm_length;
    7017             : }
    7018             : 
    7019           0 : static int py_netr_PasswordHistory_set_lm_length(PyObject *py_obj, PyObject *value, void *closure)
    7020             : {
    7021           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    7022           0 :         if (value == NULL) {
    7023           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_length");
    7024           0 :                 return -1;
    7025             :         }
    7026             :         {
    7027           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_length));
    7028           0 :                 if (PyLong_Check(value)) {
    7029           0 :                         unsigned long long test_var;
    7030           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7031           0 :                         if (PyErr_Occurred() != NULL) {
    7032           0 :                                 return -1;
    7033             :                         }
    7034           0 :                         if (test_var > uint_max) {
    7035           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7036             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7037           0 :                                 return -1;
    7038             :                         }
    7039           0 :                         object->lm_length = test_var;
    7040             :                 } else {
    7041           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7042             :                           PyLong_Type.tp_name);
    7043           0 :                         return -1;
    7044             :                 }
    7045             :         }
    7046           0 :         return 0;
    7047             : }
    7048             : 
    7049           0 : static PyObject *py_netr_PasswordHistory_get_lm_size(PyObject *obj, void *closure)
    7050             : {
    7051           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    7052           0 :         PyObject *py_lm_size;
    7053           0 :         py_lm_size = PyLong_FromLong((uint16_t)object->lm_size);
    7054           0 :         return py_lm_size;
    7055             : }
    7056             : 
    7057           0 : static int py_netr_PasswordHistory_set_lm_size(PyObject *py_obj, PyObject *value, void *closure)
    7058             : {
    7059           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    7060           0 :         if (value == NULL) {
    7061           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_size");
    7062           0 :                 return -1;
    7063             :         }
    7064             :         {
    7065           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_size));
    7066           0 :                 if (PyLong_Check(value)) {
    7067           0 :                         unsigned long long test_var;
    7068           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    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_size = 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           0 :         return 0;
    7085             : }
    7086             : 
    7087           0 : static PyObject *py_netr_PasswordHistory_get_lm_flags(PyObject *obj, void *closure)
    7088             : {
    7089           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    7090           0 :         PyObject *py_lm_flags;
    7091           0 :         py_lm_flags = PyLong_FromUnsignedLongLong((uint32_t)object->lm_flags);
    7092           0 :         return py_lm_flags;
    7093             : }
    7094             : 
    7095           0 : static int py_netr_PasswordHistory_set_lm_flags(PyObject *py_obj, PyObject *value, void *closure)
    7096             : {
    7097           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    7098           0 :         if (value == NULL) {
    7099           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_flags");
    7100           0 :                 return -1;
    7101             :         }
    7102             :         {
    7103           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_flags));
    7104           0 :                 if (PyLong_Check(value)) {
    7105           0 :                         unsigned long long test_var;
    7106           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7107           0 :                         if (PyErr_Occurred() != NULL) {
    7108           0 :                                 return -1;
    7109             :                         }
    7110           0 :                         if (test_var > uint_max) {
    7111           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7112             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7113           0 :                                 return -1;
    7114             :                         }
    7115           0 :                         object->lm_flags = test_var;
    7116             :                 } else {
    7117           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7118             :                           PyLong_Type.tp_name);
    7119           0 :                         return -1;
    7120             :                 }
    7121             :         }
    7122           0 :         return 0;
    7123             : }
    7124             : 
    7125           0 : static PyObject *py_netr_PasswordHistory_get_nt_history(PyObject *obj, void *closure)
    7126             : {
    7127           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    7128           0 :         PyObject *py_nt_history;
    7129           0 :         py_nt_history = PyList_New(object->nt_length);
    7130           0 :         if (py_nt_history == NULL) {
    7131           0 :                 return NULL;
    7132             :         }
    7133             :         {
    7134             :                 int nt_history_cntr_0;
    7135           0 :                 for (nt_history_cntr_0 = 0; nt_history_cntr_0 < (object->nt_length); nt_history_cntr_0++) {
    7136           0 :                         PyObject *py_nt_history_0;
    7137           0 :                         py_nt_history_0 = PyLong_FromLong((uint16_t)object->nt_history[nt_history_cntr_0]);
    7138           0 :                         PyList_SetItem(py_nt_history, nt_history_cntr_0, py_nt_history_0);
    7139             :                 }
    7140             :         }
    7141           0 :         return py_nt_history;
    7142             : }
    7143             : 
    7144           0 : static int py_netr_PasswordHistory_set_nt_history(PyObject *py_obj, PyObject *value, void *closure)
    7145             : {
    7146           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    7147           0 :         if (value == NULL) {
    7148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_history");
    7149           0 :                 return -1;
    7150             :         }
    7151           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7152             :         {
    7153           0 :                 int nt_history_cntr_0;
    7154           0 :                 object->nt_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->nt_history, PyList_GET_SIZE(value));
    7155           0 :                 if (!object->nt_history) { return -1; }
    7156           0 :                 talloc_set_name_const(object->nt_history, "ARRAY: object->nt_history");
    7157           0 :                 for (nt_history_cntr_0 = 0; nt_history_cntr_0 < PyList_GET_SIZE(value); nt_history_cntr_0++) {
    7158           0 :                         if (PyList_GET_ITEM(value, nt_history_cntr_0) == NULL) {
    7159           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_history[nt_history_cntr_0]");
    7160           0 :                                 return -1;
    7161             :                         }
    7162             :                         {
    7163           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_history[nt_history_cntr_0]));
    7164           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, nt_history_cntr_0))) {
    7165           0 :                                         unsigned long long test_var;
    7166           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, nt_history_cntr_0));
    7167           0 :                                         if (PyErr_Occurred() != NULL) {
    7168           0 :                                                 return -1;
    7169             :                                         }
    7170           0 :                                         if (test_var > uint_max) {
    7171           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7172             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    7173           0 :                                                 return -1;
    7174             :                                         }
    7175           0 :                                         object->nt_history[nt_history_cntr_0] = test_var;
    7176             :                                 } else {
    7177           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7178             :                                           PyLong_Type.tp_name);
    7179           0 :                                         return -1;
    7180             :                                 }
    7181             :                         }
    7182             :                 }
    7183             :         }
    7184           0 :         return 0;
    7185             : }
    7186             : 
    7187           0 : static PyObject *py_netr_PasswordHistory_get_lm_history(PyObject *obj, void *closure)
    7188             : {
    7189           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    7190           0 :         PyObject *py_lm_history;
    7191           0 :         py_lm_history = PyList_New(object->lm_length);
    7192           0 :         if (py_lm_history == NULL) {
    7193           0 :                 return NULL;
    7194             :         }
    7195             :         {
    7196             :                 int lm_history_cntr_0;
    7197           0 :                 for (lm_history_cntr_0 = 0; lm_history_cntr_0 < (object->lm_length); lm_history_cntr_0++) {
    7198           0 :                         PyObject *py_lm_history_0;
    7199           0 :                         py_lm_history_0 = PyLong_FromLong((uint16_t)object->lm_history[lm_history_cntr_0]);
    7200           0 :                         PyList_SetItem(py_lm_history, lm_history_cntr_0, py_lm_history_0);
    7201             :                 }
    7202             :         }
    7203           0 :         return py_lm_history;
    7204             : }
    7205             : 
    7206           0 : static int py_netr_PasswordHistory_set_lm_history(PyObject *py_obj, PyObject *value, void *closure)
    7207             : {
    7208           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    7209           0 :         if (value == NULL) {
    7210           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_history");
    7211           0 :                 return -1;
    7212             :         }
    7213           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7214             :         {
    7215           0 :                 int lm_history_cntr_0;
    7216           0 :                 object->lm_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->lm_history, PyList_GET_SIZE(value));
    7217           0 :                 if (!object->lm_history) { return -1; }
    7218           0 :                 talloc_set_name_const(object->lm_history, "ARRAY: object->lm_history");
    7219           0 :                 for (lm_history_cntr_0 = 0; lm_history_cntr_0 < PyList_GET_SIZE(value); lm_history_cntr_0++) {
    7220           0 :                         if (PyList_GET_ITEM(value, lm_history_cntr_0) == NULL) {
    7221           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_history[lm_history_cntr_0]");
    7222           0 :                                 return -1;
    7223             :                         }
    7224             :                         {
    7225           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_history[lm_history_cntr_0]));
    7226           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, lm_history_cntr_0))) {
    7227           0 :                                         unsigned long long test_var;
    7228           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, lm_history_cntr_0));
    7229           0 :                                         if (PyErr_Occurred() != NULL) {
    7230           0 :                                                 return -1;
    7231             :                                         }
    7232           0 :                                         if (test_var > uint_max) {
    7233           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7234             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    7235           0 :                                                 return -1;
    7236             :                                         }
    7237           0 :                                         object->lm_history[lm_history_cntr_0] = test_var;
    7238             :                                 } else {
    7239           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7240             :                                           PyLong_Type.tp_name);
    7241           0 :                                         return -1;
    7242             :                                 }
    7243             :                         }
    7244             :                 }
    7245             :         }
    7246           0 :         return 0;
    7247             : }
    7248             : 
    7249             : static PyGetSetDef py_netr_PasswordHistory_getsetters[] = {
    7250             :         {
    7251             :                 .name = discard_const_p(char, "nt_length"),
    7252             :                 .get = py_netr_PasswordHistory_get_nt_length,
    7253             :                 .set = py_netr_PasswordHistory_set_nt_length,
    7254             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7255             :         },
    7256             :         {
    7257             :                 .name = discard_const_p(char, "nt_size"),
    7258             :                 .get = py_netr_PasswordHistory_get_nt_size,
    7259             :                 .set = py_netr_PasswordHistory_set_nt_size,
    7260             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7261             :         },
    7262             :         {
    7263             :                 .name = discard_const_p(char, "nt_flags"),
    7264             :                 .get = py_netr_PasswordHistory_get_nt_flags,
    7265             :                 .set = py_netr_PasswordHistory_set_nt_flags,
    7266             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7267             :         },
    7268             :         {
    7269             :                 .name = discard_const_p(char, "lm_length"),
    7270             :                 .get = py_netr_PasswordHistory_get_lm_length,
    7271             :                 .set = py_netr_PasswordHistory_set_lm_length,
    7272             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7273             :         },
    7274             :         {
    7275             :                 .name = discard_const_p(char, "lm_size"),
    7276             :                 .get = py_netr_PasswordHistory_get_lm_size,
    7277             :                 .set = py_netr_PasswordHistory_set_lm_size,
    7278             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7279             :         },
    7280             :         {
    7281             :                 .name = discard_const_p(char, "lm_flags"),
    7282             :                 .get = py_netr_PasswordHistory_get_lm_flags,
    7283             :                 .set = py_netr_PasswordHistory_set_lm_flags,
    7284             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7285             :         },
    7286             :         {
    7287             :                 .name = discard_const_p(char, "nt_history"),
    7288             :                 .get = py_netr_PasswordHistory_get_nt_history,
    7289             :                 .set = py_netr_PasswordHistory_set_nt_history,
    7290             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7291             :         },
    7292             :         {
    7293             :                 .name = discard_const_p(char, "lm_history"),
    7294             :                 .get = py_netr_PasswordHistory_get_lm_history,
    7295             :                 .set = py_netr_PasswordHistory_set_lm_history,
    7296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7297             :         },
    7298             :         { .name = NULL }
    7299             : };
    7300             : 
    7301           0 : static PyObject *py_netr_PasswordHistory_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7302             : {
    7303           0 :         return pytalloc_new(struct netr_PasswordHistory, type);
    7304             : }
    7305             : 
    7306             : 
    7307             : static PyTypeObject netr_PasswordHistory_Type = {
    7308             :         PyVarObject_HEAD_INIT(NULL, 0)
    7309             :         .tp_name = "netlogon.netr_PasswordHistory",
    7310             :         .tp_getset = py_netr_PasswordHistory_getsetters,
    7311             :         .tp_methods = NULL,
    7312             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7313             :         .tp_new = py_netr_PasswordHistory_new,
    7314             : };
    7315             : 
    7316             : 
    7317           0 : static PyObject *py_netr_USER_KEYS2_get_lmpassword(PyObject *obj, void *closure)
    7318             : {
    7319           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(obj);
    7320           0 :         PyObject *py_lmpassword;
    7321           0 :         py_lmpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    7322           0 :         return py_lmpassword;
    7323             : }
    7324             : 
    7325           0 : static int py_netr_USER_KEYS2_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    7326             : {
    7327           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(py_obj);
    7328           0 :         if (value == NULL) {
    7329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmpassword");
    7330           0 :                 return -1;
    7331             :         }
    7332           0 :         PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
    7333           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7334           0 :                 PyErr_NoMemory();
    7335           0 :                 return -1;
    7336             :         }
    7337           0 :         object->lmpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
    7338           0 :         return 0;
    7339             : }
    7340             : 
    7341           0 : static PyObject *py_netr_USER_KEYS2_get_ntpassword(PyObject *obj, void *closure)
    7342             : {
    7343           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(obj);
    7344           0 :         PyObject *py_ntpassword;
    7345           0 :         py_ntpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    7346           0 :         return py_ntpassword;
    7347             : }
    7348             : 
    7349           0 : static int py_netr_USER_KEYS2_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    7350             : {
    7351           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(py_obj);
    7352           0 :         if (value == NULL) {
    7353           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntpassword");
    7354           0 :                 return -1;
    7355             :         }
    7356           0 :         PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
    7357           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7358           0 :                 PyErr_NoMemory();
    7359           0 :                 return -1;
    7360             :         }
    7361           0 :         object->ntpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
    7362           0 :         return 0;
    7363             : }
    7364             : 
    7365           0 : static PyObject *py_netr_USER_KEYS2_get_history(PyObject *obj, void *closure)
    7366             : {
    7367           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(obj);
    7368           0 :         PyObject *py_history;
    7369           0 :         py_history = pytalloc_reference_ex(&netr_PasswordHistory_Type, pytalloc_get_mem_ctx(obj), &object->history);
    7370           0 :         return py_history;
    7371             : }
    7372             : 
    7373           0 : static int py_netr_USER_KEYS2_set_history(PyObject *py_obj, PyObject *value, void *closure)
    7374             : {
    7375           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(py_obj);
    7376           0 :         if (value == NULL) {
    7377           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->history");
    7378           0 :                 return -1;
    7379             :         }
    7380           0 :         PY_CHECK_TYPE(&netr_PasswordHistory_Type, value, return -1;);
    7381           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7382           0 :                 PyErr_NoMemory();
    7383           0 :                 return -1;
    7384             :         }
    7385           0 :         object->history = *(struct netr_PasswordHistory *)pytalloc_get_ptr(value);
    7386           0 :         return 0;
    7387             : }
    7388             : 
    7389             : static PyGetSetDef py_netr_USER_KEYS2_getsetters[] = {
    7390             :         {
    7391             :                 .name = discard_const_p(char, "lmpassword"),
    7392             :                 .get = py_netr_USER_KEYS2_get_lmpassword,
    7393             :                 .set = py_netr_USER_KEYS2_set_lmpassword,
    7394             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
    7395             :         },
    7396             :         {
    7397             :                 .name = discard_const_p(char, "ntpassword"),
    7398             :                 .get = py_netr_USER_KEYS2_get_ntpassword,
    7399             :                 .set = py_netr_USER_KEYS2_set_ntpassword,
    7400             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
    7401             :         },
    7402             :         {
    7403             :                 .name = discard_const_p(char, "history"),
    7404             :                 .get = py_netr_USER_KEYS2_get_history,
    7405             :                 .set = py_netr_USER_KEYS2_set_history,
    7406             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_PasswordHistory")
    7407             :         },
    7408             :         { .name = NULL }
    7409             : };
    7410             : 
    7411           0 : static PyObject *py_netr_USER_KEYS2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7412             : {
    7413           0 :         return pytalloc_new(struct netr_USER_KEYS2, type);
    7414             : }
    7415             : 
    7416             : 
    7417             : static PyTypeObject netr_USER_KEYS2_Type = {
    7418             :         PyVarObject_HEAD_INIT(NULL, 0)
    7419             :         .tp_name = "netlogon.netr_USER_KEYS2",
    7420             :         .tp_getset = py_netr_USER_KEYS2_getsetters,
    7421             :         .tp_methods = NULL,
    7422             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7423             :         .tp_new = py_netr_USER_KEYS2_new,
    7424             : };
    7425             : 
    7426             : 
    7427           0 : static PyObject *py_netr_USER_KEY_UNION_get_keys2(PyObject *obj, void *closure)
    7428             : {
    7429           0 :         struct netr_USER_KEY_UNION *object = (struct netr_USER_KEY_UNION *)pytalloc_get_ptr(obj);
    7430           0 :         PyObject *py_keys2;
    7431           0 :         py_keys2 = pytalloc_reference_ex(&netr_USER_KEYS2_Type, pytalloc_get_mem_ctx(obj), &object->keys2);
    7432           0 :         return py_keys2;
    7433             : }
    7434             : 
    7435           0 : static int py_netr_USER_KEY_UNION_set_keys2(PyObject *py_obj, PyObject *value, void *closure)
    7436             : {
    7437           0 :         struct netr_USER_KEY_UNION *object = (struct netr_USER_KEY_UNION *)pytalloc_get_ptr(py_obj);
    7438           0 :         if (value == NULL) {
    7439           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keys2");
    7440           0 :                 return -1;
    7441             :         }
    7442           0 :         PY_CHECK_TYPE(&netr_USER_KEYS2_Type, value, return -1;);
    7443           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7444           0 :                 PyErr_NoMemory();
    7445           0 :                 return -1;
    7446             :         }
    7447           0 :         object->keys2 = *(struct netr_USER_KEYS2 *)pytalloc_get_ptr(value);
    7448           0 :         return 0;
    7449             : }
    7450             : 
    7451             : static PyGetSetDef py_netr_USER_KEY_UNION_getsetters[] = {
    7452             :         {
    7453             :                 .name = discard_const_p(char, "keys2"),
    7454             :                 .get = py_netr_USER_KEY_UNION_get_keys2,
    7455             :                 .set = py_netr_USER_KEY_UNION_set_keys2,
    7456             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEYS2")
    7457             :         },
    7458             :         { .name = NULL }
    7459             : };
    7460             : 
    7461           0 : static PyObject *py_netr_USER_KEY_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7462             : {
    7463           0 :         return pytalloc_new(struct netr_USER_KEY_UNION, type);
    7464             : }
    7465             : 
    7466             : 
    7467             : static PyTypeObject netr_USER_KEY_UNION_Type = {
    7468             :         PyVarObject_HEAD_INIT(NULL, 0)
    7469             :         .tp_name = "netlogon.netr_USER_KEY_UNION",
    7470             :         .tp_getset = py_netr_USER_KEY_UNION_getsetters,
    7471             :         .tp_methods = NULL,
    7472             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7473             :         .tp_new = py_netr_USER_KEY_UNION_new,
    7474             : };
    7475             : 
    7476             : 
    7477           0 : static PyObject *py_netr_USER_KEYS_get_version(PyObject *obj, void *closure)
    7478             : {
    7479           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(obj);
    7480           0 :         PyObject *py_version;
    7481           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
    7482           0 :         return py_version;
    7483             : }
    7484             : 
    7485           0 : static int py_netr_USER_KEYS_set_version(PyObject *py_obj, PyObject *value, void *closure)
    7486             : {
    7487           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7488           0 :         if (value == NULL) {
    7489           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    7490           0 :                 return -1;
    7491             :         }
    7492             :         {
    7493           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    7494           0 :                 if (PyLong_Check(value)) {
    7495           0 :                         unsigned long long test_var;
    7496           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7497           0 :                         if (PyErr_Occurred() != NULL) {
    7498           0 :                                 return -1;
    7499             :                         }
    7500           0 :                         if (test_var > uint_max) {
    7501           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7502             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7503           0 :                                 return -1;
    7504             :                         }
    7505           0 :                         object->version = test_var;
    7506             :                 } else {
    7507           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7508             :                           PyLong_Type.tp_name);
    7509           0 :                         return -1;
    7510             :                 }
    7511             :         }
    7512           0 :         return 0;
    7513             : }
    7514             : 
    7515           0 : static PyObject *py_netr_USER_KEYS_get_keys(PyObject *obj, void *closure)
    7516             : {
    7517           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(obj);
    7518           0 :         PyObject *py_keys;
    7519           0 :         py_keys = pytalloc_reference_ex(&netr_USER_KEY_UNION_Type, pytalloc_get_mem_ctx(obj), &object->keys);
    7520           0 :         return py_keys;
    7521             : }
    7522             : 
    7523           0 : static int py_netr_USER_KEYS_set_keys(PyObject *py_obj, PyObject *value, void *closure)
    7524             : {
    7525           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7526           0 :         if (value == NULL) {
    7527           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keys");
    7528           0 :                 return -1;
    7529             :         }
    7530           0 :         PY_CHECK_TYPE(&netr_USER_KEY_UNION_Type, value, return -1;);
    7531           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7532           0 :                 PyErr_NoMemory();
    7533           0 :                 return -1;
    7534             :         }
    7535           0 :         object->keys = *(struct netr_USER_KEY_UNION *)pytalloc_get_ptr(value);
    7536           0 :         return 0;
    7537             : }
    7538             : 
    7539             : static PyGetSetDef py_netr_USER_KEYS_getsetters[] = {
    7540             :         {
    7541             :                 .name = discard_const_p(char, "version"),
    7542             :                 .get = py_netr_USER_KEYS_get_version,
    7543             :                 .set = py_netr_USER_KEYS_set_version,
    7544             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7545             :         },
    7546             :         {
    7547             :                 .name = discard_const_p(char, "keys"),
    7548             :                 .get = py_netr_USER_KEYS_get_keys,
    7549             :                 .set = py_netr_USER_KEYS_set_keys,
    7550             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY_UNION")
    7551             :         },
    7552             :         { .name = NULL }
    7553             : };
    7554             : 
    7555           0 : static PyObject *py_netr_USER_KEYS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7556             : {
    7557           0 :         return pytalloc_new(struct netr_USER_KEYS, type);
    7558             : }
    7559             : 
    7560           0 : static PyObject *py_netr_USER_KEYS_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7561             : {
    7562           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7563           0 :         PyObject *ret = NULL;
    7564           0 :         DATA_BLOB blob;
    7565           0 :         enum ndr_err_code err;
    7566           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7567           0 :         if (tmp_ctx == NULL) {
    7568           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7569           0 :                 return NULL;
    7570             :         }
    7571           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_USER_KEYS);
    7572           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7573           0 :                 TALLOC_FREE(tmp_ctx);
    7574           0 :                 PyErr_SetNdrError(err);
    7575           0 :                 return NULL;
    7576             :         }
    7577             : 
    7578           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7579           0 :         TALLOC_FREE(tmp_ctx);
    7580           0 :         return ret;
    7581             : }
    7582             : 
    7583           0 : static PyObject *py_netr_USER_KEYS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7584             : {
    7585           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7586           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7587           0 :         Py_ssize_t blob_length = 0;
    7588           0 :         enum ndr_err_code err;
    7589           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7590           0 :         PyObject *allow_remaining_obj = NULL;
    7591           0 :         bool allow_remaining = false;
    7592             : 
    7593           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7594             :                 discard_const_p(char *, kwnames),
    7595             :                 &blob.data, &blob_length,
    7596             :                 &allow_remaining_obj)) {
    7597           0 :                 return NULL;
    7598             :         }
    7599           0 :         blob.length = blob_length;
    7600             : 
    7601           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7602           0 :                 allow_remaining = true;
    7603             :         }
    7604             : 
    7605           0 :         if (allow_remaining) {
    7606           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
    7607             :         } else {
    7608           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);
    7609             :         }
    7610           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7611           0 :                 PyErr_SetNdrError(err);
    7612           0 :                 return NULL;
    7613             :         }
    7614             : 
    7615           0 :         Py_RETURN_NONE;
    7616             : }
    7617             : 
    7618           0 : static PyObject *py_netr_USER_KEYS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7619             : {
    7620           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7621           0 :         PyObject *ret;
    7622           0 :         char *retstr;
    7623             : 
    7624           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);
    7625           0 :         ret = PyUnicode_FromString(retstr);
    7626           0 :         talloc_free(retstr);
    7627             : 
    7628           0 :         return ret;
    7629             : }
    7630             : 
    7631             : static PyMethodDef py_netr_USER_KEYS_methods[] = {
    7632             :         { "__ndr_pack__", (PyCFunction)py_netr_USER_KEYS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7633             :         { "__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" },
    7634             :         { "__ndr_print__", (PyCFunction)py_netr_USER_KEYS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7635             :         { NULL, NULL, 0, NULL }
    7636             : };
    7637             : 
    7638             : 
    7639             : static PyTypeObject netr_USER_KEYS_Type = {
    7640             :         PyVarObject_HEAD_INIT(NULL, 0)
    7641             :         .tp_name = "netlogon.netr_USER_KEYS",
    7642             :         .tp_getset = py_netr_USER_KEYS_getsetters,
    7643             :         .tp_methods = py_netr_USER_KEYS_methods,
    7644             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7645             :         .tp_new = py_netr_USER_KEYS_new,
    7646             : };
    7647             : 
    7648             : 
    7649           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag(PyObject *obj, void *closure)
    7650             : {
    7651           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(obj);
    7652           0 :         PyObject *py_SensitiveDataFlag;
    7653           0 :         py_SensitiveDataFlag = PyLong_FromLong((uint16_t)object->SensitiveDataFlag);
    7654           0 :         return py_SensitiveDataFlag;
    7655             : }
    7656             : 
    7657           0 : static int py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag(PyObject *py_obj, PyObject *value, void *closure)
    7658             : {
    7659           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(py_obj);
    7660           0 :         if (value == NULL) {
    7661           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SensitiveDataFlag");
    7662           0 :                 return -1;
    7663             :         }
    7664             :         {
    7665           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SensitiveDataFlag));
    7666           0 :                 if (PyLong_Check(value)) {
    7667           0 :                         unsigned long long test_var;
    7668           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7669           0 :                         if (PyErr_Occurred() != NULL) {
    7670           0 :                                 return -1;
    7671             :                         }
    7672           0 :                         if (test_var > uint_max) {
    7673           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7674             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7675           0 :                                 return -1;
    7676             :                         }
    7677           0 :                         object->SensitiveDataFlag = test_var;
    7678             :                 } else {
    7679           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7680             :                           PyLong_Type.tp_name);
    7681           0 :                         return -1;
    7682             :                 }
    7683             :         }
    7684           0 :         return 0;
    7685             : }
    7686             : 
    7687           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_DataLength(PyObject *obj, void *closure)
    7688             : {
    7689           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(obj);
    7690           0 :         PyObject *py_DataLength;
    7691           0 :         py_DataLength = PyLong_FromUnsignedLongLong((uint32_t)object->DataLength);
    7692           0 :         return py_DataLength;
    7693             : }
    7694             : 
    7695           0 : static int py_netr_USER_PRIVATE_INFO_set_DataLength(PyObject *py_obj, PyObject *value, void *closure)
    7696             : {
    7697           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(py_obj);
    7698           0 :         if (value == NULL) {
    7699           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->DataLength");
    7700           0 :                 return -1;
    7701             :         }
    7702             :         {
    7703           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->DataLength));
    7704           0 :                 if (PyLong_Check(value)) {
    7705           0 :                         unsigned long long test_var;
    7706           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7707           0 :                         if (PyErr_Occurred() != NULL) {
    7708           0 :                                 return -1;
    7709             :                         }
    7710           0 :                         if (test_var > uint_max) {
    7711           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7712             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7713           0 :                                 return -1;
    7714             :                         }
    7715           0 :                         object->DataLength = test_var;
    7716             :                 } else {
    7717           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7718             :                           PyLong_Type.tp_name);
    7719           0 :                         return -1;
    7720             :                 }
    7721             :         }
    7722           0 :         return 0;
    7723             : }
    7724             : 
    7725           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveData(PyObject *obj, void *closure)
    7726             : {
    7727           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(obj);
    7728           0 :         PyObject *py_SensitiveData;
    7729           0 :         if (object->SensitiveData == NULL) {
    7730           0 :                 Py_RETURN_NONE;
    7731             :         }
    7732           0 :         if (object->SensitiveData == NULL) {
    7733           0 :                 py_SensitiveData = Py_None;
    7734           0 :                 Py_INCREF(py_SensitiveData);
    7735             :         } else {
    7736           0 :                 py_SensitiveData = PyList_New(object->DataLength);
    7737           0 :                 if (py_SensitiveData == NULL) {
    7738           0 :                         return NULL;
    7739             :                 }
    7740             :                 {
    7741             :                         int SensitiveData_cntr_1;
    7742           0 :                         for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < (object->DataLength); SensitiveData_cntr_1++) {
    7743           0 :                                 PyObject *py_SensitiveData_1;
    7744           0 :                                 py_SensitiveData_1 = PyLong_FromLong((uint16_t)object->SensitiveData[SensitiveData_cntr_1]);
    7745           0 :                                 PyList_SetItem(py_SensitiveData, SensitiveData_cntr_1, py_SensitiveData_1);
    7746             :                         }
    7747             :                 }
    7748             :         }
    7749           0 :         return py_SensitiveData;
    7750             : }
    7751             : 
    7752           0 : static int py_netr_USER_PRIVATE_INFO_set_SensitiveData(PyObject *py_obj, PyObject *value, void *closure)
    7753             : {
    7754           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(py_obj);
    7755           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->SensitiveData));
    7756           0 :         if (value == NULL) {
    7757           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SensitiveData");
    7758           0 :                 return -1;
    7759             :         }
    7760           0 :         if (value == Py_None) {
    7761           0 :                 object->SensitiveData = NULL;
    7762             :         } else {
    7763           0 :                 object->SensitiveData = NULL;
    7764           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7765             :                 {
    7766           0 :                         int SensitiveData_cntr_1;
    7767           0 :                         object->SensitiveData = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->SensitiveData, PyList_GET_SIZE(value));
    7768           0 :                         if (!object->SensitiveData) { return -1; }
    7769           0 :                         talloc_set_name_const(object->SensitiveData, "ARRAY: object->SensitiveData");
    7770           0 :                         for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < PyList_GET_SIZE(value); SensitiveData_cntr_1++) {
    7771           0 :                                 if (PyList_GET_ITEM(value, SensitiveData_cntr_1) == NULL) {
    7772           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SensitiveData[SensitiveData_cntr_1]");
    7773           0 :                                         return -1;
    7774             :                                 }
    7775             :                                 {
    7776           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SensitiveData[SensitiveData_cntr_1]));
    7777           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, SensitiveData_cntr_1))) {
    7778           0 :                                                 unsigned long long test_var;
    7779           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, SensitiveData_cntr_1));
    7780           0 :                                                 if (PyErr_Occurred() != NULL) {
    7781           0 :                                                         return -1;
    7782             :                                                 }
    7783           0 :                                                 if (test_var > uint_max) {
    7784           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7785             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    7786           0 :                                                         return -1;
    7787             :                                                 }
    7788           0 :                                                 object->SensitiveData[SensitiveData_cntr_1] = test_var;
    7789             :                                         } else {
    7790           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    7791             :                                                   PyLong_Type.tp_name);
    7792           0 :                                                 return -1;
    7793             :                                         }
    7794             :                                 }
    7795             :                         }
    7796             :                 }
    7797             :         }
    7798           0 :         return 0;
    7799             : }
    7800             : 
    7801             : static PyGetSetDef py_netr_USER_PRIVATE_INFO_getsetters[] = {
    7802             :         {
    7803             :                 .name = discard_const_p(char, "SensitiveDataFlag"),
    7804             :                 .get = py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag,
    7805             :                 .set = py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag,
    7806             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7807             :         },
    7808             :         {
    7809             :                 .name = discard_const_p(char, "DataLength"),
    7810             :                 .get = py_netr_USER_PRIVATE_INFO_get_DataLength,
    7811             :                 .set = py_netr_USER_PRIVATE_INFO_set_DataLength,
    7812             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7813             :         },
    7814             :         {
    7815             :                 .name = discard_const_p(char, "SensitiveData"),
    7816             :                 .get = py_netr_USER_PRIVATE_INFO_get_SensitiveData,
    7817             :                 .set = py_netr_USER_PRIVATE_INFO_set_SensitiveData,
    7818             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7819             :         },
    7820             :         { .name = NULL }
    7821             : };
    7822             : 
    7823           0 : static PyObject *py_netr_USER_PRIVATE_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7824             : {
    7825           0 :         return pytalloc_new(struct netr_USER_PRIVATE_INFO, type);
    7826             : }
    7827             : 
    7828             : 
    7829             : static PyTypeObject netr_USER_PRIVATE_INFO_Type = {
    7830             :         PyVarObject_HEAD_INIT(NULL, 0)
    7831             :         .tp_name = "netlogon.netr_USER_PRIVATE_INFO",
    7832             :         .tp_getset = py_netr_USER_PRIVATE_INFO_getsetters,
    7833             :         .tp_methods = NULL,
    7834             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7835             :         .tp_new = py_netr_USER_PRIVATE_INFO_new,
    7836             : };
    7837             : 
    7838             : 
    7839           0 : static PyObject *py_netr_DELTA_USER_get_account_name(PyObject *obj, void *closure)
    7840             : {
    7841           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7842           0 :         PyObject *py_account_name;
    7843           0 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    7844           0 :         return py_account_name;
    7845             : }
    7846             : 
    7847           0 : static int py_netr_DELTA_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    7848             : {
    7849           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7850           0 :         if (value == NULL) {
    7851           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    7852           0 :                 return -1;
    7853             :         }
    7854           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7855           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7856           0 :                 PyErr_NoMemory();
    7857           0 :                 return -1;
    7858             :         }
    7859           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    7860           0 :         return 0;
    7861             : }
    7862             : 
    7863           0 : static PyObject *py_netr_DELTA_USER_get_full_name(PyObject *obj, void *closure)
    7864             : {
    7865           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7866           0 :         PyObject *py_full_name;
    7867           0 :         py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
    7868           0 :         return py_full_name;
    7869             : }
    7870             : 
    7871           0 : static int py_netr_DELTA_USER_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
    7872             : {
    7873           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7874           0 :         if (value == NULL) {
    7875           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->full_name");
    7876           0 :                 return -1;
    7877             :         }
    7878           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7879           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7880           0 :                 PyErr_NoMemory();
    7881           0 :                 return -1;
    7882             :         }
    7883           0 :         object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    7884           0 :         return 0;
    7885             : }
    7886             : 
    7887           0 : static PyObject *py_netr_DELTA_USER_get_rid(PyObject *obj, void *closure)
    7888             : {
    7889           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7890           0 :         PyObject *py_rid;
    7891           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
    7892           0 :         return py_rid;
    7893             : }
    7894             : 
    7895           0 : static int py_netr_DELTA_USER_set_rid(PyObject *py_obj, PyObject *value, void *closure)
    7896             : {
    7897           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7898           0 :         if (value == NULL) {
    7899           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
    7900           0 :                 return -1;
    7901             :         }
    7902             :         {
    7903           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
    7904           0 :                 if (PyLong_Check(value)) {
    7905           0 :                         unsigned long long test_var;
    7906           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7907           0 :                         if (PyErr_Occurred() != NULL) {
    7908           0 :                                 return -1;
    7909             :                         }
    7910           0 :                         if (test_var > uint_max) {
    7911           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7912             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7913           0 :                                 return -1;
    7914             :                         }
    7915           0 :                         object->rid = test_var;
    7916             :                 } else {
    7917           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7918             :                           PyLong_Type.tp_name);
    7919           0 :                         return -1;
    7920             :                 }
    7921             :         }
    7922           0 :         return 0;
    7923             : }
    7924             : 
    7925           0 : static PyObject *py_netr_DELTA_USER_get_primary_gid(PyObject *obj, void *closure)
    7926             : {
    7927           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7928           0 :         PyObject *py_primary_gid;
    7929           0 :         py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)object->primary_gid);
    7930           0 :         return py_primary_gid;
    7931             : }
    7932             : 
    7933           0 : static int py_netr_DELTA_USER_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
    7934             : {
    7935           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7936           0 :         if (value == NULL) {
    7937           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_gid");
    7938           0 :                 return -1;
    7939             :         }
    7940             :         {
    7941           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
    7942           0 :                 if (PyLong_Check(value)) {
    7943           0 :                         unsigned long long test_var;
    7944           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7945           0 :                         if (PyErr_Occurred() != NULL) {
    7946           0 :                                 return -1;
    7947             :                         }
    7948           0 :                         if (test_var > uint_max) {
    7949           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7950             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7951           0 :                                 return -1;
    7952             :                         }
    7953           0 :                         object->primary_gid = test_var;
    7954             :                 } else {
    7955           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7956             :                           PyLong_Type.tp_name);
    7957           0 :                         return -1;
    7958             :                 }
    7959             :         }
    7960           0 :         return 0;
    7961             : }
    7962             : 
    7963           0 : static PyObject *py_netr_DELTA_USER_get_home_directory(PyObject *obj, void *closure)
    7964             : {
    7965           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7966           0 :         PyObject *py_home_directory;
    7967           0 :         py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
    7968           0 :         return py_home_directory;
    7969             : }
    7970             : 
    7971           0 : static int py_netr_DELTA_USER_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
    7972             : {
    7973           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7974           0 :         if (value == NULL) {
    7975           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_directory");
    7976           0 :                 return -1;
    7977             :         }
    7978           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7979           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7980           0 :                 PyErr_NoMemory();
    7981           0 :                 return -1;
    7982             :         }
    7983           0 :         object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
    7984           0 :         return 0;
    7985             : }
    7986             : 
    7987           0 : static PyObject *py_netr_DELTA_USER_get_home_drive(PyObject *obj, void *closure)
    7988             : {
    7989           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7990           0 :         PyObject *py_home_drive;
    7991           0 :         py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
    7992           0 :         return py_home_drive;
    7993             : }
    7994             : 
    7995           0 : static int py_netr_DELTA_USER_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
    7996             : {
    7997           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7998           0 :         if (value == NULL) {
    7999           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_drive");
    8000           0 :                 return -1;
    8001             :         }
    8002           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8003           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8004           0 :                 PyErr_NoMemory();
    8005           0 :                 return -1;
    8006             :         }
    8007           0 :         object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
    8008           0 :         return 0;
    8009             : }
    8010             : 
    8011           0 : static PyObject *py_netr_DELTA_USER_get_logon_script(PyObject *obj, void *closure)
    8012             : {
    8013           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8014           0 :         PyObject *py_logon_script;
    8015           0 :         py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
    8016           0 :         return py_logon_script;
    8017             : }
    8018             : 
    8019           0 : static int py_netr_DELTA_USER_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
    8020             : {
    8021           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8022           0 :         if (value == NULL) {
    8023           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_script");
    8024           0 :                 return -1;
    8025             :         }
    8026           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8027           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8028           0 :                 PyErr_NoMemory();
    8029           0 :                 return -1;
    8030             :         }
    8031           0 :         object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
    8032           0 :         return 0;
    8033             : }
    8034             : 
    8035           0 : static PyObject *py_netr_DELTA_USER_get_description(PyObject *obj, void *closure)
    8036             : {
    8037           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8038           0 :         PyObject *py_description;
    8039           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
    8040           0 :         return py_description;
    8041             : }
    8042             : 
    8043           0 : static int py_netr_DELTA_USER_set_description(PyObject *py_obj, PyObject *value, void *closure)
    8044             : {
    8045           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8046           0 :         if (value == NULL) {
    8047           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->description");
    8048           0 :                 return -1;
    8049             :         }
    8050           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8051           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8052           0 :                 PyErr_NoMemory();
    8053           0 :                 return -1;
    8054             :         }
    8055           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
    8056           0 :         return 0;
    8057             : }
    8058             : 
    8059           0 : static PyObject *py_netr_DELTA_USER_get_workstations(PyObject *obj, void *closure)
    8060             : {
    8061           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8062           0 :         PyObject *py_workstations;
    8063           0 :         py_workstations = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstations);
    8064           0 :         return py_workstations;
    8065             : }
    8066             : 
    8067           0 : static int py_netr_DELTA_USER_set_workstations(PyObject *py_obj, PyObject *value, void *closure)
    8068             : {
    8069           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8070           0 :         if (value == NULL) {
    8071           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstations");
    8072           0 :                 return -1;
    8073             :         }
    8074           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8075           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8076           0 :                 PyErr_NoMemory();
    8077           0 :                 return -1;
    8078             :         }
    8079           0 :         object->workstations = *(struct lsa_String *)pytalloc_get_ptr(value);
    8080           0 :         return 0;
    8081             : }
    8082             : 
    8083           0 : static PyObject *py_netr_DELTA_USER_get_last_logon(PyObject *obj, void *closure)
    8084             : {
    8085           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8086           0 :         PyObject *py_last_logon;
    8087           0 :         py_last_logon = PyLong_FromUnsignedLongLong(object->last_logon);
    8088           0 :         return py_last_logon;
    8089             : }
    8090             : 
    8091           0 : static int py_netr_DELTA_USER_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
    8092             : {
    8093           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8094           0 :         if (value == NULL) {
    8095           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logon");
    8096           0 :                 return -1;
    8097             :         }
    8098             :         {
    8099           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logon));
    8100           0 :                 if (PyLong_Check(value)) {
    8101           0 :                         unsigned long long test_var;
    8102           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8103           0 :                         if (PyErr_Occurred() != NULL) {
    8104           0 :                                 return -1;
    8105             :                         }
    8106           0 :                         if (test_var > uint_max) {
    8107           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8108             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8109           0 :                                 return -1;
    8110             :                         }
    8111           0 :                         object->last_logon = test_var;
    8112             :                 } else {
    8113           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8114             :                           PyLong_Type.tp_name);
    8115           0 :                         return -1;
    8116             :                 }
    8117             :         }
    8118           0 :         return 0;
    8119             : }
    8120             : 
    8121           0 : static PyObject *py_netr_DELTA_USER_get_last_logoff(PyObject *obj, void *closure)
    8122             : {
    8123           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8124           0 :         PyObject *py_last_logoff;
    8125           0 :         py_last_logoff = PyLong_FromUnsignedLongLong(object->last_logoff);
    8126           0 :         return py_last_logoff;
    8127             : }
    8128             : 
    8129           0 : static int py_netr_DELTA_USER_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
    8130             : {
    8131           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8132           0 :         if (value == NULL) {
    8133           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logoff");
    8134           0 :                 return -1;
    8135             :         }
    8136             :         {
    8137           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logoff));
    8138           0 :                 if (PyLong_Check(value)) {
    8139           0 :                         unsigned long long test_var;
    8140           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8141           0 :                         if (PyErr_Occurred() != NULL) {
    8142           0 :                                 return -1;
    8143             :                         }
    8144           0 :                         if (test_var > uint_max) {
    8145           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8146             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8147           0 :                                 return -1;
    8148             :                         }
    8149           0 :                         object->last_logoff = test_var;
    8150             :                 } else {
    8151           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8152             :                           PyLong_Type.tp_name);
    8153           0 :                         return -1;
    8154             :                 }
    8155             :         }
    8156           0 :         return 0;
    8157             : }
    8158             : 
    8159           0 : static PyObject *py_netr_DELTA_USER_get_logon_hours(PyObject *obj, void *closure)
    8160             : {
    8161           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8162           0 :         PyObject *py_logon_hours;
    8163           0 :         py_logon_hours = pytalloc_reference_ex(samr_LogonHours_Type, pytalloc_get_mem_ctx(obj), &object->logon_hours);
    8164           0 :         return py_logon_hours;
    8165             : }
    8166             : 
    8167           0 : static int py_netr_DELTA_USER_set_logon_hours(PyObject *py_obj, PyObject *value, void *closure)
    8168             : {
    8169           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8170           0 :         if (value == NULL) {
    8171           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_hours");
    8172           0 :                 return -1;
    8173             :         }
    8174           0 :         PY_CHECK_TYPE(samr_LogonHours_Type, value, return -1;);
    8175           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8176           0 :                 PyErr_NoMemory();
    8177           0 :                 return -1;
    8178             :         }
    8179           0 :         object->logon_hours = *(struct samr_LogonHours *)pytalloc_get_ptr(value);
    8180           0 :         return 0;
    8181             : }
    8182             : 
    8183           0 : static PyObject *py_netr_DELTA_USER_get_bad_password_count(PyObject *obj, void *closure)
    8184             : {
    8185           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8186           0 :         PyObject *py_bad_password_count;
    8187           0 :         py_bad_password_count = PyLong_FromLong((uint16_t)object->bad_password_count);
    8188           0 :         return py_bad_password_count;
    8189             : }
    8190             : 
    8191           0 : static int py_netr_DELTA_USER_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
    8192             : {
    8193           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8194           0 :         if (value == NULL) {
    8195           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_password_count");
    8196           0 :                 return -1;
    8197             :         }
    8198             :         {
    8199           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
    8200           0 :                 if (PyLong_Check(value)) {
    8201           0 :                         unsigned long long test_var;
    8202           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8203           0 :                         if (PyErr_Occurred() != NULL) {
    8204           0 :                                 return -1;
    8205             :                         }
    8206           0 :                         if (test_var > uint_max) {
    8207           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8208             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8209           0 :                                 return -1;
    8210             :                         }
    8211           0 :                         object->bad_password_count = test_var;
    8212             :                 } else {
    8213           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8214             :                           PyLong_Type.tp_name);
    8215           0 :                         return -1;
    8216             :                 }
    8217             :         }
    8218           0 :         return 0;
    8219             : }
    8220             : 
    8221           0 : static PyObject *py_netr_DELTA_USER_get_logon_count(PyObject *obj, void *closure)
    8222             : {
    8223           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8224           0 :         PyObject *py_logon_count;
    8225           0 :         py_logon_count = PyLong_FromLong((uint16_t)object->logon_count);
    8226           0 :         return py_logon_count;
    8227             : }
    8228             : 
    8229           0 : static int py_netr_DELTA_USER_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    8230             : {
    8231           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8232           0 :         if (value == NULL) {
    8233           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
    8234           0 :                 return -1;
    8235             :         }
    8236             :         {
    8237           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    8238           0 :                 if (PyLong_Check(value)) {
    8239           0 :                         unsigned long long test_var;
    8240           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8241           0 :                         if (PyErr_Occurred() != NULL) {
    8242           0 :                                 return -1;
    8243             :                         }
    8244           0 :                         if (test_var > uint_max) {
    8245           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8246             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8247           0 :                                 return -1;
    8248             :                         }
    8249           0 :                         object->logon_count = test_var;
    8250             :                 } else {
    8251           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8252             :                           PyLong_Type.tp_name);
    8253           0 :                         return -1;
    8254             :                 }
    8255             :         }
    8256           0 :         return 0;
    8257             : }
    8258             : 
    8259           0 : static PyObject *py_netr_DELTA_USER_get_last_password_change(PyObject *obj, void *closure)
    8260             : {
    8261           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8262           0 :         PyObject *py_last_password_change;
    8263           0 :         py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
    8264           0 :         return py_last_password_change;
    8265             : }
    8266             : 
    8267           0 : static int py_netr_DELTA_USER_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
    8268             : {
    8269           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8270           0 :         if (value == NULL) {
    8271           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_password_change");
    8272           0 :                 return -1;
    8273             :         }
    8274             :         {
    8275           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
    8276           0 :                 if (PyLong_Check(value)) {
    8277           0 :                         unsigned long long test_var;
    8278           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8279           0 :                         if (PyErr_Occurred() != NULL) {
    8280           0 :                                 return -1;
    8281             :                         }
    8282           0 :                         if (test_var > uint_max) {
    8283           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8284             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8285           0 :                                 return -1;
    8286             :                         }
    8287           0 :                         object->last_password_change = test_var;
    8288             :                 } else {
    8289           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8290             :                           PyLong_Type.tp_name);
    8291           0 :                         return -1;
    8292             :                 }
    8293             :         }
    8294           0 :         return 0;
    8295             : }
    8296             : 
    8297           0 : static PyObject *py_netr_DELTA_USER_get_acct_expiry(PyObject *obj, void *closure)
    8298             : {
    8299           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8300           0 :         PyObject *py_acct_expiry;
    8301           0 :         py_acct_expiry = PyLong_FromUnsignedLongLong(object->acct_expiry);
    8302           0 :         return py_acct_expiry;
    8303             : }
    8304             : 
    8305           0 : static int py_netr_DELTA_USER_set_acct_expiry(PyObject *py_obj, PyObject *value, void *closure)
    8306             : {
    8307           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8308           0 :         if (value == NULL) {
    8309           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_expiry");
    8310           0 :                 return -1;
    8311             :         }
    8312             :         {
    8313           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_expiry));
    8314           0 :                 if (PyLong_Check(value)) {
    8315           0 :                         unsigned long long test_var;
    8316           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8317           0 :                         if (PyErr_Occurred() != NULL) {
    8318           0 :                                 return -1;
    8319             :                         }
    8320           0 :                         if (test_var > uint_max) {
    8321           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8322             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8323           0 :                                 return -1;
    8324             :                         }
    8325           0 :                         object->acct_expiry = test_var;
    8326             :                 } else {
    8327           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8328             :                           PyLong_Type.tp_name);
    8329           0 :                         return -1;
    8330             :                 }
    8331             :         }
    8332           0 :         return 0;
    8333             : }
    8334             : 
    8335           0 : static PyObject *py_netr_DELTA_USER_get_acct_flags(PyObject *obj, void *closure)
    8336             : {
    8337           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8338           0 :         PyObject *py_acct_flags;
    8339           0 :         py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)object->acct_flags);
    8340           0 :         return py_acct_flags;
    8341             : }
    8342             : 
    8343           0 : static int py_netr_DELTA_USER_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
    8344             : {
    8345           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8346           0 :         if (value == NULL) {
    8347           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_flags");
    8348           0 :                 return -1;
    8349             :         }
    8350             :         {
    8351           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
    8352           0 :                 if (PyLong_Check(value)) {
    8353           0 :                         unsigned long long test_var;
    8354           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8355           0 :                         if (PyErr_Occurred() != NULL) {
    8356           0 :                                 return -1;
    8357             :                         }
    8358           0 :                         if (test_var > uint_max) {
    8359           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8360             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8361           0 :                                 return -1;
    8362             :                         }
    8363           0 :                         object->acct_flags = test_var;
    8364             :                 } else {
    8365           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8366             :                           PyLong_Type.tp_name);
    8367           0 :                         return -1;
    8368             :                 }
    8369             :         }
    8370           0 :         return 0;
    8371             : }
    8372             : 
    8373           0 : static PyObject *py_netr_DELTA_USER_get_lmpassword(PyObject *obj, void *closure)
    8374             : {
    8375           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8376           0 :         PyObject *py_lmpassword;
    8377           0 :         py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    8378           0 :         return py_lmpassword;
    8379             : }
    8380             : 
    8381           0 : static int py_netr_DELTA_USER_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    8382             : {
    8383           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8384           0 :         if (value == NULL) {
    8385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmpassword");
    8386           0 :                 return -1;
    8387             :         }
    8388           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    8389           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8390           0 :                 PyErr_NoMemory();
    8391           0 :                 return -1;
    8392             :         }
    8393           0 :         object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    8394           0 :         return 0;
    8395             : }
    8396             : 
    8397           0 : static PyObject *py_netr_DELTA_USER_get_ntpassword(PyObject *obj, void *closure)
    8398             : {
    8399           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8400           0 :         PyObject *py_ntpassword;
    8401           0 :         py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    8402           0 :         return py_ntpassword;
    8403             : }
    8404             : 
    8405           0 : static int py_netr_DELTA_USER_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    8406             : {
    8407           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8408           0 :         if (value == NULL) {
    8409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntpassword");
    8410           0 :                 return -1;
    8411             :         }
    8412           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    8413           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8414           0 :                 PyErr_NoMemory();
    8415           0 :                 return -1;
    8416             :         }
    8417           0 :         object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    8418           0 :         return 0;
    8419             : }
    8420             : 
    8421           0 : static PyObject *py_netr_DELTA_USER_get_nt_password_present(PyObject *obj, void *closure)
    8422             : {
    8423           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8424           0 :         PyObject *py_nt_password_present;
    8425           0 :         py_nt_password_present = PyLong_FromLong((uint16_t)object->nt_password_present);
    8426           0 :         return py_nt_password_present;
    8427             : }
    8428             : 
    8429           0 : static int py_netr_DELTA_USER_set_nt_password_present(PyObject *py_obj, PyObject *value, void *closure)
    8430             : {
    8431           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8432           0 :         if (value == NULL) {
    8433           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_password_present");
    8434           0 :                 return -1;
    8435             :         }
    8436             :         {
    8437           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_password_present));
    8438           0 :                 if (PyLong_Check(value)) {
    8439           0 :                         unsigned long long test_var;
    8440           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8441           0 :                         if (PyErr_Occurred() != NULL) {
    8442           0 :                                 return -1;
    8443             :                         }
    8444           0 :                         if (test_var > uint_max) {
    8445           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8446             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8447           0 :                                 return -1;
    8448             :                         }
    8449           0 :                         object->nt_password_present = test_var;
    8450             :                 } else {
    8451           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8452             :                           PyLong_Type.tp_name);
    8453           0 :                         return -1;
    8454             :                 }
    8455             :         }
    8456           0 :         return 0;
    8457             : }
    8458             : 
    8459           0 : static PyObject *py_netr_DELTA_USER_get_lm_password_present(PyObject *obj, void *closure)
    8460             : {
    8461           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8462           0 :         PyObject *py_lm_password_present;
    8463           0 :         py_lm_password_present = PyLong_FromLong((uint16_t)object->lm_password_present);
    8464           0 :         return py_lm_password_present;
    8465             : }
    8466             : 
    8467           0 : static int py_netr_DELTA_USER_set_lm_password_present(PyObject *py_obj, PyObject *value, void *closure)
    8468             : {
    8469           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8470           0 :         if (value == NULL) {
    8471           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_password_present");
    8472           0 :                 return -1;
    8473             :         }
    8474             :         {
    8475           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_password_present));
    8476           0 :                 if (PyLong_Check(value)) {
    8477           0 :                         unsigned long long test_var;
    8478           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8479           0 :                         if (PyErr_Occurred() != NULL) {
    8480           0 :                                 return -1;
    8481             :                         }
    8482           0 :                         if (test_var > uint_max) {
    8483           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8484             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8485           0 :                                 return -1;
    8486             :                         }
    8487           0 :                         object->lm_password_present = test_var;
    8488             :                 } else {
    8489           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8490             :                           PyLong_Type.tp_name);
    8491           0 :                         return -1;
    8492             :                 }
    8493             :         }
    8494           0 :         return 0;
    8495             : }
    8496             : 
    8497           0 : static PyObject *py_netr_DELTA_USER_get_password_expired(PyObject *obj, void *closure)
    8498             : {
    8499           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8500           0 :         PyObject *py_password_expired;
    8501           0 :         py_password_expired = PyLong_FromLong((uint16_t)object->password_expired);
    8502           0 :         return py_password_expired;
    8503             : }
    8504             : 
    8505           0 : static int py_netr_DELTA_USER_set_password_expired(PyObject *py_obj, PyObject *value, void *closure)
    8506             : {
    8507           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8508           0 :         if (value == NULL) {
    8509           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password_expired");
    8510           0 :                 return -1;
    8511             :         }
    8512             :         {
    8513           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_expired));
    8514           0 :                 if (PyLong_Check(value)) {
    8515           0 :                         unsigned long long test_var;
    8516           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8517           0 :                         if (PyErr_Occurred() != NULL) {
    8518           0 :                                 return -1;
    8519             :                         }
    8520           0 :                         if (test_var > uint_max) {
    8521           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8522             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8523           0 :                                 return -1;
    8524             :                         }
    8525           0 :                         object->password_expired = test_var;
    8526             :                 } else {
    8527           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8528             :                           PyLong_Type.tp_name);
    8529           0 :                         return -1;
    8530             :                 }
    8531             :         }
    8532           0 :         return 0;
    8533             : }
    8534             : 
    8535           0 : static PyObject *py_netr_DELTA_USER_get_comment(PyObject *obj, void *closure)
    8536             : {
    8537           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8538           0 :         PyObject *py_comment;
    8539           0 :         py_comment = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->comment);
    8540           0 :         return py_comment;
    8541             : }
    8542             : 
    8543           0 : static int py_netr_DELTA_USER_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    8544             : {
    8545           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8546           0 :         if (value == NULL) {
    8547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
    8548           0 :                 return -1;
    8549             :         }
    8550           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8551           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8552           0 :                 PyErr_NoMemory();
    8553           0 :                 return -1;
    8554             :         }
    8555           0 :         object->comment = *(struct lsa_String *)pytalloc_get_ptr(value);
    8556           0 :         return 0;
    8557             : }
    8558             : 
    8559           0 : static PyObject *py_netr_DELTA_USER_get_parameters(PyObject *obj, void *closure)
    8560             : {
    8561           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8562           0 :         PyObject *py_parameters;
    8563           0 :         py_parameters = pytalloc_reference_ex(lsa_BinaryString_Type, pytalloc_get_mem_ctx(obj), &object->parameters);
    8564           0 :         return py_parameters;
    8565             : }
    8566             : 
    8567           0 : static int py_netr_DELTA_USER_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
    8568             : {
    8569           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8570           0 :         if (value == NULL) {
    8571           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parameters");
    8572           0 :                 return -1;
    8573             :         }
    8574           0 :         PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
    8575           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8576           0 :                 PyErr_NoMemory();
    8577           0 :                 return -1;
    8578             :         }
    8579           0 :         object->parameters = *(struct lsa_BinaryString *)pytalloc_get_ptr(value);
    8580           0 :         return 0;
    8581             : }
    8582             : 
    8583           0 : static PyObject *py_netr_DELTA_USER_get_country_code(PyObject *obj, void *closure)
    8584             : {
    8585           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8586           0 :         PyObject *py_country_code;
    8587           0 :         py_country_code = PyLong_FromLong((uint16_t)object->country_code);
    8588           0 :         return py_country_code;
    8589             : }
    8590             : 
    8591           0 : static int py_netr_DELTA_USER_set_country_code(PyObject *py_obj, PyObject *value, void *closure)
    8592             : {
    8593           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8594           0 :         if (value == NULL) {
    8595           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->country_code");
    8596           0 :                 return -1;
    8597             :         }
    8598             :         {
    8599           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->country_code));
    8600           0 :                 if (PyLong_Check(value)) {
    8601           0 :                         unsigned long long test_var;
    8602           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8603           0 :                         if (PyErr_Occurred() != NULL) {
    8604           0 :                                 return -1;
    8605             :                         }
    8606           0 :                         if (test_var > uint_max) {
    8607           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8608             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8609           0 :                                 return -1;
    8610             :                         }
    8611           0 :                         object->country_code = test_var;
    8612             :                 } else {
    8613           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8614             :                           PyLong_Type.tp_name);
    8615           0 :                         return -1;
    8616             :                 }
    8617             :         }
    8618           0 :         return 0;
    8619             : }
    8620             : 
    8621           0 : static PyObject *py_netr_DELTA_USER_get_code_page(PyObject *obj, void *closure)
    8622             : {
    8623           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8624           0 :         PyObject *py_code_page;
    8625           0 :         py_code_page = PyLong_FromLong((uint16_t)object->code_page);
    8626           0 :         return py_code_page;
    8627             : }
    8628             : 
    8629           0 : static int py_netr_DELTA_USER_set_code_page(PyObject *py_obj, PyObject *value, void *closure)
    8630             : {
    8631           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8632           0 :         if (value == NULL) {
    8633           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->code_page");
    8634           0 :                 return -1;
    8635             :         }
    8636             :         {
    8637           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->code_page));
    8638           0 :                 if (PyLong_Check(value)) {
    8639           0 :                         unsigned long long test_var;
    8640           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8641           0 :                         if (PyErr_Occurred() != NULL) {
    8642           0 :                                 return -1;
    8643             :                         }
    8644           0 :                         if (test_var > uint_max) {
    8645           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8646             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8647           0 :                                 return -1;
    8648             :                         }
    8649           0 :                         object->code_page = test_var;
    8650             :                 } else {
    8651           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8652             :                           PyLong_Type.tp_name);
    8653           0 :                         return -1;
    8654             :                 }
    8655             :         }
    8656           0 :         return 0;
    8657             : }
    8658             : 
    8659           0 : static PyObject *py_netr_DELTA_USER_get_user_private_info(PyObject *obj, void *closure)
    8660             : {
    8661           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8662           0 :         PyObject *py_user_private_info;
    8663           0 :         py_user_private_info = pytalloc_reference_ex(&netr_USER_PRIVATE_INFO_Type, pytalloc_get_mem_ctx(obj), &object->user_private_info);
    8664           0 :         return py_user_private_info;
    8665             : }
    8666             : 
    8667           0 : static int py_netr_DELTA_USER_set_user_private_info(PyObject *py_obj, PyObject *value, void *closure)
    8668             : {
    8669           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8670           0 :         if (value == NULL) {
    8671           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_private_info");
    8672           0 :                 return -1;
    8673             :         }
    8674           0 :         PY_CHECK_TYPE(&netr_USER_PRIVATE_INFO_Type, value, return -1;);
    8675           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8676           0 :                 PyErr_NoMemory();
    8677           0 :                 return -1;
    8678             :         }
    8679           0 :         object->user_private_info = *(struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(value);
    8680           0 :         return 0;
    8681             : }
    8682             : 
    8683           0 : static PyObject *py_netr_DELTA_USER_get_SecurityInformation(PyObject *obj, void *closure)
    8684             : {
    8685           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8686           0 :         PyObject *py_SecurityInformation;
    8687           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
    8688           0 :         return py_SecurityInformation;
    8689             : }
    8690             : 
    8691           0 : static int py_netr_DELTA_USER_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
    8692             : {
    8693           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8694           0 :         if (value == NULL) {
    8695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
    8696           0 :                 return -1;
    8697             :         }
    8698             :         {
    8699           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
    8700           0 :                 if (PyLong_Check(value)) {
    8701           0 :                         unsigned long long test_var;
    8702           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8703           0 :                         if (PyErr_Occurred() != NULL) {
    8704           0 :                                 return -1;
    8705             :                         }
    8706           0 :                         if (test_var > uint_max) {
    8707           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8708             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8709           0 :                                 return -1;
    8710             :                         }
    8711           0 :                         object->SecurityInformation = test_var;
    8712             :                 } else {
    8713           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8714             :                           PyLong_Type.tp_name);
    8715           0 :                         return -1;
    8716             :                 }
    8717             :         }
    8718           0 :         return 0;
    8719             : }
    8720             : 
    8721           0 : static PyObject *py_netr_DELTA_USER_get_sdbuf(PyObject *obj, void *closure)
    8722             : {
    8723           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8724           0 :         PyObject *py_sdbuf;
    8725           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
    8726           0 :         return py_sdbuf;
    8727             : }
    8728             : 
    8729           0 : static int py_netr_DELTA_USER_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
    8730             : {
    8731           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8732           0 :         if (value == NULL) {
    8733           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
    8734           0 :                 return -1;
    8735             :         }
    8736           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
    8737           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8738           0 :                 PyErr_NoMemory();
    8739           0 :                 return -1;
    8740             :         }
    8741           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
    8742           0 :         return 0;
    8743             : }
    8744             : 
    8745           0 : static PyObject *py_netr_DELTA_USER_get_profile_path(PyObject *obj, void *closure)
    8746             : {
    8747           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8748           0 :         PyObject *py_profile_path;
    8749           0 :         py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
    8750           0 :         return py_profile_path;
    8751             : }
    8752             : 
    8753           0 : static int py_netr_DELTA_USER_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
    8754             : {
    8755           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8756           0 :         if (value == NULL) {
    8757           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->profile_path");
    8758           0 :                 return -1;
    8759             :         }
    8760           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8761           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8762           0 :                 PyErr_NoMemory();
    8763           0 :                 return -1;
    8764             :         }
    8765           0 :         object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
    8766           0 :         return 0;
    8767             : }
    8768             : 
    8769           0 : static PyObject *py_netr_DELTA_USER_get_unknown2(PyObject *obj, void *closure)
    8770             : {
    8771           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8772           0 :         PyObject *py_unknown2;
    8773           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    8774           0 :         return py_unknown2;
    8775             : }
    8776             : 
    8777           0 : static int py_netr_DELTA_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    8778             : {
    8779           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8780           0 :         if (value == NULL) {
    8781           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    8782           0 :                 return -1;
    8783             :         }
    8784           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8785           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8786           0 :                 PyErr_NoMemory();
    8787           0 :                 return -1;
    8788             :         }
    8789           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8790           0 :         return 0;
    8791             : }
    8792             : 
    8793           0 : static PyObject *py_netr_DELTA_USER_get_unknown3(PyObject *obj, void *closure)
    8794             : {
    8795           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8796           0 :         PyObject *py_unknown3;
    8797           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    8798           0 :         return py_unknown3;
    8799             : }
    8800             : 
    8801           0 : static int py_netr_DELTA_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    8802             : {
    8803           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8804           0 :         if (value == NULL) {
    8805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    8806           0 :                 return -1;
    8807             :         }
    8808           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8809           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8810           0 :                 PyErr_NoMemory();
    8811           0 :                 return -1;
    8812             :         }
    8813           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8814           0 :         return 0;
    8815             : }
    8816             : 
    8817           0 : static PyObject *py_netr_DELTA_USER_get_unknown4(PyObject *obj, void *closure)
    8818             : {
    8819           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8820           0 :         PyObject *py_unknown4;
    8821           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    8822           0 :         return py_unknown4;
    8823             : }
    8824             : 
    8825           0 : static int py_netr_DELTA_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    8826             : {
    8827           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8828           0 :         if (value == NULL) {
    8829           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    8830           0 :                 return -1;
    8831             :         }
    8832           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8833           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8834           0 :                 PyErr_NoMemory();
    8835           0 :                 return -1;
    8836             :         }
    8837           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8838           0 :         return 0;
    8839             : }
    8840             : 
    8841           0 : static PyObject *py_netr_DELTA_USER_get_unknown5(PyObject *obj, void *closure)
    8842             : {
    8843           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8844           0 :         PyObject *py_unknown5;
    8845           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
    8846           0 :         return py_unknown5;
    8847             : }
    8848             : 
    8849           0 : static int py_netr_DELTA_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
    8850             : {
    8851           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8852           0 :         if (value == NULL) {
    8853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
    8854           0 :                 return -1;
    8855             :         }
    8856             :         {
    8857           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
    8858           0 :                 if (PyLong_Check(value)) {
    8859           0 :                         unsigned long long test_var;
    8860           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8861           0 :                         if (PyErr_Occurred() != NULL) {
    8862           0 :                                 return -1;
    8863             :                         }
    8864           0 :                         if (test_var > uint_max) {
    8865           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8866             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8867           0 :                                 return -1;
    8868             :                         }
    8869           0 :                         object->unknown5 = test_var;
    8870             :                 } else {
    8871           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8872             :                           PyLong_Type.tp_name);
    8873           0 :                         return -1;
    8874             :                 }
    8875             :         }
    8876           0 :         return 0;
    8877             : }
    8878             : 
    8879           0 : static PyObject *py_netr_DELTA_USER_get_unknown6(PyObject *obj, void *closure)
    8880             : {
    8881           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8882           0 :         PyObject *py_unknown6;
    8883           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
    8884           0 :         return py_unknown6;
    8885             : }
    8886             : 
    8887           0 : static int py_netr_DELTA_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    8888             : {
    8889           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8890           0 :         if (value == NULL) {
    8891           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
    8892           0 :                 return -1;
    8893             :         }
    8894             :         {
    8895           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    8896           0 :                 if (PyLong_Check(value)) {
    8897           0 :                         unsigned long long test_var;
    8898           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8899           0 :                         if (PyErr_Occurred() != NULL) {
    8900           0 :                                 return -1;
    8901             :                         }
    8902           0 :                         if (test_var > uint_max) {
    8903           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8904             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8905           0 :                                 return -1;
    8906             :                         }
    8907           0 :                         object->unknown6 = test_var;
    8908             :                 } else {
    8909           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8910             :                           PyLong_Type.tp_name);
    8911           0 :                         return -1;
    8912             :                 }
    8913             :         }
    8914           0 :         return 0;
    8915             : }
    8916             : 
    8917           0 : static PyObject *py_netr_DELTA_USER_get_unknown7(PyObject *obj, void *closure)
    8918             : {
    8919           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8920           0 :         PyObject *py_unknown7;
    8921           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
    8922           0 :         return py_unknown7;
    8923             : }
    8924             : 
    8925           0 : static int py_netr_DELTA_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    8926             : {
    8927           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8928           0 :         if (value == NULL) {
    8929           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
    8930           0 :                 return -1;
    8931             :         }
    8932             :         {
    8933           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    8934           0 :                 if (PyLong_Check(value)) {
    8935           0 :                         unsigned long long test_var;
    8936           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8937           0 :                         if (PyErr_Occurred() != NULL) {
    8938           0 :                                 return -1;
    8939             :                         }
    8940           0 :                         if (test_var > uint_max) {
    8941           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8942             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8943           0 :                                 return -1;
    8944             :                         }
    8945           0 :                         object->unknown7 = test_var;
    8946             :                 } else {
    8947           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8948             :                           PyLong_Type.tp_name);
    8949           0 :                         return -1;
    8950             :                 }
    8951             :         }
    8952           0 :         return 0;
    8953             : }
    8954             : 
    8955           0 : static PyObject *py_netr_DELTA_USER_get_unknown8(PyObject *obj, void *closure)
    8956             : {
    8957           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8958           0 :         PyObject *py_unknown8;
    8959           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
    8960           0 :         return py_unknown8;
    8961             : }
    8962             : 
    8963           0 : static int py_netr_DELTA_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    8964             : {
    8965           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8966           0 :         if (value == NULL) {
    8967           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
    8968           0 :                 return -1;
    8969             :         }
    8970             :         {
    8971           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    8972           0 :                 if (PyLong_Check(value)) {
    8973           0 :                         unsigned long long test_var;
    8974           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8975           0 :                         if (PyErr_Occurred() != NULL) {
    8976           0 :                                 return -1;
    8977             :                         }
    8978           0 :                         if (test_var > uint_max) {
    8979           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8980             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8981           0 :                                 return -1;
    8982             :                         }
    8983           0 :                         object->unknown8 = test_var;
    8984             :                 } else {
    8985           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8986             :                           PyLong_Type.tp_name);
    8987           0 :                         return -1;
    8988             :                 }
    8989             :         }
    8990           0 :         return 0;
    8991             : }
    8992             : 
    8993             : static PyGetSetDef py_netr_DELTA_USER_getsetters[] = {
    8994             :         {
    8995             :                 .name = discard_const_p(char, "account_name"),
    8996             :                 .get = py_netr_DELTA_USER_get_account_name,
    8997             :                 .set = py_netr_DELTA_USER_set_account_name,
    8998             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8999             :         },
    9000             :         {
    9001             :                 .name = discard_const_p(char, "full_name"),
    9002             :                 .get = py_netr_DELTA_USER_get_full_name,
    9003             :                 .set = py_netr_DELTA_USER_set_full_name,
    9004             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9005             :         },
    9006             :         {
    9007             :                 .name = discard_const_p(char, "rid"),
    9008             :                 .get = py_netr_DELTA_USER_get_rid,
    9009             :                 .set = py_netr_DELTA_USER_set_rid,
    9010             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9011             :         },
    9012             :         {
    9013             :                 .name = discard_const_p(char, "primary_gid"),
    9014             :                 .get = py_netr_DELTA_USER_get_primary_gid,
    9015             :                 .set = py_netr_DELTA_USER_set_primary_gid,
    9016             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9017             :         },
    9018             :         {
    9019             :                 .name = discard_const_p(char, "home_directory"),
    9020             :                 .get = py_netr_DELTA_USER_get_home_directory,
    9021             :                 .set = py_netr_DELTA_USER_set_home_directory,
    9022             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9023             :         },
    9024             :         {
    9025             :                 .name = discard_const_p(char, "home_drive"),
    9026             :                 .get = py_netr_DELTA_USER_get_home_drive,
    9027             :                 .set = py_netr_DELTA_USER_set_home_drive,
    9028             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9029             :         },
    9030             :         {
    9031             :                 .name = discard_const_p(char, "logon_script"),
    9032             :                 .get = py_netr_DELTA_USER_get_logon_script,
    9033             :                 .set = py_netr_DELTA_USER_set_logon_script,
    9034             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9035             :         },
    9036             :         {
    9037             :                 .name = discard_const_p(char, "description"),
    9038             :                 .get = py_netr_DELTA_USER_get_description,
    9039             :                 .set = py_netr_DELTA_USER_set_description,
    9040             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9041             :         },
    9042             :         {
    9043             :                 .name = discard_const_p(char, "workstations"),
    9044             :                 .get = py_netr_DELTA_USER_get_workstations,
    9045             :                 .set = py_netr_DELTA_USER_set_workstations,
    9046             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9047             :         },
    9048             :         {
    9049             :                 .name = discard_const_p(char, "last_logon"),
    9050             :                 .get = py_netr_DELTA_USER_get_last_logon,
    9051             :                 .set = py_netr_DELTA_USER_set_last_logon,
    9052             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9053             :         },
    9054             :         {
    9055             :                 .name = discard_const_p(char, "last_logoff"),
    9056             :                 .get = py_netr_DELTA_USER_get_last_logoff,
    9057             :                 .set = py_netr_DELTA_USER_set_last_logoff,
    9058             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9059             :         },
    9060             :         {
    9061             :                 .name = discard_const_p(char, "logon_hours"),
    9062             :                 .get = py_netr_DELTA_USER_get_logon_hours,
    9063             :                 .set = py_netr_DELTA_USER_set_logon_hours,
    9064             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_LogonHours")
    9065             :         },
    9066             :         {
    9067             :                 .name = discard_const_p(char, "bad_password_count"),
    9068             :                 .get = py_netr_DELTA_USER_get_bad_password_count,
    9069             :                 .set = py_netr_DELTA_USER_set_bad_password_count,
    9070             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9071             :         },
    9072             :         {
    9073             :                 .name = discard_const_p(char, "logon_count"),
    9074             :                 .get = py_netr_DELTA_USER_get_logon_count,
    9075             :                 .set = py_netr_DELTA_USER_set_logon_count,
    9076             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9077             :         },
    9078             :         {
    9079             :                 .name = discard_const_p(char, "last_password_change"),
    9080             :                 .get = py_netr_DELTA_USER_get_last_password_change,
    9081             :                 .set = py_netr_DELTA_USER_set_last_password_change,
    9082             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9083             :         },
    9084             :         {
    9085             :                 .name = discard_const_p(char, "acct_expiry"),
    9086             :                 .get = py_netr_DELTA_USER_get_acct_expiry,
    9087             :                 .set = py_netr_DELTA_USER_set_acct_expiry,
    9088             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9089             :         },
    9090             :         {
    9091             :                 .name = discard_const_p(char, "acct_flags"),
    9092             :                 .get = py_netr_DELTA_USER_get_acct_flags,
    9093             :                 .set = py_netr_DELTA_USER_set_acct_flags,
    9094             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
    9095             :         },
    9096             :         {
    9097             :                 .name = discard_const_p(char, "lmpassword"),
    9098             :                 .get = py_netr_DELTA_USER_get_lmpassword,
    9099             :                 .set = py_netr_DELTA_USER_set_lmpassword,
    9100             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    9101             :         },
    9102             :         {
    9103             :                 .name = discard_const_p(char, "ntpassword"),
    9104             :                 .get = py_netr_DELTA_USER_get_ntpassword,
    9105             :                 .set = py_netr_DELTA_USER_set_ntpassword,
    9106             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    9107             :         },
    9108             :         {
    9109             :                 .name = discard_const_p(char, "nt_password_present"),
    9110             :                 .get = py_netr_DELTA_USER_get_nt_password_present,
    9111             :                 .set = py_netr_DELTA_USER_set_nt_password_present,
    9112             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    9113             :         },
    9114             :         {
    9115             :                 .name = discard_const_p(char, "lm_password_present"),
    9116             :                 .get = py_netr_DELTA_USER_get_lm_password_present,
    9117             :                 .set = py_netr_DELTA_USER_set_lm_password_present,
    9118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    9119             :         },
    9120             :         {
    9121             :                 .name = discard_const_p(char, "password_expired"),
    9122             :                 .get = py_netr_DELTA_USER_get_password_expired,
    9123             :                 .set = py_netr_DELTA_USER_set_password_expired,
    9124             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    9125             :         },
    9126             :         {
    9127             :                 .name = discard_const_p(char, "comment"),
    9128             :                 .get = py_netr_DELTA_USER_get_comment,
    9129             :                 .set = py_netr_DELTA_USER_set_comment,
    9130             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9131             :         },
    9132             :         {
    9133             :                 .name = discard_const_p(char, "parameters"),
    9134             :                 .get = py_netr_DELTA_USER_get_parameters,
    9135             :                 .set = py_netr_DELTA_USER_set_parameters,
    9136             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_BinaryString")
    9137             :         },
    9138             :         {
    9139             :                 .name = discard_const_p(char, "country_code"),
    9140             :                 .get = py_netr_DELTA_USER_get_country_code,
    9141             :                 .set = py_netr_DELTA_USER_set_country_code,
    9142             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9143             :         },
    9144             :         {
    9145             :                 .name = discard_const_p(char, "code_page"),
    9146             :                 .get = py_netr_DELTA_USER_get_code_page,
    9147             :                 .set = py_netr_DELTA_USER_set_code_page,
    9148             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9149             :         },
    9150             :         {
    9151             :                 .name = discard_const_p(char, "user_private_info"),
    9152             :                 .get = py_netr_DELTA_USER_get_user_private_info,
    9153             :                 .set = py_netr_DELTA_USER_set_user_private_info,
    9154             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_PRIVATE_INFO")
    9155             :         },
    9156             :         {
    9157             :                 .name = discard_const_p(char, "SecurityInformation"),
    9158             :                 .get = py_netr_DELTA_USER_get_SecurityInformation,
    9159             :                 .set = py_netr_DELTA_USER_set_SecurityInformation,
    9160             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9161             :         },
    9162             :         {
    9163             :                 .name = discard_const_p(char, "sdbuf"),
    9164             :                 .get = py_netr_DELTA_USER_get_sdbuf,
    9165             :                 .set = py_netr_DELTA_USER_set_sdbuf,
    9166             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
    9167             :         },
    9168             :         {
    9169             :                 .name = discard_const_p(char, "profile_path"),
    9170             :                 .get = py_netr_DELTA_USER_get_profile_path,
    9171             :                 .set = py_netr_DELTA_USER_set_profile_path,
    9172             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9173             :         },
    9174             :         {
    9175             :                 .name = discard_const_p(char, "unknown2"),
    9176             :                 .get = py_netr_DELTA_USER_get_unknown2,
    9177             :                 .set = py_netr_DELTA_USER_set_unknown2,
    9178             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9179             :         },
    9180             :         {
    9181             :                 .name = discard_const_p(char, "unknown3"),
    9182             :                 .get = py_netr_DELTA_USER_get_unknown3,
    9183             :                 .set = py_netr_DELTA_USER_set_unknown3,
    9184             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9185             :         },
    9186             :         {
    9187             :                 .name = discard_const_p(char, "unknown4"),
    9188             :                 .get = py_netr_DELTA_USER_get_unknown4,
    9189             :                 .set = py_netr_DELTA_USER_set_unknown4,
    9190             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9191             :         },
    9192             :         {
    9193             :                 .name = discard_const_p(char, "unknown5"),
    9194             :                 .get = py_netr_DELTA_USER_get_unknown5,
    9195             :                 .set = py_netr_DELTA_USER_set_unknown5,
    9196             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9197             :         },
    9198             :         {
    9199             :                 .name = discard_const_p(char, "unknown6"),
    9200             :                 .get = py_netr_DELTA_USER_get_unknown6,
    9201             :                 .set = py_netr_DELTA_USER_set_unknown6,
    9202             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9203             :         },
    9204             :         {
    9205             :                 .name = discard_const_p(char, "unknown7"),
    9206             :                 .get = py_netr_DELTA_USER_get_unknown7,
    9207             :                 .set = py_netr_DELTA_USER_set_unknown7,
    9208             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9209             :         },
    9210             :         {
    9211             :                 .name = discard_const_p(char, "unknown8"),
    9212             :                 .get = py_netr_DELTA_USER_get_unknown8,
    9213             :                 .set = py_netr_DELTA_USER_set_unknown8,
    9214             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9215             :         },
    9216             :         { .name = NULL }
    9217             : };
    9218             : 
    9219           0 : static PyObject *py_netr_DELTA_USER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9220             : {
    9221           0 :         return pytalloc_new(struct netr_DELTA_USER, type);
    9222             : }
    9223             : 
    9224             : 
    9225             : static PyTypeObject netr_DELTA_USER_Type = {
    9226             :         PyVarObject_HEAD_INIT(NULL, 0)
    9227             :         .tp_name = "netlogon.netr_DELTA_USER",
    9228             :         .tp_getset = py_netr_DELTA_USER_getsetters,
    9229             :         .tp_methods = NULL,
    9230             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9231             :         .tp_new = py_netr_DELTA_USER_new,
    9232             : };
    9233             : 
    9234             : 
    9235           0 : static PyObject *py_netr_DELTA_DOMAIN_get_domain_name(PyObject *obj, void *closure)
    9236             : {
    9237           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9238           0 :         PyObject *py_domain_name;
    9239           0 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
    9240           0 :         return py_domain_name;
    9241             : }
    9242             : 
    9243           0 : static int py_netr_DELTA_DOMAIN_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    9244             : {
    9245           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9246           0 :         if (value == NULL) {
    9247           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
    9248           0 :                 return -1;
    9249             :         }
    9250           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9251           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9252           0 :                 PyErr_NoMemory();
    9253           0 :                 return -1;
    9254             :         }
    9255           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    9256           0 :         return 0;
    9257             : }
    9258             : 
    9259           0 : static PyObject *py_netr_DELTA_DOMAIN_get_oem_information(PyObject *obj, void *closure)
    9260             : {
    9261           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9262           0 :         PyObject *py_oem_information;
    9263           0 :         py_oem_information = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->oem_information);
    9264           0 :         return py_oem_information;
    9265             : }
    9266             : 
    9267           0 : static int py_netr_DELTA_DOMAIN_set_oem_information(PyObject *py_obj, PyObject *value, void *closure)
    9268             : {
    9269           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9270           0 :         if (value == NULL) {
    9271           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oem_information");
    9272           0 :                 return -1;
    9273             :         }
    9274           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9275           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9276           0 :                 PyErr_NoMemory();
    9277           0 :                 return -1;
    9278             :         }
    9279           0 :         object->oem_information = *(struct lsa_String *)pytalloc_get_ptr(value);
    9280           0 :         return 0;
    9281             : }
    9282             : 
    9283           0 : static PyObject *py_netr_DELTA_DOMAIN_get_force_logoff_time(PyObject *obj, void *closure)
    9284             : {
    9285           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9286           0 :         PyObject *py_force_logoff_time;
    9287           0 :         py_force_logoff_time = PyLong_FromLongLong(object->force_logoff_time);
    9288           0 :         return py_force_logoff_time;
    9289             : }
    9290             : 
    9291           0 : static int py_netr_DELTA_DOMAIN_set_force_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
    9292             : {
    9293           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9294           0 :         if (value == NULL) {
    9295           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->force_logoff_time");
    9296           0 :                 return -1;
    9297             :         }
    9298             :         {
    9299           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->force_logoff_time));
    9300           0 :                 const long long int_min = -int_max - 1;
    9301           0 :                 if (PyLong_Check(value)) {
    9302           0 :                         long long test_var;
    9303           0 :                         test_var = PyLong_AsLongLong(value);
    9304           0 :                         if (PyErr_Occurred() != NULL) {
    9305           0 :                                 return -1;
    9306             :                         }
    9307           0 :                         if (test_var < int_min || test_var > int_max) {
    9308           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    9309             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9310           0 :                                 return -1;
    9311             :                         }
    9312           0 :                         object->force_logoff_time = test_var;
    9313             :                 } else {
    9314           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9315             :                           PyLong_Type.tp_name);
    9316           0 :                         return -1;
    9317             :                 }
    9318             :         }
    9319           0 :         return 0;
    9320             : }
    9321             : 
    9322           0 : static PyObject *py_netr_DELTA_DOMAIN_get_min_password_length(PyObject *obj, void *closure)
    9323             : {
    9324           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9325           0 :         PyObject *py_min_password_length;
    9326           0 :         py_min_password_length = PyLong_FromLong((uint16_t)object->min_password_length);
    9327           0 :         return py_min_password_length;
    9328             : }
    9329             : 
    9330           0 : static int py_netr_DELTA_DOMAIN_set_min_password_length(PyObject *py_obj, PyObject *value, void *closure)
    9331             : {
    9332           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9333           0 :         if (value == NULL) {
    9334           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->min_password_length");
    9335           0 :                 return -1;
    9336             :         }
    9337             :         {
    9338           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->min_password_length));
    9339           0 :                 if (PyLong_Check(value)) {
    9340           0 :                         unsigned long long test_var;
    9341           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9342           0 :                         if (PyErr_Occurred() != NULL) {
    9343           0 :                                 return -1;
    9344             :                         }
    9345           0 :                         if (test_var > uint_max) {
    9346           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9347             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9348           0 :                                 return -1;
    9349             :                         }
    9350           0 :                         object->min_password_length = test_var;
    9351             :                 } else {
    9352           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9353             :                           PyLong_Type.tp_name);
    9354           0 :                         return -1;
    9355             :                 }
    9356             :         }
    9357           0 :         return 0;
    9358             : }
    9359             : 
    9360           0 : static PyObject *py_netr_DELTA_DOMAIN_get_password_history_length(PyObject *obj, void *closure)
    9361             : {
    9362           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9363           0 :         PyObject *py_password_history_length;
    9364           0 :         py_password_history_length = PyLong_FromLong((uint16_t)object->password_history_length);
    9365           0 :         return py_password_history_length;
    9366             : }
    9367             : 
    9368           0 : static int py_netr_DELTA_DOMAIN_set_password_history_length(PyObject *py_obj, PyObject *value, void *closure)
    9369             : {
    9370           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9371           0 :         if (value == NULL) {
    9372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password_history_length");
    9373           0 :                 return -1;
    9374             :         }
    9375             :         {
    9376           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_history_length));
    9377           0 :                 if (PyLong_Check(value)) {
    9378           0 :                         unsigned long long test_var;
    9379           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9380           0 :                         if (PyErr_Occurred() != NULL) {
    9381           0 :                                 return -1;
    9382             :                         }
    9383           0 :                         if (test_var > uint_max) {
    9384           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9385             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9386           0 :                                 return -1;
    9387             :                         }
    9388           0 :                         object->password_history_length = test_var;
    9389             :                 } else {
    9390           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9391             :                           PyLong_Type.tp_name);
    9392           0 :                         return -1;
    9393             :                 }
    9394             :         }
    9395           0 :         return 0;
    9396             : }
    9397             : 
    9398           0 : static PyObject *py_netr_DELTA_DOMAIN_get_max_password_age(PyObject *obj, void *closure)
    9399             : {
    9400           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9401           0 :         PyObject *py_max_password_age;
    9402           0 :         py_max_password_age = PyLong_FromLongLong(object->max_password_age);
    9403           0 :         return py_max_password_age;
    9404             : }
    9405             : 
    9406           0 : static int py_netr_DELTA_DOMAIN_set_max_password_age(PyObject *py_obj, PyObject *value, void *closure)
    9407             : {
    9408           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9409           0 :         if (value == NULL) {
    9410           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_password_age");
    9411           0 :                 return -1;
    9412             :         }
    9413             :         {
    9414           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->max_password_age));
    9415           0 :                 const long long int_min = -int_max - 1;
    9416           0 :                 if (PyLong_Check(value)) {
    9417           0 :                         long long test_var;
    9418           0 :                         test_var = PyLong_AsLongLong(value);
    9419           0 :                         if (PyErr_Occurred() != NULL) {
    9420           0 :                                 return -1;
    9421             :                         }
    9422           0 :                         if (test_var < int_min || test_var > int_max) {
    9423           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    9424             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9425           0 :                                 return -1;
    9426             :                         }
    9427           0 :                         object->max_password_age = test_var;
    9428             :                 } else {
    9429           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9430             :                           PyLong_Type.tp_name);
    9431           0 :                         return -1;
    9432             :                 }
    9433             :         }
    9434           0 :         return 0;
    9435             : }
    9436             : 
    9437           0 : static PyObject *py_netr_DELTA_DOMAIN_get_min_password_age(PyObject *obj, void *closure)
    9438             : {
    9439           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9440           0 :         PyObject *py_min_password_age;
    9441           0 :         py_min_password_age = PyLong_FromLongLong(object->min_password_age);
    9442           0 :         return py_min_password_age;
    9443             : }
    9444             : 
    9445           0 : static int py_netr_DELTA_DOMAIN_set_min_password_age(PyObject *py_obj, PyObject *value, void *closure)
    9446             : {
    9447           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9448           0 :         if (value == NULL) {
    9449           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->min_password_age");
    9450           0 :                 return -1;
    9451             :         }
    9452             :         {
    9453           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->min_password_age));
    9454           0 :                 const long long int_min = -int_max - 1;
    9455           0 :                 if (PyLong_Check(value)) {
    9456           0 :                         long long test_var;
    9457           0 :                         test_var = PyLong_AsLongLong(value);
    9458           0 :                         if (PyErr_Occurred() != NULL) {
    9459           0 :                                 return -1;
    9460             :                         }
    9461           0 :                         if (test_var < int_min || test_var > int_max) {
    9462           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
    9463             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9464           0 :                                 return -1;
    9465             :                         }
    9466           0 :                         object->min_password_age = test_var;
    9467             :                 } else {
    9468           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9469             :                           PyLong_Type.tp_name);
    9470           0 :                         return -1;
    9471             :                 }
    9472             :         }
    9473           0 :         return 0;
    9474             : }
    9475             : 
    9476           0 : static PyObject *py_netr_DELTA_DOMAIN_get_sequence_num(PyObject *obj, void *closure)
    9477             : {
    9478           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9479           0 :         PyObject *py_sequence_num;
    9480           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(object->sequence_num);
    9481           0 :         return py_sequence_num;
    9482             : }
    9483             : 
    9484           0 : static int py_netr_DELTA_DOMAIN_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
    9485             : {
    9486           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9487           0 :         if (value == NULL) {
    9488           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sequence_num");
    9489           0 :                 return -1;
    9490             :         }
    9491             :         {
    9492           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sequence_num));
    9493           0 :                 if (PyLong_Check(value)) {
    9494           0 :                         unsigned long long test_var;
    9495           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9496           0 :                         if (PyErr_Occurred() != NULL) {
    9497           0 :                                 return -1;
    9498             :                         }
    9499           0 :                         if (test_var > uint_max) {
    9500           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9501             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9502           0 :                                 return -1;
    9503             :                         }
    9504           0 :                         object->sequence_num = test_var;
    9505             :                 } else {
    9506           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9507             :                           PyLong_Type.tp_name);
    9508           0 :                         return -1;
    9509             :                 }
    9510             :         }
    9511           0 :         return 0;
    9512             : }
    9513             : 
    9514           0 : static PyObject *py_netr_DELTA_DOMAIN_get_domain_create_time(PyObject *obj, void *closure)
    9515             : {
    9516           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9517           0 :         PyObject *py_domain_create_time;
    9518           0 :         py_domain_create_time = PyLong_FromUnsignedLongLong(object->domain_create_time);
    9519           0 :         return py_domain_create_time;
    9520             : }
    9521             : 
    9522           0 : static int py_netr_DELTA_DOMAIN_set_domain_create_time(PyObject *py_obj, PyObject *value, void *closure)
    9523             : {
    9524           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9525           0 :         if (value == NULL) {
    9526           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_create_time");
    9527           0 :                 return -1;
    9528             :         }
    9529             :         {
    9530           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->domain_create_time));
    9531           0 :                 if (PyLong_Check(value)) {
    9532           0 :                         unsigned long long test_var;
    9533           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9534           0 :                         if (PyErr_Occurred() != NULL) {
    9535           0 :                                 return -1;
    9536             :                         }
    9537           0 :                         if (test_var > uint_max) {
    9538           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9539             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9540           0 :                                 return -1;
    9541             :                         }
    9542           0 :                         object->domain_create_time = test_var;
    9543             :                 } else {
    9544           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9545             :                           PyLong_Type.tp_name);
    9546           0 :                         return -1;
    9547             :                 }
    9548             :         }
    9549           0 :         return 0;
    9550             : }
    9551             : 
    9552           0 : static PyObject *py_netr_DELTA_DOMAIN_get_SecurityInformation(PyObject *obj, void *closure)
    9553             : {
    9554           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9555           0 :         PyObject *py_SecurityInformation;
    9556           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
    9557           0 :         return py_SecurityInformation;
    9558             : }
    9559             : 
    9560           0 : static int py_netr_DELTA_DOMAIN_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
    9561             : {
    9562           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9563           0 :         if (value == NULL) {
    9564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
    9565           0 :                 return -1;
    9566             :         }
    9567             :         {
    9568           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
    9569           0 :                 if (PyLong_Check(value)) {
    9570           0 :                         unsigned long long test_var;
    9571           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9572           0 :                         if (PyErr_Occurred() != NULL) {
    9573           0 :                                 return -1;
    9574             :                         }
    9575           0 :                         if (test_var > uint_max) {
    9576           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9577             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9578           0 :                                 return -1;
    9579             :                         }
    9580           0 :                         object->SecurityInformation = test_var;
    9581             :                 } else {
    9582           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9583             :                           PyLong_Type.tp_name);
    9584           0 :                         return -1;
    9585             :                 }
    9586             :         }
    9587           0 :         return 0;
    9588             : }
    9589             : 
    9590           0 : static PyObject *py_netr_DELTA_DOMAIN_get_sdbuf(PyObject *obj, void *closure)
    9591             : {
    9592           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9593           0 :         PyObject *py_sdbuf;
    9594           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
    9595           0 :         return py_sdbuf;
    9596             : }
    9597             : 
    9598           0 : static int py_netr_DELTA_DOMAIN_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
    9599             : {
    9600           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9601           0 :         if (value == NULL) {
    9602           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
    9603           0 :                 return -1;
    9604             :         }
    9605           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
    9606           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9607           0 :                 PyErr_NoMemory();
    9608           0 :                 return -1;
    9609             :         }
    9610           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
    9611           0 :         return 0;
    9612             : }
    9613             : 
    9614           0 : static PyObject *py_netr_DELTA_DOMAIN_get_account_lockout(PyObject *obj, void *closure)
    9615             : {
    9616           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9617           0 :         PyObject *py_account_lockout;
    9618           0 :         py_account_lockout = pytalloc_reference_ex(lsa_BinaryString_Type, pytalloc_get_mem_ctx(obj), &object->account_lockout);
    9619           0 :         return py_account_lockout;
    9620             : }
    9621             : 
    9622           0 : static int py_netr_DELTA_DOMAIN_set_account_lockout(PyObject *py_obj, PyObject *value, void *closure)
    9623             : {
    9624           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9625           0 :         if (value == NULL) {
    9626           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_lockout");
    9627           0 :                 return -1;
    9628             :         }
    9629           0 :         PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
    9630           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9631           0 :                 PyErr_NoMemory();
    9632           0 :                 return -1;
    9633             :         }
    9634           0 :         object->account_lockout = *(struct lsa_BinaryString *)pytalloc_get_ptr(value);
    9635           0 :         return 0;
    9636             : }
    9637             : 
    9638           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown2(PyObject *obj, void *closure)
    9639             : {
    9640           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9641           0 :         PyObject *py_unknown2;
    9642           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    9643           0 :         return py_unknown2;
    9644             : }
    9645             : 
    9646           0 : static int py_netr_DELTA_DOMAIN_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    9647             : {
    9648           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9649           0 :         if (value == NULL) {
    9650           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    9651           0 :                 return -1;
    9652             :         }
    9653           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9654           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9655           0 :                 PyErr_NoMemory();
    9656           0 :                 return -1;
    9657             :         }
    9658           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    9659           0 :         return 0;
    9660             : }
    9661             : 
    9662           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown3(PyObject *obj, void *closure)
    9663             : {
    9664           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9665           0 :         PyObject *py_unknown3;
    9666           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    9667           0 :         return py_unknown3;
    9668             : }
    9669             : 
    9670           0 : static int py_netr_DELTA_DOMAIN_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    9671             : {
    9672           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9673           0 :         if (value == NULL) {
    9674           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    9675           0 :                 return -1;
    9676             :         }
    9677           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9678           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9679           0 :                 PyErr_NoMemory();
    9680           0 :                 return -1;
    9681             :         }
    9682           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    9683           0 :         return 0;
    9684             : }
    9685             : 
    9686           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown4(PyObject *obj, void *closure)
    9687             : {
    9688           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9689           0 :         PyObject *py_unknown4;
    9690           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    9691           0 :         return py_unknown4;
    9692             : }
    9693             : 
    9694           0 : static int py_netr_DELTA_DOMAIN_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    9695             : {
    9696           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9697           0 :         if (value == NULL) {
    9698           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    9699           0 :                 return -1;
    9700             :         }
    9701           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9702           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9703           0 :                 PyErr_NoMemory();
    9704           0 :                 return -1;
    9705             :         }
    9706           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    9707           0 :         return 0;
    9708             : }
    9709             : 
    9710           0 : static PyObject *py_netr_DELTA_DOMAIN_get_logon_to_chgpass(PyObject *obj, void *closure)
    9711             : {
    9712           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9713           0 :         PyObject *py_logon_to_chgpass;
    9714           0 :         py_logon_to_chgpass = PyLong_FromUnsignedLongLong((uint32_t)object->logon_to_chgpass);
    9715           0 :         return py_logon_to_chgpass;
    9716             : }
    9717             : 
    9718           0 : static int py_netr_DELTA_DOMAIN_set_logon_to_chgpass(PyObject *py_obj, PyObject *value, void *closure)
    9719             : {
    9720           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9721           0 :         if (value == NULL) {
    9722           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_to_chgpass");
    9723           0 :                 return -1;
    9724             :         }
    9725             :         {
    9726           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_to_chgpass));
    9727           0 :                 if (PyLong_Check(value)) {
    9728           0 :                         unsigned long long test_var;
    9729           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9730           0 :                         if (PyErr_Occurred() != NULL) {
    9731           0 :                                 return -1;
    9732             :                         }
    9733           0 :                         if (test_var > uint_max) {
    9734           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9735             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9736           0 :                                 return -1;
    9737             :                         }
    9738           0 :                         object->logon_to_chgpass = test_var;
    9739             :                 } else {
    9740           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9741             :                           PyLong_Type.tp_name);
    9742           0 :                         return -1;
    9743             :                 }
    9744             :         }
    9745           0 :         return 0;
    9746             : }
    9747             : 
    9748           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown6(PyObject *obj, void *closure)
    9749             : {
    9750           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9751           0 :         PyObject *py_unknown6;
    9752           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
    9753           0 :         return py_unknown6;
    9754             : }
    9755             : 
    9756           0 : static int py_netr_DELTA_DOMAIN_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    9757             : {
    9758           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9759           0 :         if (value == NULL) {
    9760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
    9761           0 :                 return -1;
    9762             :         }
    9763             :         {
    9764           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    9765           0 :                 if (PyLong_Check(value)) {
    9766           0 :                         unsigned long long test_var;
    9767           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9768           0 :                         if (PyErr_Occurred() != NULL) {
    9769           0 :                                 return -1;
    9770             :                         }
    9771           0 :                         if (test_var > uint_max) {
    9772           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9773             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9774           0 :                                 return -1;
    9775             :                         }
    9776           0 :                         object->unknown6 = test_var;
    9777             :                 } else {
    9778           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9779             :                           PyLong_Type.tp_name);
    9780           0 :                         return -1;
    9781             :                 }
    9782             :         }
    9783           0 :         return 0;
    9784             : }
    9785             : 
    9786           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown7(PyObject *obj, void *closure)
    9787             : {
    9788           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9789           0 :         PyObject *py_unknown7;
    9790           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
    9791           0 :         return py_unknown7;
    9792             : }
    9793             : 
    9794           0 : static int py_netr_DELTA_DOMAIN_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    9795             : {
    9796           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9797           0 :         if (value == NULL) {
    9798           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
    9799           0 :                 return -1;
    9800             :         }
    9801             :         {
    9802           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    9803           0 :                 if (PyLong_Check(value)) {
    9804           0 :                         unsigned long long test_var;
    9805           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9806           0 :                         if (PyErr_Occurred() != NULL) {
    9807           0 :                                 return -1;
    9808             :                         }
    9809           0 :                         if (test_var > uint_max) {
    9810           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9811             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9812           0 :                                 return -1;
    9813             :                         }
    9814           0 :                         object->unknown7 = test_var;
    9815             :                 } else {
    9816           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9817             :                           PyLong_Type.tp_name);
    9818           0 :                         return -1;
    9819             :                 }
    9820             :         }
    9821           0 :         return 0;
    9822             : }
    9823             : 
    9824           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown8(PyObject *obj, void *closure)
    9825             : {
    9826           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9827           0 :         PyObject *py_unknown8;
    9828           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
    9829           0 :         return py_unknown8;
    9830             : }
    9831             : 
    9832           0 : static int py_netr_DELTA_DOMAIN_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    9833             : {
    9834           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9835           0 :         if (value == NULL) {
    9836           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
    9837           0 :                 return -1;
    9838             :         }
    9839             :         {
    9840           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    9841           0 :                 if (PyLong_Check(value)) {
    9842           0 :                         unsigned long long test_var;
    9843           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9844           0 :                         if (PyErr_Occurred() != NULL) {
    9845           0 :                                 return -1;
    9846             :                         }
    9847           0 :                         if (test_var > uint_max) {
    9848           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9849             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9850           0 :                                 return -1;
    9851             :                         }
    9852           0 :                         object->unknown8 = test_var;
    9853             :                 } else {
    9854           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9855             :                           PyLong_Type.tp_name);
    9856           0 :                         return -1;
    9857             :                 }
    9858             :         }
    9859           0 :         return 0;
    9860             : }
    9861             : 
    9862             : static PyGetSetDef py_netr_DELTA_DOMAIN_getsetters[] = {
    9863             :         {
    9864             :                 .name = discard_const_p(char, "domain_name"),
    9865             :                 .get = py_netr_DELTA_DOMAIN_get_domain_name,
    9866             :                 .set = py_netr_DELTA_DOMAIN_set_domain_name,
    9867             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9868             :         },
    9869             :         {
    9870             :                 .name = discard_const_p(char, "oem_information"),
    9871             :                 .get = py_netr_DELTA_DOMAIN_get_oem_information,
    9872             :                 .set = py_netr_DELTA_DOMAIN_set_oem_information,
    9873             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9874             :         },
    9875             :         {
    9876             :                 .name = discard_const_p(char, "force_logoff_time"),
    9877             :                 .get = py_netr_DELTA_DOMAIN_get_force_logoff_time,
    9878             :                 .set = py_netr_DELTA_DOMAIN_set_force_logoff_time,
    9879             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    9880             :         },
    9881             :         {
    9882             :                 .name = discard_const_p(char, "min_password_length"),
    9883             :                 .get = py_netr_DELTA_DOMAIN_get_min_password_length,
    9884             :                 .set = py_netr_DELTA_DOMAIN_set_min_password_length,
    9885             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9886             :         },
    9887             :         {
    9888             :                 .name = discard_const_p(char, "password_history_length"),
    9889             :                 .get = py_netr_DELTA_DOMAIN_get_password_history_length,
    9890             :                 .set = py_netr_DELTA_DOMAIN_set_password_history_length,
    9891             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9892             :         },
    9893             :         {
    9894             :                 .name = discard_const_p(char, "max_password_age"),
    9895             :                 .get = py_netr_DELTA_DOMAIN_get_max_password_age,
    9896             :                 .set = py_netr_DELTA_DOMAIN_set_max_password_age,
    9897             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    9898             :         },
    9899             :         {
    9900             :                 .name = discard_const_p(char, "min_password_age"),
    9901             :                 .get = py_netr_DELTA_DOMAIN_get_min_password_age,
    9902             :                 .set = py_netr_DELTA_DOMAIN_set_min_password_age,
    9903             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    9904             :         },
    9905             :         {
    9906             :                 .name = discard_const_p(char, "sequence_num"),
    9907             :                 .get = py_netr_DELTA_DOMAIN_get_sequence_num,
    9908             :                 .set = py_netr_DELTA_DOMAIN_set_sequence_num,
    9909             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    9910             :         },
    9911             :         {
    9912             :                 .name = discard_const_p(char, "domain_create_time"),
    9913             :                 .get = py_netr_DELTA_DOMAIN_get_domain_create_time,
    9914             :                 .set = py_netr_DELTA_DOMAIN_set_domain_create_time,
    9915             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9916             :         },
    9917             :         {
    9918             :                 .name = discard_const_p(char, "SecurityInformation"),
    9919             :                 .get = py_netr_DELTA_DOMAIN_get_SecurityInformation,
    9920             :                 .set = py_netr_DELTA_DOMAIN_set_SecurityInformation,
    9921             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9922             :         },
    9923             :         {
    9924             :                 .name = discard_const_p(char, "sdbuf"),
    9925             :                 .get = py_netr_DELTA_DOMAIN_get_sdbuf,
    9926             :                 .set = py_netr_DELTA_DOMAIN_set_sdbuf,
    9927             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
    9928             :         },
    9929             :         {
    9930             :                 .name = discard_const_p(char, "account_lockout"),
    9931             :                 .get = py_netr_DELTA_DOMAIN_get_account_lockout,
    9932             :                 .set = py_netr_DELTA_DOMAIN_set_account_lockout,
    9933             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_BinaryString")
    9934             :         },
    9935             :         {
    9936             :                 .name = discard_const_p(char, "unknown2"),
    9937             :                 .get = py_netr_DELTA_DOMAIN_get_unknown2,
    9938             :                 .set = py_netr_DELTA_DOMAIN_set_unknown2,
    9939             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9940             :         },
    9941             :         {
    9942             :                 .name = discard_const_p(char, "unknown3"),
    9943             :                 .get = py_netr_DELTA_DOMAIN_get_unknown3,
    9944             :                 .set = py_netr_DELTA_DOMAIN_set_unknown3,
    9945             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9946             :         },
    9947             :         {
    9948             :                 .name = discard_const_p(char, "unknown4"),
    9949             :                 .get = py_netr_DELTA_DOMAIN_get_unknown4,
    9950             :                 .set = py_netr_DELTA_DOMAIN_set_unknown4,
    9951             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9952             :         },
    9953             :         {
    9954             :                 .name = discard_const_p(char, "logon_to_chgpass"),
    9955             :                 .get = py_netr_DELTA_DOMAIN_get_logon_to_chgpass,
    9956             :                 .set = py_netr_DELTA_DOMAIN_set_logon_to_chgpass,
    9957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9958             :         },
    9959             :         {
    9960             :                 .name = discard_const_p(char, "unknown6"),
    9961             :                 .get = py_netr_DELTA_DOMAIN_get_unknown6,
    9962             :                 .set = py_netr_DELTA_DOMAIN_set_unknown6,
    9963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9964             :         },
    9965             :         {
    9966             :                 .name = discard_const_p(char, "unknown7"),
    9967             :                 .get = py_netr_DELTA_DOMAIN_get_unknown7,
    9968             :                 .set = py_netr_DELTA_DOMAIN_set_unknown7,
    9969             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9970             :         },
    9971             :         {
    9972             :                 .name = discard_const_p(char, "unknown8"),
    9973             :                 .get = py_netr_DELTA_DOMAIN_get_unknown8,
    9974             :                 .set = py_netr_DELTA_DOMAIN_set_unknown8,
    9975             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9976             :         },
    9977             :         { .name = NULL }
    9978             : };
    9979             : 
    9980           0 : static PyObject *py_netr_DELTA_DOMAIN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9981             : {
    9982           0 :         return pytalloc_new(struct netr_DELTA_DOMAIN, type);
    9983             : }
    9984             : 
    9985             : 
    9986             : static PyTypeObject netr_DELTA_DOMAIN_Type = {
    9987             :         PyVarObject_HEAD_INIT(NULL, 0)
    9988             :         .tp_name = "netlogon.netr_DELTA_DOMAIN",
    9989             :         .tp_getset = py_netr_DELTA_DOMAIN_getsetters,
    9990             :         .tp_methods = NULL,
    9991             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9992             :         .tp_new = py_netr_DELTA_DOMAIN_new,
    9993             : };
    9994             : 
    9995             : 
    9996           0 : static PyObject *py_netr_DELTA_GROUP_get_group_name(PyObject *obj, void *closure)
    9997             : {
    9998           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
    9999           0 :         PyObject *py_group_name;
   10000           0 :         py_group_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->group_name);
   10001           0 :         return py_group_name;
   10002             : }
   10003             : 
   10004           0 : static int py_netr_DELTA_GROUP_set_group_name(PyObject *py_obj, PyObject *value, void *closure)
   10005             : {
   10006           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10007           0 :         if (value == NULL) {
   10008           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->group_name");
   10009           0 :                 return -1;
   10010             :         }
   10011           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10012           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10013           0 :                 PyErr_NoMemory();
   10014           0 :                 return -1;
   10015             :         }
   10016           0 :         object->group_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   10017           0 :         return 0;
   10018             : }
   10019             : 
   10020           0 : static PyObject *py_netr_DELTA_GROUP_get_rid(PyObject *obj, void *closure)
   10021             : {
   10022           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10023           0 :         PyObject *py_rid;
   10024           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
   10025           0 :         return py_rid;
   10026             : }
   10027             : 
   10028           0 : static int py_netr_DELTA_GROUP_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   10029             : {
   10030           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10031           0 :         if (value == NULL) {
   10032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
   10033           0 :                 return -1;
   10034             :         }
   10035             :         {
   10036           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
   10037           0 :                 if (PyLong_Check(value)) {
   10038           0 :                         unsigned long long test_var;
   10039           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10040           0 :                         if (PyErr_Occurred() != NULL) {
   10041           0 :                                 return -1;
   10042             :                         }
   10043           0 :                         if (test_var > uint_max) {
   10044           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10045             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10046           0 :                                 return -1;
   10047             :                         }
   10048           0 :                         object->rid = test_var;
   10049             :                 } else {
   10050           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10051             :                           PyLong_Type.tp_name);
   10052           0 :                         return -1;
   10053             :                 }
   10054             :         }
   10055           0 :         return 0;
   10056             : }
   10057             : 
   10058           0 : static PyObject *py_netr_DELTA_GROUP_get_attributes(PyObject *obj, void *closure)
   10059             : {
   10060           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10061           0 :         PyObject *py_attributes;
   10062           0 :         py_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->attributes);
   10063           0 :         return py_attributes;
   10064             : }
   10065             : 
   10066           0 : static int py_netr_DELTA_GROUP_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
   10067             : {
   10068           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10069           0 :         if (value == NULL) {
   10070           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attributes");
   10071           0 :                 return -1;
   10072             :         }
   10073             :         {
   10074           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attributes));
   10075           0 :                 if (PyLong_Check(value)) {
   10076           0 :                         unsigned long long test_var;
   10077           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10078           0 :                         if (PyErr_Occurred() != NULL) {
   10079           0 :                                 return -1;
   10080             :                         }
   10081           0 :                         if (test_var > uint_max) {
   10082           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10083             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10084           0 :                                 return -1;
   10085             :                         }
   10086           0 :                         object->attributes = test_var;
   10087             :                 } else {
   10088           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10089             :                           PyLong_Type.tp_name);
   10090           0 :                         return -1;
   10091             :                 }
   10092             :         }
   10093           0 :         return 0;
   10094             : }
   10095             : 
   10096           0 : static PyObject *py_netr_DELTA_GROUP_get_description(PyObject *obj, void *closure)
   10097             : {
   10098           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10099           0 :         PyObject *py_description;
   10100           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
   10101           0 :         return py_description;
   10102             : }
   10103             : 
   10104           0 : static int py_netr_DELTA_GROUP_set_description(PyObject *py_obj, PyObject *value, void *closure)
   10105             : {
   10106           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10107           0 :         if (value == NULL) {
   10108           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->description");
   10109           0 :                 return -1;
   10110             :         }
   10111           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10112           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10113           0 :                 PyErr_NoMemory();
   10114           0 :                 return -1;
   10115             :         }
   10116           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
   10117           0 :         return 0;
   10118             : }
   10119             : 
   10120           0 : static PyObject *py_netr_DELTA_GROUP_get_SecurityInformation(PyObject *obj, void *closure)
   10121             : {
   10122           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10123           0 :         PyObject *py_SecurityInformation;
   10124           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   10125           0 :         return py_SecurityInformation;
   10126             : }
   10127             : 
   10128           0 : static int py_netr_DELTA_GROUP_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   10129             : {
   10130           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10131           0 :         if (value == NULL) {
   10132           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   10133           0 :                 return -1;
   10134             :         }
   10135             :         {
   10136           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   10137           0 :                 if (PyLong_Check(value)) {
   10138           0 :                         unsigned long long test_var;
   10139           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10140           0 :                         if (PyErr_Occurred() != NULL) {
   10141           0 :                                 return -1;
   10142             :                         }
   10143           0 :                         if (test_var > uint_max) {
   10144           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10145             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10146           0 :                                 return -1;
   10147             :                         }
   10148           0 :                         object->SecurityInformation = test_var;
   10149             :                 } else {
   10150           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10151             :                           PyLong_Type.tp_name);
   10152           0 :                         return -1;
   10153             :                 }
   10154             :         }
   10155           0 :         return 0;
   10156             : }
   10157             : 
   10158           0 : static PyObject *py_netr_DELTA_GROUP_get_sdbuf(PyObject *obj, void *closure)
   10159             : {
   10160           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10161           0 :         PyObject *py_sdbuf;
   10162           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   10163           0 :         return py_sdbuf;
   10164             : }
   10165             : 
   10166           0 : static int py_netr_DELTA_GROUP_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   10167             : {
   10168           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10169           0 :         if (value == NULL) {
   10170           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   10171           0 :                 return -1;
   10172             :         }
   10173           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   10174           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10175           0 :                 PyErr_NoMemory();
   10176           0 :                 return -1;
   10177             :         }
   10178           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   10179           0 :         return 0;
   10180             : }
   10181             : 
   10182           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown1(PyObject *obj, void *closure)
   10183             : {
   10184           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10185           0 :         PyObject *py_unknown1;
   10186           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   10187           0 :         return py_unknown1;
   10188             : }
   10189             : 
   10190           0 : static int py_netr_DELTA_GROUP_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   10191             : {
   10192           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10193           0 :         if (value == NULL) {
   10194           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   10195           0 :                 return -1;
   10196             :         }
   10197           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10198           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10199           0 :                 PyErr_NoMemory();
   10200           0 :                 return -1;
   10201             :         }
   10202           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10203           0 :         return 0;
   10204             : }
   10205             : 
   10206           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown2(PyObject *obj, void *closure)
   10207             : {
   10208           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10209           0 :         PyObject *py_unknown2;
   10210           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   10211           0 :         return py_unknown2;
   10212             : }
   10213             : 
   10214           0 : static int py_netr_DELTA_GROUP_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   10215             : {
   10216           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10217           0 :         if (value == NULL) {
   10218           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   10219           0 :                 return -1;
   10220             :         }
   10221           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10222           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10223           0 :                 PyErr_NoMemory();
   10224           0 :                 return -1;
   10225             :         }
   10226           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10227           0 :         return 0;
   10228             : }
   10229             : 
   10230           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown3(PyObject *obj, void *closure)
   10231             : {
   10232           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10233           0 :         PyObject *py_unknown3;
   10234           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   10235           0 :         return py_unknown3;
   10236             : }
   10237             : 
   10238           0 : static int py_netr_DELTA_GROUP_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   10239             : {
   10240           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10241           0 :         if (value == NULL) {
   10242           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   10243           0 :                 return -1;
   10244             :         }
   10245           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10246           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10247           0 :                 PyErr_NoMemory();
   10248           0 :                 return -1;
   10249             :         }
   10250           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10251           0 :         return 0;
   10252             : }
   10253             : 
   10254           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown4(PyObject *obj, void *closure)
   10255             : {
   10256           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10257           0 :         PyObject *py_unknown4;
   10258           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   10259           0 :         return py_unknown4;
   10260             : }
   10261             : 
   10262           0 : static int py_netr_DELTA_GROUP_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   10263             : {
   10264           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10265           0 :         if (value == NULL) {
   10266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   10267           0 :                 return -1;
   10268             :         }
   10269           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10270           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10271           0 :                 PyErr_NoMemory();
   10272           0 :                 return -1;
   10273             :         }
   10274           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10275           0 :         return 0;
   10276             : }
   10277             : 
   10278           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown5(PyObject *obj, void *closure)
   10279             : {
   10280           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10281           0 :         PyObject *py_unknown5;
   10282           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   10283           0 :         return py_unknown5;
   10284             : }
   10285             : 
   10286           0 : static int py_netr_DELTA_GROUP_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   10287             : {
   10288           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10289           0 :         if (value == NULL) {
   10290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   10291           0 :                 return -1;
   10292             :         }
   10293             :         {
   10294           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   10295           0 :                 if (PyLong_Check(value)) {
   10296           0 :                         unsigned long long test_var;
   10297           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10298           0 :                         if (PyErr_Occurred() != NULL) {
   10299           0 :                                 return -1;
   10300             :                         }
   10301           0 :                         if (test_var > uint_max) {
   10302           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10303             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10304           0 :                                 return -1;
   10305             :                         }
   10306           0 :                         object->unknown5 = test_var;
   10307             :                 } else {
   10308           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10309             :                           PyLong_Type.tp_name);
   10310           0 :                         return -1;
   10311             :                 }
   10312             :         }
   10313           0 :         return 0;
   10314             : }
   10315             : 
   10316           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown6(PyObject *obj, void *closure)
   10317             : {
   10318           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10319           0 :         PyObject *py_unknown6;
   10320           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   10321           0 :         return py_unknown6;
   10322             : }
   10323             : 
   10324           0 : static int py_netr_DELTA_GROUP_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   10325             : {
   10326           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10327           0 :         if (value == NULL) {
   10328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   10329           0 :                 return -1;
   10330             :         }
   10331             :         {
   10332           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   10333           0 :                 if (PyLong_Check(value)) {
   10334           0 :                         unsigned long long test_var;
   10335           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10336           0 :                         if (PyErr_Occurred() != NULL) {
   10337           0 :                                 return -1;
   10338             :                         }
   10339           0 :                         if (test_var > uint_max) {
   10340           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10341             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10342           0 :                                 return -1;
   10343             :                         }
   10344           0 :                         object->unknown6 = test_var;
   10345             :                 } else {
   10346           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10347             :                           PyLong_Type.tp_name);
   10348           0 :                         return -1;
   10349             :                 }
   10350             :         }
   10351           0 :         return 0;
   10352             : }
   10353             : 
   10354           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown7(PyObject *obj, void *closure)
   10355             : {
   10356           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10357           0 :         PyObject *py_unknown7;
   10358           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   10359           0 :         return py_unknown7;
   10360             : }
   10361             : 
   10362           0 : static int py_netr_DELTA_GROUP_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   10363             : {
   10364           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10365           0 :         if (value == NULL) {
   10366           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   10367           0 :                 return -1;
   10368             :         }
   10369             :         {
   10370           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   10371           0 :                 if (PyLong_Check(value)) {
   10372           0 :                         unsigned long long test_var;
   10373           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10374           0 :                         if (PyErr_Occurred() != NULL) {
   10375           0 :                                 return -1;
   10376             :                         }
   10377           0 :                         if (test_var > uint_max) {
   10378           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10379             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10380           0 :                                 return -1;
   10381             :                         }
   10382           0 :                         object->unknown7 = test_var;
   10383             :                 } else {
   10384           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10385             :                           PyLong_Type.tp_name);
   10386           0 :                         return -1;
   10387             :                 }
   10388             :         }
   10389           0 :         return 0;
   10390             : }
   10391             : 
   10392           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown8(PyObject *obj, void *closure)
   10393             : {
   10394           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10395           0 :         PyObject *py_unknown8;
   10396           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   10397           0 :         return py_unknown8;
   10398             : }
   10399             : 
   10400           0 : static int py_netr_DELTA_GROUP_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   10401             : {
   10402           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10403           0 :         if (value == NULL) {
   10404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   10405           0 :                 return -1;
   10406             :         }
   10407             :         {
   10408           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   10409           0 :                 if (PyLong_Check(value)) {
   10410           0 :                         unsigned long long test_var;
   10411           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10412           0 :                         if (PyErr_Occurred() != NULL) {
   10413           0 :                                 return -1;
   10414             :                         }
   10415           0 :                         if (test_var > uint_max) {
   10416           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10417             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10418           0 :                                 return -1;
   10419             :                         }
   10420           0 :                         object->unknown8 = test_var;
   10421             :                 } else {
   10422           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10423             :                           PyLong_Type.tp_name);
   10424           0 :                         return -1;
   10425             :                 }
   10426             :         }
   10427           0 :         return 0;
   10428             : }
   10429             : 
   10430             : static PyGetSetDef py_netr_DELTA_GROUP_getsetters[] = {
   10431             :         {
   10432             :                 .name = discard_const_p(char, "group_name"),
   10433             :                 .get = py_netr_DELTA_GROUP_get_group_name,
   10434             :                 .set = py_netr_DELTA_GROUP_set_group_name,
   10435             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10436             :         },
   10437             :         {
   10438             :                 .name = discard_const_p(char, "rid"),
   10439             :                 .get = py_netr_DELTA_GROUP_get_rid,
   10440             :                 .set = py_netr_DELTA_GROUP_set_rid,
   10441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10442             :         },
   10443             :         {
   10444             :                 .name = discard_const_p(char, "attributes"),
   10445             :                 .get = py_netr_DELTA_GROUP_get_attributes,
   10446             :                 .set = py_netr_DELTA_GROUP_set_attributes,
   10447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10448             :         },
   10449             :         {
   10450             :                 .name = discard_const_p(char, "description"),
   10451             :                 .get = py_netr_DELTA_GROUP_get_description,
   10452             :                 .set = py_netr_DELTA_GROUP_set_description,
   10453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10454             :         },
   10455             :         {
   10456             :                 .name = discard_const_p(char, "SecurityInformation"),
   10457             :                 .get = py_netr_DELTA_GROUP_get_SecurityInformation,
   10458             :                 .set = py_netr_DELTA_GROUP_set_SecurityInformation,
   10459             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10460             :         },
   10461             :         {
   10462             :                 .name = discard_const_p(char, "sdbuf"),
   10463             :                 .get = py_netr_DELTA_GROUP_get_sdbuf,
   10464             :                 .set = py_netr_DELTA_GROUP_set_sdbuf,
   10465             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   10466             :         },
   10467             :         {
   10468             :                 .name = discard_const_p(char, "unknown1"),
   10469             :                 .get = py_netr_DELTA_GROUP_get_unknown1,
   10470             :                 .set = py_netr_DELTA_GROUP_set_unknown1,
   10471             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10472             :         },
   10473             :         {
   10474             :                 .name = discard_const_p(char, "unknown2"),
   10475             :                 .get = py_netr_DELTA_GROUP_get_unknown2,
   10476             :                 .set = py_netr_DELTA_GROUP_set_unknown2,
   10477             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10478             :         },
   10479             :         {
   10480             :                 .name = discard_const_p(char, "unknown3"),
   10481             :                 .get = py_netr_DELTA_GROUP_get_unknown3,
   10482             :                 .set = py_netr_DELTA_GROUP_set_unknown3,
   10483             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10484             :         },
   10485             :         {
   10486             :                 .name = discard_const_p(char, "unknown4"),
   10487             :                 .get = py_netr_DELTA_GROUP_get_unknown4,
   10488             :                 .set = py_netr_DELTA_GROUP_set_unknown4,
   10489             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10490             :         },
   10491             :         {
   10492             :                 .name = discard_const_p(char, "unknown5"),
   10493             :                 .get = py_netr_DELTA_GROUP_get_unknown5,
   10494             :                 .set = py_netr_DELTA_GROUP_set_unknown5,
   10495             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10496             :         },
   10497             :         {
   10498             :                 .name = discard_const_p(char, "unknown6"),
   10499             :                 .get = py_netr_DELTA_GROUP_get_unknown6,
   10500             :                 .set = py_netr_DELTA_GROUP_set_unknown6,
   10501             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10502             :         },
   10503             :         {
   10504             :                 .name = discard_const_p(char, "unknown7"),
   10505             :                 .get = py_netr_DELTA_GROUP_get_unknown7,
   10506             :                 .set = py_netr_DELTA_GROUP_set_unknown7,
   10507             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10508             :         },
   10509             :         {
   10510             :                 .name = discard_const_p(char, "unknown8"),
   10511             :                 .get = py_netr_DELTA_GROUP_get_unknown8,
   10512             :                 .set = py_netr_DELTA_GROUP_set_unknown8,
   10513             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10514             :         },
   10515             :         { .name = NULL }
   10516             : };
   10517             : 
   10518           0 : static PyObject *py_netr_DELTA_GROUP_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10519             : {
   10520           0 :         return pytalloc_new(struct netr_DELTA_GROUP, type);
   10521             : }
   10522             : 
   10523             : 
   10524             : static PyTypeObject netr_DELTA_GROUP_Type = {
   10525             :         PyVarObject_HEAD_INIT(NULL, 0)
   10526             :         .tp_name = "netlogon.netr_DELTA_GROUP",
   10527             :         .tp_getset = py_netr_DELTA_GROUP_getsetters,
   10528             :         .tp_methods = NULL,
   10529             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10530             :         .tp_new = py_netr_DELTA_GROUP_new,
   10531             : };
   10532             : 
   10533             : 
   10534           0 : static PyObject *py_netr_DELTA_RENAME_get_OldName(PyObject *obj, void *closure)
   10535             : {
   10536           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10537           0 :         PyObject *py_OldName;
   10538           0 :         py_OldName = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->OldName);
   10539           0 :         return py_OldName;
   10540             : }
   10541             : 
   10542           0 : static int py_netr_DELTA_RENAME_set_OldName(PyObject *py_obj, PyObject *value, void *closure)
   10543             : {
   10544           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10545           0 :         if (value == NULL) {
   10546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->OldName");
   10547           0 :                 return -1;
   10548             :         }
   10549           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10550           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10551           0 :                 PyErr_NoMemory();
   10552           0 :                 return -1;
   10553             :         }
   10554           0 :         object->OldName = *(struct lsa_String *)pytalloc_get_ptr(value);
   10555           0 :         return 0;
   10556             : }
   10557             : 
   10558           0 : static PyObject *py_netr_DELTA_RENAME_get_NewName(PyObject *obj, void *closure)
   10559             : {
   10560           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10561           0 :         PyObject *py_NewName;
   10562           0 :         py_NewName = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->NewName);
   10563           0 :         return py_NewName;
   10564             : }
   10565             : 
   10566           0 : static int py_netr_DELTA_RENAME_set_NewName(PyObject *py_obj, PyObject *value, void *closure)
   10567             : {
   10568           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10569           0 :         if (value == NULL) {
   10570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->NewName");
   10571           0 :                 return -1;
   10572             :         }
   10573           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10574           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10575           0 :                 PyErr_NoMemory();
   10576           0 :                 return -1;
   10577             :         }
   10578           0 :         object->NewName = *(struct lsa_String *)pytalloc_get_ptr(value);
   10579           0 :         return 0;
   10580             : }
   10581             : 
   10582           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown1(PyObject *obj, void *closure)
   10583             : {
   10584           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10585           0 :         PyObject *py_unknown1;
   10586           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   10587           0 :         return py_unknown1;
   10588             : }
   10589             : 
   10590           0 : static int py_netr_DELTA_RENAME_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   10591             : {
   10592           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10593           0 :         if (value == NULL) {
   10594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   10595           0 :                 return -1;
   10596             :         }
   10597           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10598           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10599           0 :                 PyErr_NoMemory();
   10600           0 :                 return -1;
   10601             :         }
   10602           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10603           0 :         return 0;
   10604             : }
   10605             : 
   10606           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown2(PyObject *obj, void *closure)
   10607             : {
   10608           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10609           0 :         PyObject *py_unknown2;
   10610           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   10611           0 :         return py_unknown2;
   10612             : }
   10613             : 
   10614           0 : static int py_netr_DELTA_RENAME_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   10615             : {
   10616           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10617           0 :         if (value == NULL) {
   10618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   10619           0 :                 return -1;
   10620             :         }
   10621           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10622           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10623           0 :                 PyErr_NoMemory();
   10624           0 :                 return -1;
   10625             :         }
   10626           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10627           0 :         return 0;
   10628             : }
   10629             : 
   10630           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown3(PyObject *obj, void *closure)
   10631             : {
   10632           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10633           0 :         PyObject *py_unknown3;
   10634           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   10635           0 :         return py_unknown3;
   10636             : }
   10637             : 
   10638           0 : static int py_netr_DELTA_RENAME_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   10639             : {
   10640           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10641           0 :         if (value == NULL) {
   10642           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   10643           0 :                 return -1;
   10644             :         }
   10645           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10646           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10647           0 :                 PyErr_NoMemory();
   10648           0 :                 return -1;
   10649             :         }
   10650           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10651           0 :         return 0;
   10652             : }
   10653             : 
   10654           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown4(PyObject *obj, void *closure)
   10655             : {
   10656           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10657           0 :         PyObject *py_unknown4;
   10658           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   10659           0 :         return py_unknown4;
   10660             : }
   10661             : 
   10662           0 : static int py_netr_DELTA_RENAME_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   10663             : {
   10664           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10665           0 :         if (value == NULL) {
   10666           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   10667           0 :                 return -1;
   10668             :         }
   10669           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10670           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10671           0 :                 PyErr_NoMemory();
   10672           0 :                 return -1;
   10673             :         }
   10674           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10675           0 :         return 0;
   10676             : }
   10677             : 
   10678           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown5(PyObject *obj, void *closure)
   10679             : {
   10680           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10681           0 :         PyObject *py_unknown5;
   10682           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   10683           0 :         return py_unknown5;
   10684             : }
   10685             : 
   10686           0 : static int py_netr_DELTA_RENAME_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   10687             : {
   10688           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10689           0 :         if (value == NULL) {
   10690           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   10691           0 :                 return -1;
   10692             :         }
   10693             :         {
   10694           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   10695           0 :                 if (PyLong_Check(value)) {
   10696           0 :                         unsigned long long test_var;
   10697           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10698           0 :                         if (PyErr_Occurred() != NULL) {
   10699           0 :                                 return -1;
   10700             :                         }
   10701           0 :                         if (test_var > uint_max) {
   10702           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10703             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10704           0 :                                 return -1;
   10705             :                         }
   10706           0 :                         object->unknown5 = test_var;
   10707             :                 } else {
   10708           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10709             :                           PyLong_Type.tp_name);
   10710           0 :                         return -1;
   10711             :                 }
   10712             :         }
   10713           0 :         return 0;
   10714             : }
   10715             : 
   10716           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown6(PyObject *obj, void *closure)
   10717             : {
   10718           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10719           0 :         PyObject *py_unknown6;
   10720           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   10721           0 :         return py_unknown6;
   10722             : }
   10723             : 
   10724           0 : static int py_netr_DELTA_RENAME_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   10725             : {
   10726           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10727           0 :         if (value == NULL) {
   10728           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   10729           0 :                 return -1;
   10730             :         }
   10731             :         {
   10732           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   10733           0 :                 if (PyLong_Check(value)) {
   10734           0 :                         unsigned long long test_var;
   10735           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10736           0 :                         if (PyErr_Occurred() != NULL) {
   10737           0 :                                 return -1;
   10738             :                         }
   10739           0 :                         if (test_var > uint_max) {
   10740           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10741             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10742           0 :                                 return -1;
   10743             :                         }
   10744           0 :                         object->unknown6 = test_var;
   10745             :                 } else {
   10746           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10747             :                           PyLong_Type.tp_name);
   10748           0 :                         return -1;
   10749             :                 }
   10750             :         }
   10751           0 :         return 0;
   10752             : }
   10753             : 
   10754           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown7(PyObject *obj, void *closure)
   10755             : {
   10756           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10757           0 :         PyObject *py_unknown7;
   10758           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   10759           0 :         return py_unknown7;
   10760             : }
   10761             : 
   10762           0 : static int py_netr_DELTA_RENAME_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   10763             : {
   10764           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10765           0 :         if (value == NULL) {
   10766           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   10767           0 :                 return -1;
   10768             :         }
   10769             :         {
   10770           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   10771           0 :                 if (PyLong_Check(value)) {
   10772           0 :                         unsigned long long test_var;
   10773           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10774           0 :                         if (PyErr_Occurred() != NULL) {
   10775           0 :                                 return -1;
   10776             :                         }
   10777           0 :                         if (test_var > uint_max) {
   10778           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10779             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10780           0 :                                 return -1;
   10781             :                         }
   10782           0 :                         object->unknown7 = test_var;
   10783             :                 } else {
   10784           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10785             :                           PyLong_Type.tp_name);
   10786           0 :                         return -1;
   10787             :                 }
   10788             :         }
   10789           0 :         return 0;
   10790             : }
   10791             : 
   10792           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown8(PyObject *obj, void *closure)
   10793             : {
   10794           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10795           0 :         PyObject *py_unknown8;
   10796           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   10797           0 :         return py_unknown8;
   10798             : }
   10799             : 
   10800           0 : static int py_netr_DELTA_RENAME_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   10801             : {
   10802           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10803           0 :         if (value == NULL) {
   10804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   10805           0 :                 return -1;
   10806             :         }
   10807             :         {
   10808           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   10809           0 :                 if (PyLong_Check(value)) {
   10810           0 :                         unsigned long long test_var;
   10811           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10812           0 :                         if (PyErr_Occurred() != NULL) {
   10813           0 :                                 return -1;
   10814             :                         }
   10815           0 :                         if (test_var > uint_max) {
   10816           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10817             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10818           0 :                                 return -1;
   10819             :                         }
   10820           0 :                         object->unknown8 = test_var;
   10821             :                 } else {
   10822           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10823             :                           PyLong_Type.tp_name);
   10824           0 :                         return -1;
   10825             :                 }
   10826             :         }
   10827           0 :         return 0;
   10828             : }
   10829             : 
   10830             : static PyGetSetDef py_netr_DELTA_RENAME_getsetters[] = {
   10831             :         {
   10832             :                 .name = discard_const_p(char, "OldName"),
   10833             :                 .get = py_netr_DELTA_RENAME_get_OldName,
   10834             :                 .set = py_netr_DELTA_RENAME_set_OldName,
   10835             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10836             :         },
   10837             :         {
   10838             :                 .name = discard_const_p(char, "NewName"),
   10839             :                 .get = py_netr_DELTA_RENAME_get_NewName,
   10840             :                 .set = py_netr_DELTA_RENAME_set_NewName,
   10841             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10842             :         },
   10843             :         {
   10844             :                 .name = discard_const_p(char, "unknown1"),
   10845             :                 .get = py_netr_DELTA_RENAME_get_unknown1,
   10846             :                 .set = py_netr_DELTA_RENAME_set_unknown1,
   10847             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10848             :         },
   10849             :         {
   10850             :                 .name = discard_const_p(char, "unknown2"),
   10851             :                 .get = py_netr_DELTA_RENAME_get_unknown2,
   10852             :                 .set = py_netr_DELTA_RENAME_set_unknown2,
   10853             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10854             :         },
   10855             :         {
   10856             :                 .name = discard_const_p(char, "unknown3"),
   10857             :                 .get = py_netr_DELTA_RENAME_get_unknown3,
   10858             :                 .set = py_netr_DELTA_RENAME_set_unknown3,
   10859             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10860             :         },
   10861             :         {
   10862             :                 .name = discard_const_p(char, "unknown4"),
   10863             :                 .get = py_netr_DELTA_RENAME_get_unknown4,
   10864             :                 .set = py_netr_DELTA_RENAME_set_unknown4,
   10865             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10866             :         },
   10867             :         {
   10868             :                 .name = discard_const_p(char, "unknown5"),
   10869             :                 .get = py_netr_DELTA_RENAME_get_unknown5,
   10870             :                 .set = py_netr_DELTA_RENAME_set_unknown5,
   10871             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10872             :         },
   10873             :         {
   10874             :                 .name = discard_const_p(char, "unknown6"),
   10875             :                 .get = py_netr_DELTA_RENAME_get_unknown6,
   10876             :                 .set = py_netr_DELTA_RENAME_set_unknown6,
   10877             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10878             :         },
   10879             :         {
   10880             :                 .name = discard_const_p(char, "unknown7"),
   10881             :                 .get = py_netr_DELTA_RENAME_get_unknown7,
   10882             :                 .set = py_netr_DELTA_RENAME_set_unknown7,
   10883             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10884             :         },
   10885             :         {
   10886             :                 .name = discard_const_p(char, "unknown8"),
   10887             :                 .get = py_netr_DELTA_RENAME_get_unknown8,
   10888             :                 .set = py_netr_DELTA_RENAME_set_unknown8,
   10889             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10890             :         },
   10891             :         { .name = NULL }
   10892             : };
   10893             : 
   10894           0 : static PyObject *py_netr_DELTA_RENAME_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10895             : {
   10896           0 :         return pytalloc_new(struct netr_DELTA_RENAME, type);
   10897             : }
   10898             : 
   10899             : 
   10900             : static PyTypeObject netr_DELTA_RENAME_Type = {
   10901             :         PyVarObject_HEAD_INIT(NULL, 0)
   10902             :         .tp_name = "netlogon.netr_DELTA_RENAME",
   10903             :         .tp_getset = py_netr_DELTA_RENAME_getsetters,
   10904             :         .tp_methods = NULL,
   10905             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10906             :         .tp_new = py_netr_DELTA_RENAME_new,
   10907             : };
   10908             : 
   10909             : 
   10910           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_rids(PyObject *obj, void *closure)
   10911             : {
   10912           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   10913           0 :         PyObject *py_rids;
   10914           0 :         if (object->rids == NULL) {
   10915           0 :                 Py_RETURN_NONE;
   10916             :         }
   10917           0 :         if (object->rids == NULL) {
   10918           0 :                 py_rids = Py_None;
   10919           0 :                 Py_INCREF(py_rids);
   10920             :         } else {
   10921           0 :                 py_rids = PyList_New(object->num_rids);
   10922           0 :                 if (py_rids == NULL) {
   10923           0 :                         return NULL;
   10924             :                 }
   10925             :                 {
   10926             :                         int rids_cntr_1;
   10927           0 :                         for (rids_cntr_1 = 0; rids_cntr_1 < (object->num_rids); rids_cntr_1++) {
   10928           0 :                                 PyObject *py_rids_1;
   10929           0 :                                 py_rids_1 = PyLong_FromUnsignedLongLong((uint32_t)object->rids[rids_cntr_1]);
   10930           0 :                                 PyList_SetItem(py_rids, rids_cntr_1, py_rids_1);
   10931             :                         }
   10932             :                 }
   10933             :         }
   10934           0 :         return py_rids;
   10935             : }
   10936             : 
   10937           0 : static int py_netr_DELTA_GROUP_MEMBER_set_rids(PyObject *py_obj, PyObject *value, void *closure)
   10938             : {
   10939           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   10940           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->rids));
   10941           0 :         if (value == NULL) {
   10942           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rids");
   10943           0 :                 return -1;
   10944             :         }
   10945           0 :         if (value == Py_None) {
   10946           0 :                 object->rids = NULL;
   10947             :         } else {
   10948           0 :                 object->rids = NULL;
   10949           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10950             :                 {
   10951           0 :                         int rids_cntr_1;
   10952           0 :                         object->rids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->rids, PyList_GET_SIZE(value));
   10953           0 :                         if (!object->rids) { return -1; }
   10954           0 :                         talloc_set_name_const(object->rids, "ARRAY: object->rids");
   10955           0 :                         for (rids_cntr_1 = 0; rids_cntr_1 < PyList_GET_SIZE(value); rids_cntr_1++) {
   10956           0 :                                 if (PyList_GET_ITEM(value, rids_cntr_1) == NULL) {
   10957           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rids[rids_cntr_1]");
   10958           0 :                                         return -1;
   10959             :                                 }
   10960             :                                 {
   10961           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rids[rids_cntr_1]));
   10962           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, rids_cntr_1))) {
   10963           0 :                                                 unsigned long long test_var;
   10964           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, rids_cntr_1));
   10965           0 :                                                 if (PyErr_Occurred() != NULL) {
   10966           0 :                                                         return -1;
   10967             :                                                 }
   10968           0 :                                                 if (test_var > uint_max) {
   10969           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10970             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   10971           0 :                                                         return -1;
   10972             :                                                 }
   10973           0 :                                                 object->rids[rids_cntr_1] = test_var;
   10974             :                                         } else {
   10975           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   10976             :                                                   PyLong_Type.tp_name);
   10977           0 :                                                 return -1;
   10978             :                                         }
   10979             :                                 }
   10980             :                         }
   10981             :                 }
   10982             :         }
   10983           0 :         return 0;
   10984             : }
   10985             : 
   10986           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_attribs(PyObject *obj, void *closure)
   10987             : {
   10988           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   10989           0 :         PyObject *py_attribs;
   10990           0 :         if (object->attribs == NULL) {
   10991           0 :                 Py_RETURN_NONE;
   10992             :         }
   10993           0 :         if (object->attribs == NULL) {
   10994           0 :                 py_attribs = Py_None;
   10995           0 :                 Py_INCREF(py_attribs);
   10996             :         } else {
   10997           0 :                 py_attribs = PyList_New(object->num_rids);
   10998           0 :                 if (py_attribs == NULL) {
   10999           0 :                         return NULL;
   11000             :                 }
   11001             :                 {
   11002             :                         int attribs_cntr_1;
   11003           0 :                         for (attribs_cntr_1 = 0; attribs_cntr_1 < (object->num_rids); attribs_cntr_1++) {
   11004           0 :                                 PyObject *py_attribs_1;
   11005           0 :                                 py_attribs_1 = PyLong_FromUnsignedLongLong((uint32_t)object->attribs[attribs_cntr_1]);
   11006           0 :                                 PyList_SetItem(py_attribs, attribs_cntr_1, py_attribs_1);
   11007             :                         }
   11008             :                 }
   11009             :         }
   11010           0 :         return py_attribs;
   11011             : }
   11012             : 
   11013           0 : static int py_netr_DELTA_GROUP_MEMBER_set_attribs(PyObject *py_obj, PyObject *value, void *closure)
   11014             : {
   11015           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   11016           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->attribs));
   11017           0 :         if (value == NULL) {
   11018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribs");
   11019           0 :                 return -1;
   11020             :         }
   11021           0 :         if (value == Py_None) {
   11022           0 :                 object->attribs = NULL;
   11023             :         } else {
   11024           0 :                 object->attribs = NULL;
   11025           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   11026             :                 {
   11027           0 :                         int attribs_cntr_1;
   11028           0 :                         object->attribs = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->attribs, PyList_GET_SIZE(value));
   11029           0 :                         if (!object->attribs) { return -1; }
   11030           0 :                         talloc_set_name_const(object->attribs, "ARRAY: object->attribs");
   11031           0 :                         for (attribs_cntr_1 = 0; attribs_cntr_1 < PyList_GET_SIZE(value); attribs_cntr_1++) {
   11032           0 :                                 if (PyList_GET_ITEM(value, attribs_cntr_1) == NULL) {
   11033           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribs[attribs_cntr_1]");
   11034           0 :                                         return -1;
   11035             :                                 }
   11036             :                                 {
   11037           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attribs[attribs_cntr_1]));
   11038           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, attribs_cntr_1))) {
   11039           0 :                                                 unsigned long long test_var;
   11040           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, attribs_cntr_1));
   11041           0 :                                                 if (PyErr_Occurred() != NULL) {
   11042           0 :                                                         return -1;
   11043             :                                                 }
   11044           0 :                                                 if (test_var > uint_max) {
   11045           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11046             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   11047           0 :                                                         return -1;
   11048             :                                                 }
   11049           0 :                                                 object->attribs[attribs_cntr_1] = test_var;
   11050             :                                         } else {
   11051           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   11052             :                                                   PyLong_Type.tp_name);
   11053           0 :                                                 return -1;
   11054             :                                         }
   11055             :                                 }
   11056             :                         }
   11057             :                 }
   11058             :         }
   11059           0 :         return 0;
   11060             : }
   11061             : 
   11062           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_num_rids(PyObject *obj, void *closure)
   11063             : {
   11064           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   11065           0 :         PyObject *py_num_rids;
   11066           0 :         py_num_rids = PyLong_FromUnsignedLongLong((uint32_t)object->num_rids);
   11067           0 :         return py_num_rids;
   11068             : }
   11069             : 
   11070           0 : static int py_netr_DELTA_GROUP_MEMBER_set_num_rids(PyObject *py_obj, PyObject *value, void *closure)
   11071             : {
   11072           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   11073           0 :         if (value == NULL) {
   11074           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_rids");
   11075           0 :                 return -1;
   11076             :         }
   11077             :         {
   11078           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_rids));
   11079           0 :                 if (PyLong_Check(value)) {
   11080           0 :                         unsigned long long test_var;
   11081           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11082           0 :                         if (PyErr_Occurred() != NULL) {
   11083           0 :                                 return -1;
   11084             :                         }
   11085           0 :                         if (test_var > uint_max) {
   11086           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11087             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11088           0 :                                 return -1;
   11089             :                         }
   11090           0 :                         object->num_rids = test_var;
   11091             :                 } else {
   11092           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11093             :                           PyLong_Type.tp_name);
   11094           0 :                         return -1;
   11095             :                 }
   11096             :         }
   11097           0 :         return 0;
   11098             : }
   11099             : 
   11100           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown1(PyObject *obj, void *closure)
   11101             : {
   11102           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   11103           0 :         PyObject *py_unknown1;
   11104           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
   11105           0 :         return py_unknown1;
   11106             : }
   11107             : 
   11108           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   11109             : {
   11110           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   11111           0 :         if (value == NULL) {
   11112           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   11113           0 :                 return -1;
   11114             :         }
   11115             :         {
   11116           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   11117           0 :                 if (PyLong_Check(value)) {
   11118           0 :                         unsigned long long test_var;
   11119           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11120           0 :                         if (PyErr_Occurred() != NULL) {
   11121           0 :                                 return -1;
   11122             :                         }
   11123           0 :                         if (test_var > uint_max) {
   11124           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11125             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11126           0 :                                 return -1;
   11127             :                         }
   11128           0 :                         object->unknown1 = test_var;
   11129             :                 } else {
   11130           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11131             :                           PyLong_Type.tp_name);
   11132           0 :                         return -1;
   11133             :                 }
   11134             :         }
   11135           0 :         return 0;
   11136             : }
   11137             : 
   11138           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown2(PyObject *obj, void *closure)
   11139             : {
   11140           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   11141           0 :         PyObject *py_unknown2;
   11142           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
   11143           0 :         return py_unknown2;
   11144             : }
   11145             : 
   11146           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   11147             : {
   11148           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   11149           0 :         if (value == NULL) {
   11150           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   11151           0 :                 return -1;
   11152             :         }
   11153             :         {
   11154           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   11155           0 :                 if (PyLong_Check(value)) {
   11156           0 :                         unsigned long long test_var;
   11157           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11158           0 :                         if (PyErr_Occurred() != NULL) {
   11159           0 :                                 return -1;
   11160             :                         }
   11161           0 :                         if (test_var > uint_max) {
   11162           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11163             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11164           0 :                                 return -1;
   11165             :                         }
   11166           0 :                         object->unknown2 = test_var;
   11167             :                 } else {
   11168           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11169             :                           PyLong_Type.tp_name);
   11170           0 :                         return -1;
   11171             :                 }
   11172             :         }
   11173           0 :         return 0;
   11174             : }
   11175             : 
   11176           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown3(PyObject *obj, void *closure)
   11177             : {
   11178           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   11179           0 :         PyObject *py_unknown3;
   11180           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown3);
   11181           0 :         return py_unknown3;
   11182             : }
   11183             : 
   11184           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   11185             : {
   11186           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   11187           0 :         if (value == NULL) {
   11188           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   11189           0 :                 return -1;
   11190             :         }
   11191             :         {
   11192           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   11193           0 :                 if (PyLong_Check(value)) {
   11194           0 :                         unsigned long long test_var;
   11195           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11196           0 :                         if (PyErr_Occurred() != NULL) {
   11197           0 :                                 return -1;
   11198             :                         }
   11199           0 :                         if (test_var > uint_max) {
   11200           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11201             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11202           0 :                                 return -1;
   11203             :                         }
   11204           0 :                         object->unknown3 = test_var;
   11205             :                 } else {
   11206           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11207             :                           PyLong_Type.tp_name);
   11208           0 :                         return -1;
   11209             :                 }
   11210             :         }
   11211           0 :         return 0;
   11212             : }
   11213             : 
   11214           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown4(PyObject *obj, void *closure)
   11215             : {
   11216           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   11217           0 :         PyObject *py_unknown4;
   11218           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4);
   11219           0 :         return py_unknown4;
   11220             : }
   11221             : 
   11222           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   11223             : {
   11224           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   11225           0 :         if (value == NULL) {
   11226           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   11227           0 :                 return -1;
   11228             :         }
   11229             :         {
   11230           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   11231           0 :                 if (PyLong_Check(value)) {
   11232           0 :                         unsigned long long test_var;
   11233           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11234           0 :                         if (PyErr_Occurred() != NULL) {
   11235           0 :                                 return -1;
   11236             :                         }
   11237           0 :                         if (test_var > uint_max) {
   11238           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11239             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11240           0 :                                 return -1;
   11241             :                         }
   11242           0 :                         object->unknown4 = test_var;
   11243             :                 } else {
   11244           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11245             :                           PyLong_Type.tp_name);
   11246           0 :                         return -1;
   11247             :                 }
   11248             :         }
   11249           0 :         return 0;
   11250             : }
   11251             : 
   11252             : static PyGetSetDef py_netr_DELTA_GROUP_MEMBER_getsetters[] = {
   11253             :         {
   11254             :                 .name = discard_const_p(char, "rids"),
   11255             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_rids,
   11256             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_rids,
   11257             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11258             :         },
   11259             :         {
   11260             :                 .name = discard_const_p(char, "attribs"),
   11261             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_attribs,
   11262             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_attribs,
   11263             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11264             :         },
   11265             :         {
   11266             :                 .name = discard_const_p(char, "num_rids"),
   11267             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_num_rids,
   11268             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_num_rids,
   11269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11270             :         },
   11271             :         {
   11272             :                 .name = discard_const_p(char, "unknown1"),
   11273             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown1,
   11274             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown1,
   11275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11276             :         },
   11277             :         {
   11278             :                 .name = discard_const_p(char, "unknown2"),
   11279             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown2,
   11280             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown2,
   11281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11282             :         },
   11283             :         {
   11284             :                 .name = discard_const_p(char, "unknown3"),
   11285             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown3,
   11286             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown3,
   11287             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11288             :         },
   11289             :         {
   11290             :                 .name = discard_const_p(char, "unknown4"),
   11291             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown4,
   11292             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown4,
   11293             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11294             :         },
   11295             :         { .name = NULL }
   11296             : };
   11297             : 
   11298           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11299             : {
   11300           0 :         return pytalloc_new(struct netr_DELTA_GROUP_MEMBER, type);
   11301             : }
   11302             : 
   11303             : 
   11304             : static PyTypeObject netr_DELTA_GROUP_MEMBER_Type = {
   11305             :         PyVarObject_HEAD_INIT(NULL, 0)
   11306             :         .tp_name = "netlogon.netr_DELTA_GROUP_MEMBER",
   11307             :         .tp_getset = py_netr_DELTA_GROUP_MEMBER_getsetters,
   11308             :         .tp_methods = NULL,
   11309             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11310             :         .tp_new = py_netr_DELTA_GROUP_MEMBER_new,
   11311             : };
   11312             : 
   11313             : 
   11314           0 : static PyObject *py_netr_DELTA_ALIAS_get_alias_name(PyObject *obj, void *closure)
   11315             : {
   11316           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11317           0 :         PyObject *py_alias_name;
   11318           0 :         py_alias_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->alias_name);
   11319           0 :         return py_alias_name;
   11320             : }
   11321             : 
   11322           0 : static int py_netr_DELTA_ALIAS_set_alias_name(PyObject *py_obj, PyObject *value, void *closure)
   11323             : {
   11324           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11325           0 :         if (value == NULL) {
   11326           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alias_name");
   11327           0 :                 return -1;
   11328             :         }
   11329           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11330           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11331           0 :                 PyErr_NoMemory();
   11332           0 :                 return -1;
   11333             :         }
   11334           0 :         object->alias_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   11335           0 :         return 0;
   11336             : }
   11337             : 
   11338           0 : static PyObject *py_netr_DELTA_ALIAS_get_rid(PyObject *obj, void *closure)
   11339             : {
   11340           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11341           0 :         PyObject *py_rid;
   11342           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
   11343           0 :         return py_rid;
   11344             : }
   11345             : 
   11346           0 : static int py_netr_DELTA_ALIAS_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   11347             : {
   11348           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11349           0 :         if (value == NULL) {
   11350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
   11351           0 :                 return -1;
   11352             :         }
   11353             :         {
   11354           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
   11355           0 :                 if (PyLong_Check(value)) {
   11356           0 :                         unsigned long long test_var;
   11357           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11358           0 :                         if (PyErr_Occurred() != NULL) {
   11359           0 :                                 return -1;
   11360             :                         }
   11361           0 :                         if (test_var > uint_max) {
   11362           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11363             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11364           0 :                                 return -1;
   11365             :                         }
   11366           0 :                         object->rid = test_var;
   11367             :                 } else {
   11368           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11369             :                           PyLong_Type.tp_name);
   11370           0 :                         return -1;
   11371             :                 }
   11372             :         }
   11373           0 :         return 0;
   11374             : }
   11375             : 
   11376           0 : static PyObject *py_netr_DELTA_ALIAS_get_SecurityInformation(PyObject *obj, void *closure)
   11377             : {
   11378           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11379           0 :         PyObject *py_SecurityInformation;
   11380           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   11381           0 :         return py_SecurityInformation;
   11382             : }
   11383             : 
   11384           0 : static int py_netr_DELTA_ALIAS_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   11385             : {
   11386           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11387           0 :         if (value == NULL) {
   11388           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   11389           0 :                 return -1;
   11390             :         }
   11391             :         {
   11392           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   11393           0 :                 if (PyLong_Check(value)) {
   11394           0 :                         unsigned long long test_var;
   11395           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11396           0 :                         if (PyErr_Occurred() != NULL) {
   11397           0 :                                 return -1;
   11398             :                         }
   11399           0 :                         if (test_var > uint_max) {
   11400           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11401             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11402           0 :                                 return -1;
   11403             :                         }
   11404           0 :                         object->SecurityInformation = test_var;
   11405             :                 } else {
   11406           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11407             :                           PyLong_Type.tp_name);
   11408           0 :                         return -1;
   11409             :                 }
   11410             :         }
   11411           0 :         return 0;
   11412             : }
   11413             : 
   11414           0 : static PyObject *py_netr_DELTA_ALIAS_get_sdbuf(PyObject *obj, void *closure)
   11415             : {
   11416           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11417           0 :         PyObject *py_sdbuf;
   11418           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   11419           0 :         return py_sdbuf;
   11420             : }
   11421             : 
   11422           0 : static int py_netr_DELTA_ALIAS_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   11423             : {
   11424           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11425           0 :         if (value == NULL) {
   11426           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   11427           0 :                 return -1;
   11428             :         }
   11429           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   11430           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11431           0 :                 PyErr_NoMemory();
   11432           0 :                 return -1;
   11433             :         }
   11434           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   11435           0 :         return 0;
   11436             : }
   11437             : 
   11438           0 : static PyObject *py_netr_DELTA_ALIAS_get_description(PyObject *obj, void *closure)
   11439             : {
   11440           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11441           0 :         PyObject *py_description;
   11442           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
   11443           0 :         return py_description;
   11444             : }
   11445             : 
   11446           0 : static int py_netr_DELTA_ALIAS_set_description(PyObject *py_obj, PyObject *value, void *closure)
   11447             : {
   11448           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11449           0 :         if (value == NULL) {
   11450           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->description");
   11451           0 :                 return -1;
   11452             :         }
   11453           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11454           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11455           0 :                 PyErr_NoMemory();
   11456           0 :                 return -1;
   11457             :         }
   11458           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
   11459           0 :         return 0;
   11460             : }
   11461             : 
   11462           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown2(PyObject *obj, void *closure)
   11463             : {
   11464           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11465           0 :         PyObject *py_unknown2;
   11466           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   11467           0 :         return py_unknown2;
   11468             : }
   11469             : 
   11470           0 : static int py_netr_DELTA_ALIAS_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   11471             : {
   11472           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11473           0 :         if (value == NULL) {
   11474           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   11475           0 :                 return -1;
   11476             :         }
   11477           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11478           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11479           0 :                 PyErr_NoMemory();
   11480           0 :                 return -1;
   11481             :         }
   11482           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   11483           0 :         return 0;
   11484             : }
   11485             : 
   11486           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown3(PyObject *obj, void *closure)
   11487             : {
   11488           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11489           0 :         PyObject *py_unknown3;
   11490           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   11491           0 :         return py_unknown3;
   11492             : }
   11493             : 
   11494           0 : static int py_netr_DELTA_ALIAS_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   11495             : {
   11496           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11497           0 :         if (value == NULL) {
   11498           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   11499           0 :                 return -1;
   11500             :         }
   11501           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11502           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11503           0 :                 PyErr_NoMemory();
   11504           0 :                 return -1;
   11505             :         }
   11506           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   11507           0 :         return 0;
   11508             : }
   11509             : 
   11510           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown4(PyObject *obj, void *closure)
   11511             : {
   11512           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11513           0 :         PyObject *py_unknown4;
   11514           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   11515           0 :         return py_unknown4;
   11516             : }
   11517             : 
   11518           0 : static int py_netr_DELTA_ALIAS_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   11519             : {
   11520           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11521           0 :         if (value == NULL) {
   11522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   11523           0 :                 return -1;
   11524             :         }
   11525           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11526           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11527           0 :                 PyErr_NoMemory();
   11528           0 :                 return -1;
   11529             :         }
   11530           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   11531           0 :         return 0;
   11532             : }
   11533             : 
   11534           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown5(PyObject *obj, void *closure)
   11535             : {
   11536           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11537           0 :         PyObject *py_unknown5;
   11538           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   11539           0 :         return py_unknown5;
   11540             : }
   11541             : 
   11542           0 : static int py_netr_DELTA_ALIAS_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   11543             : {
   11544           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11545           0 :         if (value == NULL) {
   11546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   11547           0 :                 return -1;
   11548             :         }
   11549             :         {
   11550           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   11551           0 :                 if (PyLong_Check(value)) {
   11552           0 :                         unsigned long long test_var;
   11553           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11554           0 :                         if (PyErr_Occurred() != NULL) {
   11555           0 :                                 return -1;
   11556             :                         }
   11557           0 :                         if (test_var > uint_max) {
   11558           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11559             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11560           0 :                                 return -1;
   11561             :                         }
   11562           0 :                         object->unknown5 = test_var;
   11563             :                 } else {
   11564           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11565             :                           PyLong_Type.tp_name);
   11566           0 :                         return -1;
   11567             :                 }
   11568             :         }
   11569           0 :         return 0;
   11570             : }
   11571             : 
   11572           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown6(PyObject *obj, void *closure)
   11573             : {
   11574           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11575           0 :         PyObject *py_unknown6;
   11576           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   11577           0 :         return py_unknown6;
   11578             : }
   11579             : 
   11580           0 : static int py_netr_DELTA_ALIAS_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   11581             : {
   11582           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11583           0 :         if (value == NULL) {
   11584           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   11585           0 :                 return -1;
   11586             :         }
   11587             :         {
   11588           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   11589           0 :                 if (PyLong_Check(value)) {
   11590           0 :                         unsigned long long test_var;
   11591           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11592           0 :                         if (PyErr_Occurred() != NULL) {
   11593           0 :                                 return -1;
   11594             :                         }
   11595           0 :                         if (test_var > uint_max) {
   11596           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11597             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11598           0 :                                 return -1;
   11599             :                         }
   11600           0 :                         object->unknown6 = test_var;
   11601             :                 } else {
   11602           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11603             :                           PyLong_Type.tp_name);
   11604           0 :                         return -1;
   11605             :                 }
   11606             :         }
   11607           0 :         return 0;
   11608             : }
   11609             : 
   11610           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown7(PyObject *obj, void *closure)
   11611             : {
   11612           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11613           0 :         PyObject *py_unknown7;
   11614           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   11615           0 :         return py_unknown7;
   11616             : }
   11617             : 
   11618           0 : static int py_netr_DELTA_ALIAS_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   11619             : {
   11620           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11621           0 :         if (value == NULL) {
   11622           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   11623           0 :                 return -1;
   11624             :         }
   11625             :         {
   11626           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   11627           0 :                 if (PyLong_Check(value)) {
   11628           0 :                         unsigned long long test_var;
   11629           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11630           0 :                         if (PyErr_Occurred() != NULL) {
   11631           0 :                                 return -1;
   11632             :                         }
   11633           0 :                         if (test_var > uint_max) {
   11634           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11635             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11636           0 :                                 return -1;
   11637             :                         }
   11638           0 :                         object->unknown7 = test_var;
   11639             :                 } else {
   11640           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11641             :                           PyLong_Type.tp_name);
   11642           0 :                         return -1;
   11643             :                 }
   11644             :         }
   11645           0 :         return 0;
   11646             : }
   11647             : 
   11648           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown8(PyObject *obj, void *closure)
   11649             : {
   11650           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11651           0 :         PyObject *py_unknown8;
   11652           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   11653           0 :         return py_unknown8;
   11654             : }
   11655             : 
   11656           0 : static int py_netr_DELTA_ALIAS_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   11657             : {
   11658           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11659           0 :         if (value == NULL) {
   11660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   11661           0 :                 return -1;
   11662             :         }
   11663             :         {
   11664           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   11665           0 :                 if (PyLong_Check(value)) {
   11666           0 :                         unsigned long long test_var;
   11667           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11668           0 :                         if (PyErr_Occurred() != NULL) {
   11669           0 :                                 return -1;
   11670             :                         }
   11671           0 :                         if (test_var > uint_max) {
   11672           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11673             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11674           0 :                                 return -1;
   11675             :                         }
   11676           0 :                         object->unknown8 = test_var;
   11677             :                 } else {
   11678           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11679             :                           PyLong_Type.tp_name);
   11680           0 :                         return -1;
   11681             :                 }
   11682             :         }
   11683           0 :         return 0;
   11684             : }
   11685             : 
   11686             : static PyGetSetDef py_netr_DELTA_ALIAS_getsetters[] = {
   11687             :         {
   11688             :                 .name = discard_const_p(char, "alias_name"),
   11689             :                 .get = py_netr_DELTA_ALIAS_get_alias_name,
   11690             :                 .set = py_netr_DELTA_ALIAS_set_alias_name,
   11691             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11692             :         },
   11693             :         {
   11694             :                 .name = discard_const_p(char, "rid"),
   11695             :                 .get = py_netr_DELTA_ALIAS_get_rid,
   11696             :                 .set = py_netr_DELTA_ALIAS_set_rid,
   11697             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11698             :         },
   11699             :         {
   11700             :                 .name = discard_const_p(char, "SecurityInformation"),
   11701             :                 .get = py_netr_DELTA_ALIAS_get_SecurityInformation,
   11702             :                 .set = py_netr_DELTA_ALIAS_set_SecurityInformation,
   11703             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11704             :         },
   11705             :         {
   11706             :                 .name = discard_const_p(char, "sdbuf"),
   11707             :                 .get = py_netr_DELTA_ALIAS_get_sdbuf,
   11708             :                 .set = py_netr_DELTA_ALIAS_set_sdbuf,
   11709             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   11710             :         },
   11711             :         {
   11712             :                 .name = discard_const_p(char, "description"),
   11713             :                 .get = py_netr_DELTA_ALIAS_get_description,
   11714             :                 .set = py_netr_DELTA_ALIAS_set_description,
   11715             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11716             :         },
   11717             :         {
   11718             :                 .name = discard_const_p(char, "unknown2"),
   11719             :                 .get = py_netr_DELTA_ALIAS_get_unknown2,
   11720             :                 .set = py_netr_DELTA_ALIAS_set_unknown2,
   11721             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11722             :         },
   11723             :         {
   11724             :                 .name = discard_const_p(char, "unknown3"),
   11725             :                 .get = py_netr_DELTA_ALIAS_get_unknown3,
   11726             :                 .set = py_netr_DELTA_ALIAS_set_unknown3,
   11727             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11728             :         },
   11729             :         {
   11730             :                 .name = discard_const_p(char, "unknown4"),
   11731             :                 .get = py_netr_DELTA_ALIAS_get_unknown4,
   11732             :                 .set = py_netr_DELTA_ALIAS_set_unknown4,
   11733             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11734             :         },
   11735             :         {
   11736             :                 .name = discard_const_p(char, "unknown5"),
   11737             :                 .get = py_netr_DELTA_ALIAS_get_unknown5,
   11738             :                 .set = py_netr_DELTA_ALIAS_set_unknown5,
   11739             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11740             :         },
   11741             :         {
   11742             :                 .name = discard_const_p(char, "unknown6"),
   11743             :                 .get = py_netr_DELTA_ALIAS_get_unknown6,
   11744             :                 .set = py_netr_DELTA_ALIAS_set_unknown6,
   11745             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11746             :         },
   11747             :         {
   11748             :                 .name = discard_const_p(char, "unknown7"),
   11749             :                 .get = py_netr_DELTA_ALIAS_get_unknown7,
   11750             :                 .set = py_netr_DELTA_ALIAS_set_unknown7,
   11751             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11752             :         },
   11753             :         {
   11754             :                 .name = discard_const_p(char, "unknown8"),
   11755             :                 .get = py_netr_DELTA_ALIAS_get_unknown8,
   11756             :                 .set = py_netr_DELTA_ALIAS_set_unknown8,
   11757             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11758             :         },
   11759             :         { .name = NULL }
   11760             : };
   11761             : 
   11762           0 : static PyObject *py_netr_DELTA_ALIAS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11763             : {
   11764           0 :         return pytalloc_new(struct netr_DELTA_ALIAS, type);
   11765             : }
   11766             : 
   11767             : 
   11768             : static PyTypeObject netr_DELTA_ALIAS_Type = {
   11769             :         PyVarObject_HEAD_INIT(NULL, 0)
   11770             :         .tp_name = "netlogon.netr_DELTA_ALIAS",
   11771             :         .tp_getset = py_netr_DELTA_ALIAS_getsetters,
   11772             :         .tp_methods = NULL,
   11773             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11774             :         .tp_new = py_netr_DELTA_ALIAS_new,
   11775             : };
   11776             : 
   11777             : 
   11778           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_sids(PyObject *obj, void *closure)
   11779             : {
   11780           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11781           0 :         PyObject *py_sids;
   11782           0 :         py_sids = pytalloc_reference_ex(lsa_SidArray_Type, pytalloc_get_mem_ctx(obj), &object->sids);
   11783           0 :         return py_sids;
   11784             : }
   11785             : 
   11786           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_sids(PyObject *py_obj, PyObject *value, void *closure)
   11787             : {
   11788           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11789           0 :         if (value == NULL) {
   11790           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
   11791           0 :                 return -1;
   11792             :         }
   11793           0 :         PY_CHECK_TYPE(lsa_SidArray_Type, value, return -1;);
   11794           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11795           0 :                 PyErr_NoMemory();
   11796           0 :                 return -1;
   11797             :         }
   11798           0 :         object->sids = *(struct lsa_SidArray *)pytalloc_get_ptr(value);
   11799           0 :         return 0;
   11800             : }
   11801             : 
   11802           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown1(PyObject *obj, void *closure)
   11803             : {
   11804           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11805           0 :         PyObject *py_unknown1;
   11806           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
   11807           0 :         return py_unknown1;
   11808             : }
   11809             : 
   11810           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   11811             : {
   11812           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11813           0 :         if (value == NULL) {
   11814           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   11815           0 :                 return -1;
   11816             :         }
   11817             :         {
   11818           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   11819           0 :                 if (PyLong_Check(value)) {
   11820           0 :                         unsigned long long test_var;
   11821           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11822           0 :                         if (PyErr_Occurred() != NULL) {
   11823           0 :                                 return -1;
   11824             :                         }
   11825           0 :                         if (test_var > uint_max) {
   11826           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11827             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11828           0 :                                 return -1;
   11829             :                         }
   11830           0 :                         object->unknown1 = test_var;
   11831             :                 } else {
   11832           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11833             :                           PyLong_Type.tp_name);
   11834           0 :                         return -1;
   11835             :                 }
   11836             :         }
   11837           0 :         return 0;
   11838             : }
   11839             : 
   11840           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown2(PyObject *obj, void *closure)
   11841             : {
   11842           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11843           0 :         PyObject *py_unknown2;
   11844           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
   11845           0 :         return py_unknown2;
   11846             : }
   11847             : 
   11848           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   11849             : {
   11850           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11851           0 :         if (value == NULL) {
   11852           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   11853           0 :                 return -1;
   11854             :         }
   11855             :         {
   11856           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   11857           0 :                 if (PyLong_Check(value)) {
   11858           0 :                         unsigned long long test_var;
   11859           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11860           0 :                         if (PyErr_Occurred() != NULL) {
   11861           0 :                                 return -1;
   11862             :                         }
   11863           0 :                         if (test_var > uint_max) {
   11864           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11865             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11866           0 :                                 return -1;
   11867             :                         }
   11868           0 :                         object->unknown2 = test_var;
   11869             :                 } else {
   11870           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11871             :                           PyLong_Type.tp_name);
   11872           0 :                         return -1;
   11873             :                 }
   11874             :         }
   11875           0 :         return 0;
   11876             : }
   11877             : 
   11878           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown3(PyObject *obj, void *closure)
   11879             : {
   11880           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11881           0 :         PyObject *py_unknown3;
   11882           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown3);
   11883           0 :         return py_unknown3;
   11884             : }
   11885             : 
   11886           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   11887             : {
   11888           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11889           0 :         if (value == NULL) {
   11890           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   11891           0 :                 return -1;
   11892             :         }
   11893             :         {
   11894           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   11895           0 :                 if (PyLong_Check(value)) {
   11896           0 :                         unsigned long long test_var;
   11897           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11898           0 :                         if (PyErr_Occurred() != NULL) {
   11899           0 :                                 return -1;
   11900             :                         }
   11901           0 :                         if (test_var > uint_max) {
   11902           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11903             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11904           0 :                                 return -1;
   11905             :                         }
   11906           0 :                         object->unknown3 = test_var;
   11907             :                 } else {
   11908           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11909             :                           PyLong_Type.tp_name);
   11910           0 :                         return -1;
   11911             :                 }
   11912             :         }
   11913           0 :         return 0;
   11914             : }
   11915             : 
   11916           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown4(PyObject *obj, void *closure)
   11917             : {
   11918           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11919           0 :         PyObject *py_unknown4;
   11920           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4);
   11921           0 :         return py_unknown4;
   11922             : }
   11923             : 
   11924           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   11925             : {
   11926           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11927           0 :         if (value == NULL) {
   11928           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   11929           0 :                 return -1;
   11930             :         }
   11931             :         {
   11932           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   11933           0 :                 if (PyLong_Check(value)) {
   11934           0 :                         unsigned long long test_var;
   11935           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11936           0 :                         if (PyErr_Occurred() != NULL) {
   11937           0 :                                 return -1;
   11938             :                         }
   11939           0 :                         if (test_var > uint_max) {
   11940           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11941             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11942           0 :                                 return -1;
   11943             :                         }
   11944           0 :                         object->unknown4 = test_var;
   11945             :                 } else {
   11946           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11947             :                           PyLong_Type.tp_name);
   11948           0 :                         return -1;
   11949             :                 }
   11950             :         }
   11951           0 :         return 0;
   11952             : }
   11953             : 
   11954             : static PyGetSetDef py_netr_DELTA_ALIAS_MEMBER_getsetters[] = {
   11955             :         {
   11956             :                 .name = discard_const_p(char, "sids"),
   11957             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_sids,
   11958             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_sids,
   11959             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidArray")
   11960             :         },
   11961             :         {
   11962             :                 .name = discard_const_p(char, "unknown1"),
   11963             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown1,
   11964             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown1,
   11965             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11966             :         },
   11967             :         {
   11968             :                 .name = discard_const_p(char, "unknown2"),
   11969             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown2,
   11970             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown2,
   11971             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11972             :         },
   11973             :         {
   11974             :                 .name = discard_const_p(char, "unknown3"),
   11975             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown3,
   11976             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown3,
   11977             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11978             :         },
   11979             :         {
   11980             :                 .name = discard_const_p(char, "unknown4"),
   11981             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown4,
   11982             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown4,
   11983             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11984             :         },
   11985             :         { .name = NULL }
   11986             : };
   11987             : 
   11988           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11989             : {
   11990           0 :         return pytalloc_new(struct netr_DELTA_ALIAS_MEMBER, type);
   11991             : }
   11992             : 
   11993             : 
   11994             : static PyTypeObject netr_DELTA_ALIAS_MEMBER_Type = {
   11995             :         PyVarObject_HEAD_INIT(NULL, 0)
   11996             :         .tp_name = "netlogon.netr_DELTA_ALIAS_MEMBER",
   11997             :         .tp_getset = py_netr_DELTA_ALIAS_MEMBER_getsetters,
   11998             :         .tp_methods = NULL,
   11999             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12000             :         .tp_new = py_netr_DELTA_ALIAS_MEMBER_new,
   12001             : };
   12002             : 
   12003             : 
   12004           0 : static PyObject *py_netr_QUOTA_LIMITS_get_pagedpoollimit(PyObject *obj, void *closure)
   12005             : {
   12006           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   12007           0 :         PyObject *py_pagedpoollimit;
   12008           0 :         py_pagedpoollimit = PyLong_FromUnsignedLongLong((uint32_t)object->pagedpoollimit);
   12009           0 :         return py_pagedpoollimit;
   12010             : }
   12011             : 
   12012           0 : static int py_netr_QUOTA_LIMITS_set_pagedpoollimit(PyObject *py_obj, PyObject *value, void *closure)
   12013             : {
   12014           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   12015           0 :         if (value == NULL) {
   12016           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pagedpoollimit");
   12017           0 :                 return -1;
   12018             :         }
   12019             :         {
   12020           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pagedpoollimit));
   12021           0 :                 if (PyLong_Check(value)) {
   12022           0 :                         unsigned long long test_var;
   12023           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12024           0 :                         if (PyErr_Occurred() != NULL) {
   12025           0 :                                 return -1;
   12026             :                         }
   12027           0 :                         if (test_var > uint_max) {
   12028           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12029             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12030           0 :                                 return -1;
   12031             :                         }
   12032           0 :                         object->pagedpoollimit = test_var;
   12033             :                 } else {
   12034           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12035             :                           PyLong_Type.tp_name);
   12036           0 :                         return -1;
   12037             :                 }
   12038             :         }
   12039           0 :         return 0;
   12040             : }
   12041             : 
   12042           0 : static PyObject *py_netr_QUOTA_LIMITS_get_nonpagedpoollimit(PyObject *obj, void *closure)
   12043             : {
   12044           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   12045           0 :         PyObject *py_nonpagedpoollimit;
   12046           0 :         py_nonpagedpoollimit = PyLong_FromUnsignedLongLong((uint32_t)object->nonpagedpoollimit);
   12047           0 :         return py_nonpagedpoollimit;
   12048             : }
   12049             : 
   12050           0 : static int py_netr_QUOTA_LIMITS_set_nonpagedpoollimit(PyObject *py_obj, PyObject *value, void *closure)
   12051             : {
   12052           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   12053           0 :         if (value == NULL) {
   12054           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nonpagedpoollimit");
   12055           0 :                 return -1;
   12056             :         }
   12057             :         {
   12058           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nonpagedpoollimit));
   12059           0 :                 if (PyLong_Check(value)) {
   12060           0 :                         unsigned long long test_var;
   12061           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12062           0 :                         if (PyErr_Occurred() != NULL) {
   12063           0 :                                 return -1;
   12064             :                         }
   12065           0 :                         if (test_var > uint_max) {
   12066           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12067             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12068           0 :                                 return -1;
   12069             :                         }
   12070           0 :                         object->nonpagedpoollimit = test_var;
   12071             :                 } else {
   12072           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12073             :                           PyLong_Type.tp_name);
   12074           0 :                         return -1;
   12075             :                 }
   12076             :         }
   12077           0 :         return 0;
   12078             : }
   12079             : 
   12080           0 : static PyObject *py_netr_QUOTA_LIMITS_get_minimumworkingsetsize(PyObject *obj, void *closure)
   12081             : {
   12082           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   12083           0 :         PyObject *py_minimumworkingsetsize;
   12084           0 :         py_minimumworkingsetsize = PyLong_FromUnsignedLongLong((uint32_t)object->minimumworkingsetsize);
   12085           0 :         return py_minimumworkingsetsize;
   12086             : }
   12087             : 
   12088           0 : static int py_netr_QUOTA_LIMITS_set_minimumworkingsetsize(PyObject *py_obj, PyObject *value, void *closure)
   12089             : {
   12090           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   12091           0 :         if (value == NULL) {
   12092           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minimumworkingsetsize");
   12093           0 :                 return -1;
   12094             :         }
   12095             :         {
   12096           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minimumworkingsetsize));
   12097           0 :                 if (PyLong_Check(value)) {
   12098           0 :                         unsigned long long test_var;
   12099           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12100           0 :                         if (PyErr_Occurred() != NULL) {
   12101           0 :                                 return -1;
   12102             :                         }
   12103           0 :                         if (test_var > uint_max) {
   12104           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12105             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12106           0 :                                 return -1;
   12107             :                         }
   12108           0 :                         object->minimumworkingsetsize = test_var;
   12109             :                 } else {
   12110           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12111             :                           PyLong_Type.tp_name);
   12112           0 :                         return -1;
   12113             :                 }
   12114             :         }
   12115           0 :         return 0;
   12116             : }
   12117             : 
   12118           0 : static PyObject *py_netr_QUOTA_LIMITS_get_maximumworkingsetsize(PyObject *obj, void *closure)
   12119             : {
   12120           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   12121           0 :         PyObject *py_maximumworkingsetsize;
   12122           0 :         py_maximumworkingsetsize = PyLong_FromUnsignedLongLong((uint32_t)object->maximumworkingsetsize);
   12123           0 :         return py_maximumworkingsetsize;
   12124             : }
   12125             : 
   12126           0 : static int py_netr_QUOTA_LIMITS_set_maximumworkingsetsize(PyObject *py_obj, PyObject *value, void *closure)
   12127             : {
   12128           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   12129           0 :         if (value == NULL) {
   12130           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maximumworkingsetsize");
   12131           0 :                 return -1;
   12132             :         }
   12133             :         {
   12134           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maximumworkingsetsize));
   12135           0 :                 if (PyLong_Check(value)) {
   12136           0 :                         unsigned long long test_var;
   12137           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12138           0 :                         if (PyErr_Occurred() != NULL) {
   12139           0 :                                 return -1;
   12140             :                         }
   12141           0 :                         if (test_var > uint_max) {
   12142           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12143             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12144           0 :                                 return -1;
   12145             :                         }
   12146           0 :                         object->maximumworkingsetsize = test_var;
   12147             :                 } else {
   12148           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12149             :                           PyLong_Type.tp_name);
   12150           0 :                         return -1;
   12151             :                 }
   12152             :         }
   12153           0 :         return 0;
   12154             : }
   12155             : 
   12156           0 : static PyObject *py_netr_QUOTA_LIMITS_get_pagefilelimit(PyObject *obj, void *closure)
   12157             : {
   12158           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   12159           0 :         PyObject *py_pagefilelimit;
   12160           0 :         py_pagefilelimit = PyLong_FromUnsignedLongLong((uint32_t)object->pagefilelimit);
   12161           0 :         return py_pagefilelimit;
   12162             : }
   12163             : 
   12164           0 : static int py_netr_QUOTA_LIMITS_set_pagefilelimit(PyObject *py_obj, PyObject *value, void *closure)
   12165             : {
   12166           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   12167           0 :         if (value == NULL) {
   12168           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pagefilelimit");
   12169           0 :                 return -1;
   12170             :         }
   12171             :         {
   12172           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pagefilelimit));
   12173           0 :                 if (PyLong_Check(value)) {
   12174           0 :                         unsigned long long test_var;
   12175           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12176           0 :                         if (PyErr_Occurred() != NULL) {
   12177           0 :                                 return -1;
   12178             :                         }
   12179           0 :                         if (test_var > uint_max) {
   12180           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12181             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12182           0 :                                 return -1;
   12183             :                         }
   12184           0 :                         object->pagefilelimit = test_var;
   12185             :                 } else {
   12186           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12187             :                           PyLong_Type.tp_name);
   12188           0 :                         return -1;
   12189             :                 }
   12190             :         }
   12191           0 :         return 0;
   12192             : }
   12193             : 
   12194           0 : static PyObject *py_netr_QUOTA_LIMITS_get_timelimit(PyObject *obj, void *closure)
   12195             : {
   12196           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   12197           0 :         PyObject *py_timelimit;
   12198           0 :         py_timelimit = PyLong_FromUnsignedLongLong(object->timelimit);
   12199           0 :         return py_timelimit;
   12200             : }
   12201             : 
   12202           0 : static int py_netr_QUOTA_LIMITS_set_timelimit(PyObject *py_obj, PyObject *value, void *closure)
   12203             : {
   12204           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   12205           0 :         if (value == NULL) {
   12206           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timelimit");
   12207           0 :                 return -1;
   12208             :         }
   12209             :         {
   12210           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timelimit));
   12211           0 :                 if (PyLong_Check(value)) {
   12212           0 :                         unsigned long long test_var;
   12213           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12214           0 :                         if (PyErr_Occurred() != NULL) {
   12215           0 :                                 return -1;
   12216             :                         }
   12217           0 :                         if (test_var > uint_max) {
   12218           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12219             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12220           0 :                                 return -1;
   12221             :                         }
   12222           0 :                         object->timelimit = test_var;
   12223             :                 } else {
   12224           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12225             :                           PyLong_Type.tp_name);
   12226           0 :                         return -1;
   12227             :                 }
   12228             :         }
   12229           0 :         return 0;
   12230             : }
   12231             : 
   12232             : static PyGetSetDef py_netr_QUOTA_LIMITS_getsetters[] = {
   12233             :         {
   12234             :                 .name = discard_const_p(char, "pagedpoollimit"),
   12235             :                 .get = py_netr_QUOTA_LIMITS_get_pagedpoollimit,
   12236             :                 .set = py_netr_QUOTA_LIMITS_set_pagedpoollimit,
   12237             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12238             :         },
   12239             :         {
   12240             :                 .name = discard_const_p(char, "nonpagedpoollimit"),
   12241             :                 .get = py_netr_QUOTA_LIMITS_get_nonpagedpoollimit,
   12242             :                 .set = py_netr_QUOTA_LIMITS_set_nonpagedpoollimit,
   12243             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12244             :         },
   12245             :         {
   12246             :                 .name = discard_const_p(char, "minimumworkingsetsize"),
   12247             :                 .get = py_netr_QUOTA_LIMITS_get_minimumworkingsetsize,
   12248             :                 .set = py_netr_QUOTA_LIMITS_set_minimumworkingsetsize,
   12249             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12250             :         },
   12251             :         {
   12252             :                 .name = discard_const_p(char, "maximumworkingsetsize"),
   12253             :                 .get = py_netr_QUOTA_LIMITS_get_maximumworkingsetsize,
   12254             :                 .set = py_netr_QUOTA_LIMITS_set_maximumworkingsetsize,
   12255             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12256             :         },
   12257             :         {
   12258             :                 .name = discard_const_p(char, "pagefilelimit"),
   12259             :                 .get = py_netr_QUOTA_LIMITS_get_pagefilelimit,
   12260             :                 .set = py_netr_QUOTA_LIMITS_set_pagefilelimit,
   12261             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12262             :         },
   12263             :         {
   12264             :                 .name = discard_const_p(char, "timelimit"),
   12265             :                 .get = py_netr_QUOTA_LIMITS_get_timelimit,
   12266             :                 .set = py_netr_QUOTA_LIMITS_set_timelimit,
   12267             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   12268             :         },
   12269             :         { .name = NULL }
   12270             : };
   12271             : 
   12272           0 : static PyObject *py_netr_QUOTA_LIMITS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12273             : {
   12274           0 :         return pytalloc_new(struct netr_QUOTA_LIMITS, type);
   12275             : }
   12276             : 
   12277             : 
   12278             : static PyTypeObject netr_QUOTA_LIMITS_Type = {
   12279             :         PyVarObject_HEAD_INIT(NULL, 0)
   12280             :         .tp_name = "netlogon.netr_QUOTA_LIMITS",
   12281             :         .tp_getset = py_netr_QUOTA_LIMITS_getsetters,
   12282             :         .tp_methods = NULL,
   12283             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12284             :         .tp_new = py_netr_QUOTA_LIMITS_new,
   12285             : };
   12286             : 
   12287             : 
   12288           0 : static PyObject *py_netr_DELTA_POLICY_get_maxlogsize(PyObject *obj, void *closure)
   12289             : {
   12290           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12291           0 :         PyObject *py_maxlogsize;
   12292           0 :         py_maxlogsize = PyLong_FromUnsignedLongLong((uint32_t)object->maxlogsize);
   12293           0 :         return py_maxlogsize;
   12294             : }
   12295             : 
   12296           0 : static int py_netr_DELTA_POLICY_set_maxlogsize(PyObject *py_obj, PyObject *value, void *closure)
   12297             : {
   12298           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12299           0 :         if (value == NULL) {
   12300           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxlogsize");
   12301           0 :                 return -1;
   12302             :         }
   12303             :         {
   12304           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlogsize));
   12305           0 :                 if (PyLong_Check(value)) {
   12306           0 :                         unsigned long long test_var;
   12307           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12308           0 :                         if (PyErr_Occurred() != NULL) {
   12309           0 :                                 return -1;
   12310             :                         }
   12311           0 :                         if (test_var > uint_max) {
   12312           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12313             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12314           0 :                                 return -1;
   12315             :                         }
   12316           0 :                         object->maxlogsize = test_var;
   12317             :                 } else {
   12318           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12319             :                           PyLong_Type.tp_name);
   12320           0 :                         return -1;
   12321             :                 }
   12322             :         }
   12323           0 :         return 0;
   12324             : }
   12325             : 
   12326           0 : static PyObject *py_netr_DELTA_POLICY_get_auditretentionperiod(PyObject *obj, void *closure)
   12327             : {
   12328           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12329           0 :         PyObject *py_auditretentionperiod;
   12330           0 :         py_auditretentionperiod = PyLong_FromUnsignedLongLong(object->auditretentionperiod);
   12331           0 :         return py_auditretentionperiod;
   12332             : }
   12333             : 
   12334           0 : static int py_netr_DELTA_POLICY_set_auditretentionperiod(PyObject *py_obj, PyObject *value, void *closure)
   12335             : {
   12336           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12337           0 :         if (value == NULL) {
   12338           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auditretentionperiod");
   12339           0 :                 return -1;
   12340             :         }
   12341             :         {
   12342           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditretentionperiod));
   12343           0 :                 if (PyLong_Check(value)) {
   12344           0 :                         unsigned long long test_var;
   12345           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12346           0 :                         if (PyErr_Occurred() != NULL) {
   12347           0 :                                 return -1;
   12348             :                         }
   12349           0 :                         if (test_var > uint_max) {
   12350           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12351             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12352           0 :                                 return -1;
   12353             :                         }
   12354           0 :                         object->auditretentionperiod = test_var;
   12355             :                 } else {
   12356           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12357             :                           PyLong_Type.tp_name);
   12358           0 :                         return -1;
   12359             :                 }
   12360             :         }
   12361           0 :         return 0;
   12362             : }
   12363             : 
   12364           0 : static PyObject *py_netr_DELTA_POLICY_get_auditingmode(PyObject *obj, void *closure)
   12365             : {
   12366           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12367           0 :         PyObject *py_auditingmode;
   12368           0 :         py_auditingmode = PyLong_FromLong((uint16_t)object->auditingmode);
   12369           0 :         return py_auditingmode;
   12370             : }
   12371             : 
   12372           0 : static int py_netr_DELTA_POLICY_set_auditingmode(PyObject *py_obj, PyObject *value, void *closure)
   12373             : {
   12374           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12375           0 :         if (value == NULL) {
   12376           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auditingmode");
   12377           0 :                 return -1;
   12378             :         }
   12379             :         {
   12380           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditingmode));
   12381           0 :                 if (PyLong_Check(value)) {
   12382           0 :                         unsigned long long test_var;
   12383           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12384           0 :                         if (PyErr_Occurred() != NULL) {
   12385           0 :                                 return -1;
   12386             :                         }
   12387           0 :                         if (test_var > uint_max) {
   12388           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12389             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12390           0 :                                 return -1;
   12391             :                         }
   12392           0 :                         object->auditingmode = test_var;
   12393             :                 } else {
   12394           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12395             :                           PyLong_Type.tp_name);
   12396           0 :                         return -1;
   12397             :                 }
   12398             :         }
   12399           0 :         return 0;
   12400             : }
   12401             : 
   12402           0 : static PyObject *py_netr_DELTA_POLICY_get_maxauditeventcount(PyObject *obj, void *closure)
   12403             : {
   12404           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12405           0 :         PyObject *py_maxauditeventcount;
   12406           0 :         py_maxauditeventcount = PyLong_FromUnsignedLongLong((uint32_t)object->maxauditeventcount);
   12407           0 :         return py_maxauditeventcount;
   12408             : }
   12409             : 
   12410           0 : static int py_netr_DELTA_POLICY_set_maxauditeventcount(PyObject *py_obj, PyObject *value, void *closure)
   12411             : {
   12412           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12413           0 :         if (value == NULL) {
   12414           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxauditeventcount");
   12415           0 :                 return -1;
   12416             :         }
   12417             :         {
   12418           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxauditeventcount));
   12419           0 :                 if (PyLong_Check(value)) {
   12420           0 :                         unsigned long long test_var;
   12421           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12422           0 :                         if (PyErr_Occurred() != NULL) {
   12423           0 :                                 return -1;
   12424             :                         }
   12425           0 :                         if (test_var > uint_max) {
   12426           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12427             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12428           0 :                                 return -1;
   12429             :                         }
   12430           0 :                         object->maxauditeventcount = test_var;
   12431             :                 } else {
   12432           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12433             :                           PyLong_Type.tp_name);
   12434           0 :                         return -1;
   12435             :                 }
   12436             :         }
   12437           0 :         return 0;
   12438             : }
   12439             : 
   12440           0 : static PyObject *py_netr_DELTA_POLICY_get_eventauditoptions(PyObject *obj, void *closure)
   12441             : {
   12442           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12443           0 :         PyObject *py_eventauditoptions;
   12444           0 :         if (object->eventauditoptions == NULL) {
   12445           0 :                 Py_RETURN_NONE;
   12446             :         }
   12447           0 :         if (object->eventauditoptions == NULL) {
   12448           0 :                 py_eventauditoptions = Py_None;
   12449           0 :                 Py_INCREF(py_eventauditoptions);
   12450             :         } else {
   12451           0 :                 py_eventauditoptions = PyList_New(object->maxauditeventcount + 1);
   12452           0 :                 if (py_eventauditoptions == NULL) {
   12453           0 :                         return NULL;
   12454             :                 }
   12455             :                 {
   12456             :                         int eventauditoptions_cntr_1;
   12457           0 :                         for (eventauditoptions_cntr_1 = 0; eventauditoptions_cntr_1 < (object->maxauditeventcount + 1); eventauditoptions_cntr_1++) {
   12458           0 :                                 PyObject *py_eventauditoptions_1;
   12459           0 :                                 py_eventauditoptions_1 = PyLong_FromUnsignedLongLong((uint32_t)object->eventauditoptions[eventauditoptions_cntr_1]);
   12460           0 :                                 PyList_SetItem(py_eventauditoptions, eventauditoptions_cntr_1, py_eventauditoptions_1);
   12461             :                         }
   12462             :                 }
   12463             :         }
   12464           0 :         return py_eventauditoptions;
   12465             : }
   12466             : 
   12467           0 : static int py_netr_DELTA_POLICY_set_eventauditoptions(PyObject *py_obj, PyObject *value, void *closure)
   12468             : {
   12469           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12470           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->eventauditoptions));
   12471           0 :         if (value == NULL) {
   12472           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->eventauditoptions");
   12473           0 :                 return -1;
   12474             :         }
   12475           0 :         if (value == Py_None) {
   12476           0 :                 object->eventauditoptions = NULL;
   12477             :         } else {
   12478           0 :                 object->eventauditoptions = NULL;
   12479           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   12480             :                 {
   12481           0 :                         int eventauditoptions_cntr_1;
   12482           0 :                         object->eventauditoptions = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->eventauditoptions, PyList_GET_SIZE(value));
   12483           0 :                         if (!object->eventauditoptions) { return -1; }
   12484           0 :                         talloc_set_name_const(object->eventauditoptions, "ARRAY: object->eventauditoptions");
   12485           0 :                         for (eventauditoptions_cntr_1 = 0; eventauditoptions_cntr_1 < PyList_GET_SIZE(value); eventauditoptions_cntr_1++) {
   12486           0 :                                 if (PyList_GET_ITEM(value, eventauditoptions_cntr_1) == NULL) {
   12487           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->eventauditoptions[eventauditoptions_cntr_1]");
   12488           0 :                                         return -1;
   12489             :                                 }
   12490             :                                 {
   12491           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->eventauditoptions[eventauditoptions_cntr_1]));
   12492           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, eventauditoptions_cntr_1))) {
   12493           0 :                                                 unsigned long long test_var;
   12494           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, eventauditoptions_cntr_1));
   12495           0 :                                                 if (PyErr_Occurred() != NULL) {
   12496           0 :                                                         return -1;
   12497             :                                                 }
   12498           0 :                                                 if (test_var > uint_max) {
   12499           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12500             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   12501           0 :                                                         return -1;
   12502             :                                                 }
   12503           0 :                                                 object->eventauditoptions[eventauditoptions_cntr_1] = test_var;
   12504             :                                         } else {
   12505           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   12506             :                                                   PyLong_Type.tp_name);
   12507           0 :                                                 return -1;
   12508             :                                         }
   12509             :                                 }
   12510             :                         }
   12511             :                 }
   12512             :         }
   12513           0 :         return 0;
   12514             : }
   12515             : 
   12516           0 : static PyObject *py_netr_DELTA_POLICY_get_primary_domain_name(PyObject *obj, void *closure)
   12517             : {
   12518           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12519           0 :         PyObject *py_primary_domain_name;
   12520           0 :         py_primary_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->primary_domain_name);
   12521           0 :         return py_primary_domain_name;
   12522             : }
   12523             : 
   12524           0 : static int py_netr_DELTA_POLICY_set_primary_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   12525             : {
   12526           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12527           0 :         if (value == NULL) {
   12528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_domain_name");
   12529           0 :                 return -1;
   12530             :         }
   12531           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12532           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12533           0 :                 PyErr_NoMemory();
   12534           0 :                 return -1;
   12535             :         }
   12536           0 :         object->primary_domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   12537           0 :         return 0;
   12538             : }
   12539             : 
   12540           0 : static PyObject *py_netr_DELTA_POLICY_get_sid(PyObject *obj, void *closure)
   12541             : {
   12542           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12543           0 :         PyObject *py_sid;
   12544           0 :         if (object->sid == NULL) {
   12545           0 :                 Py_RETURN_NONE;
   12546             :         }
   12547           0 :         if (object->sid == NULL) {
   12548           0 :                 py_sid = Py_None;
   12549           0 :                 Py_INCREF(py_sid);
   12550             :         } else {
   12551           0 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
   12552             :         }
   12553           0 :         return py_sid;
   12554             : }
   12555             : 
   12556           0 : static int py_netr_DELTA_POLICY_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   12557             : {
   12558           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12559           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
   12560           0 :         if (value == NULL) {
   12561           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
   12562           0 :                 return -1;
   12563             :         }
   12564           0 :         if (value == Py_None) {
   12565           0 :                 object->sid = NULL;
   12566             :         } else {
   12567           0 :                 object->sid = NULL;
   12568           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   12569           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12570           0 :                         PyErr_NoMemory();
   12571           0 :                         return -1;
   12572             :                 }
   12573           0 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
   12574             :         }
   12575           0 :         return 0;
   12576             : }
   12577             : 
   12578           0 : static PyObject *py_netr_DELTA_POLICY_get_quota_limits(PyObject *obj, void *closure)
   12579             : {
   12580           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12581           0 :         PyObject *py_quota_limits;
   12582           0 :         py_quota_limits = pytalloc_reference_ex(&netr_QUOTA_LIMITS_Type, pytalloc_get_mem_ctx(obj), &object->quota_limits);
   12583           0 :         return py_quota_limits;
   12584             : }
   12585             : 
   12586           0 : static int py_netr_DELTA_POLICY_set_quota_limits(PyObject *py_obj, PyObject *value, void *closure)
   12587             : {
   12588           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12589           0 :         if (value == NULL) {
   12590           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->quota_limits");
   12591           0 :                 return -1;
   12592             :         }
   12593           0 :         PY_CHECK_TYPE(&netr_QUOTA_LIMITS_Type, value, return -1;);
   12594           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12595           0 :                 PyErr_NoMemory();
   12596           0 :                 return -1;
   12597             :         }
   12598           0 :         object->quota_limits = *(struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(value);
   12599           0 :         return 0;
   12600             : }
   12601             : 
   12602           0 : static PyObject *py_netr_DELTA_POLICY_get_sequence_num(PyObject *obj, void *closure)
   12603             : {
   12604           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12605           0 :         PyObject *py_sequence_num;
   12606           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(object->sequence_num);
   12607           0 :         return py_sequence_num;
   12608             : }
   12609             : 
   12610           0 : static int py_netr_DELTA_POLICY_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
   12611             : {
   12612           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12613           0 :         if (value == NULL) {
   12614           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sequence_num");
   12615           0 :                 return -1;
   12616             :         }
   12617             :         {
   12618           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sequence_num));
   12619           0 :                 if (PyLong_Check(value)) {
   12620           0 :                         unsigned long long test_var;
   12621           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12622           0 :                         if (PyErr_Occurred() != NULL) {
   12623           0 :                                 return -1;
   12624             :                         }
   12625           0 :                         if (test_var > uint_max) {
   12626           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12627             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12628           0 :                                 return -1;
   12629             :                         }
   12630           0 :                         object->sequence_num = test_var;
   12631             :                 } else {
   12632           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12633             :                           PyLong_Type.tp_name);
   12634           0 :                         return -1;
   12635             :                 }
   12636             :         }
   12637           0 :         return 0;
   12638             : }
   12639             : 
   12640           0 : static PyObject *py_netr_DELTA_POLICY_get_db_create_time(PyObject *obj, void *closure)
   12641             : {
   12642           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12643           0 :         PyObject *py_db_create_time;
   12644           0 :         py_db_create_time = PyLong_FromUnsignedLongLong(object->db_create_time);
   12645           0 :         return py_db_create_time;
   12646             : }
   12647             : 
   12648           0 : static int py_netr_DELTA_POLICY_set_db_create_time(PyObject *py_obj, PyObject *value, void *closure)
   12649             : {
   12650           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12651           0 :         if (value == NULL) {
   12652           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->db_create_time");
   12653           0 :                 return -1;
   12654             :         }
   12655             :         {
   12656           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->db_create_time));
   12657           0 :                 if (PyLong_Check(value)) {
   12658           0 :                         unsigned long long test_var;
   12659           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12660           0 :                         if (PyErr_Occurred() != NULL) {
   12661           0 :                                 return -1;
   12662             :                         }
   12663           0 :                         if (test_var > uint_max) {
   12664           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12665             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12666           0 :                                 return -1;
   12667             :                         }
   12668           0 :                         object->db_create_time = test_var;
   12669             :                 } else {
   12670           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12671             :                           PyLong_Type.tp_name);
   12672           0 :                         return -1;
   12673             :                 }
   12674             :         }
   12675           0 :         return 0;
   12676             : }
   12677             : 
   12678           0 : static PyObject *py_netr_DELTA_POLICY_get_SecurityInformation(PyObject *obj, void *closure)
   12679             : {
   12680           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12681           0 :         PyObject *py_SecurityInformation;
   12682           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   12683           0 :         return py_SecurityInformation;
   12684             : }
   12685             : 
   12686           0 : static int py_netr_DELTA_POLICY_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   12687             : {
   12688           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12689           0 :         if (value == NULL) {
   12690           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   12691           0 :                 return -1;
   12692             :         }
   12693             :         {
   12694           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   12695           0 :                 if (PyLong_Check(value)) {
   12696           0 :                         unsigned long long test_var;
   12697           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12698           0 :                         if (PyErr_Occurred() != NULL) {
   12699           0 :                                 return -1;
   12700             :                         }
   12701           0 :                         if (test_var > uint_max) {
   12702           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12703             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12704           0 :                                 return -1;
   12705             :                         }
   12706           0 :                         object->SecurityInformation = test_var;
   12707             :                 } else {
   12708           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12709             :                           PyLong_Type.tp_name);
   12710           0 :                         return -1;
   12711             :                 }
   12712             :         }
   12713           0 :         return 0;
   12714             : }
   12715             : 
   12716           0 : static PyObject *py_netr_DELTA_POLICY_get_sdbuf(PyObject *obj, void *closure)
   12717             : {
   12718           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12719           0 :         PyObject *py_sdbuf;
   12720           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   12721           0 :         return py_sdbuf;
   12722             : }
   12723             : 
   12724           0 : static int py_netr_DELTA_POLICY_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   12725             : {
   12726           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12727           0 :         if (value == NULL) {
   12728           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   12729           0 :                 return -1;
   12730             :         }
   12731           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   12732           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12733           0 :                 PyErr_NoMemory();
   12734           0 :                 return -1;
   12735             :         }
   12736           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   12737           0 :         return 0;
   12738             : }
   12739             : 
   12740           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown1(PyObject *obj, void *closure)
   12741             : {
   12742           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12743           0 :         PyObject *py_unknown1;
   12744           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   12745           0 :         return py_unknown1;
   12746             : }
   12747             : 
   12748           0 : static int py_netr_DELTA_POLICY_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   12749             : {
   12750           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12751           0 :         if (value == NULL) {
   12752           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   12753           0 :                 return -1;
   12754             :         }
   12755           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12756           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12757           0 :                 PyErr_NoMemory();
   12758           0 :                 return -1;
   12759             :         }
   12760           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12761           0 :         return 0;
   12762             : }
   12763             : 
   12764           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown2(PyObject *obj, void *closure)
   12765             : {
   12766           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12767           0 :         PyObject *py_unknown2;
   12768           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   12769           0 :         return py_unknown2;
   12770             : }
   12771             : 
   12772           0 : static int py_netr_DELTA_POLICY_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   12773             : {
   12774           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12775           0 :         if (value == NULL) {
   12776           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   12777           0 :                 return -1;
   12778             :         }
   12779           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12780           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12781           0 :                 PyErr_NoMemory();
   12782           0 :                 return -1;
   12783             :         }
   12784           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12785           0 :         return 0;
   12786             : }
   12787             : 
   12788           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown3(PyObject *obj, void *closure)
   12789             : {
   12790           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12791           0 :         PyObject *py_unknown3;
   12792           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   12793           0 :         return py_unknown3;
   12794             : }
   12795             : 
   12796           0 : static int py_netr_DELTA_POLICY_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   12797             : {
   12798           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12799           0 :         if (value == NULL) {
   12800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   12801           0 :                 return -1;
   12802             :         }
   12803           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12804           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12805           0 :                 PyErr_NoMemory();
   12806           0 :                 return -1;
   12807             :         }
   12808           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12809           0 :         return 0;
   12810             : }
   12811             : 
   12812           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown4(PyObject *obj, void *closure)
   12813             : {
   12814           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12815           0 :         PyObject *py_unknown4;
   12816           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   12817           0 :         return py_unknown4;
   12818             : }
   12819             : 
   12820           0 : static int py_netr_DELTA_POLICY_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   12821             : {
   12822           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12823           0 :         if (value == NULL) {
   12824           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   12825           0 :                 return -1;
   12826             :         }
   12827           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12828           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12829           0 :                 PyErr_NoMemory();
   12830           0 :                 return -1;
   12831             :         }
   12832           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12833           0 :         return 0;
   12834             : }
   12835             : 
   12836           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown5(PyObject *obj, void *closure)
   12837             : {
   12838           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12839           0 :         PyObject *py_unknown5;
   12840           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   12841           0 :         return py_unknown5;
   12842             : }
   12843             : 
   12844           0 : static int py_netr_DELTA_POLICY_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   12845             : {
   12846           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12847           0 :         if (value == NULL) {
   12848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   12849           0 :                 return -1;
   12850             :         }
   12851             :         {
   12852           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   12853           0 :                 if (PyLong_Check(value)) {
   12854           0 :                         unsigned long long test_var;
   12855           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12856           0 :                         if (PyErr_Occurred() != NULL) {
   12857           0 :                                 return -1;
   12858             :                         }
   12859           0 :                         if (test_var > uint_max) {
   12860           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12861             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12862           0 :                                 return -1;
   12863             :                         }
   12864           0 :                         object->unknown5 = test_var;
   12865             :                 } else {
   12866           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12867             :                           PyLong_Type.tp_name);
   12868           0 :                         return -1;
   12869             :                 }
   12870             :         }
   12871           0 :         return 0;
   12872             : }
   12873             : 
   12874           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown6(PyObject *obj, void *closure)
   12875             : {
   12876           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12877           0 :         PyObject *py_unknown6;
   12878           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   12879           0 :         return py_unknown6;
   12880             : }
   12881             : 
   12882           0 : static int py_netr_DELTA_POLICY_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   12883             : {
   12884           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12885           0 :         if (value == NULL) {
   12886           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   12887           0 :                 return -1;
   12888             :         }
   12889             :         {
   12890           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   12891           0 :                 if (PyLong_Check(value)) {
   12892           0 :                         unsigned long long test_var;
   12893           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12894           0 :                         if (PyErr_Occurred() != NULL) {
   12895           0 :                                 return -1;
   12896             :                         }
   12897           0 :                         if (test_var > uint_max) {
   12898           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12899             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12900           0 :                                 return -1;
   12901             :                         }
   12902           0 :                         object->unknown6 = test_var;
   12903             :                 } else {
   12904           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12905             :                           PyLong_Type.tp_name);
   12906           0 :                         return -1;
   12907             :                 }
   12908             :         }
   12909           0 :         return 0;
   12910             : }
   12911             : 
   12912           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown7(PyObject *obj, void *closure)
   12913             : {
   12914           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12915           0 :         PyObject *py_unknown7;
   12916           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   12917           0 :         return py_unknown7;
   12918             : }
   12919             : 
   12920           0 : static int py_netr_DELTA_POLICY_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   12921             : {
   12922           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12923           0 :         if (value == NULL) {
   12924           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   12925           0 :                 return -1;
   12926             :         }
   12927             :         {
   12928           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   12929           0 :                 if (PyLong_Check(value)) {
   12930           0 :                         unsigned long long test_var;
   12931           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12932           0 :                         if (PyErr_Occurred() != NULL) {
   12933           0 :                                 return -1;
   12934             :                         }
   12935           0 :                         if (test_var > uint_max) {
   12936           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12937             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12938           0 :                                 return -1;
   12939             :                         }
   12940           0 :                         object->unknown7 = test_var;
   12941             :                 } else {
   12942           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12943             :                           PyLong_Type.tp_name);
   12944           0 :                         return -1;
   12945             :                 }
   12946             :         }
   12947           0 :         return 0;
   12948             : }
   12949             : 
   12950           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown8(PyObject *obj, void *closure)
   12951             : {
   12952           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12953           0 :         PyObject *py_unknown8;
   12954           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   12955           0 :         return py_unknown8;
   12956             : }
   12957             : 
   12958           0 : static int py_netr_DELTA_POLICY_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   12959             : {
   12960           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12961           0 :         if (value == NULL) {
   12962           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   12963           0 :                 return -1;
   12964             :         }
   12965             :         {
   12966           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   12967           0 :                 if (PyLong_Check(value)) {
   12968           0 :                         unsigned long long test_var;
   12969           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12970           0 :                         if (PyErr_Occurred() != NULL) {
   12971           0 :                                 return -1;
   12972             :                         }
   12973           0 :                         if (test_var > uint_max) {
   12974           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12975             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12976           0 :                                 return -1;
   12977             :                         }
   12978           0 :                         object->unknown8 = test_var;
   12979             :                 } else {
   12980           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12981             :                           PyLong_Type.tp_name);
   12982           0 :                         return -1;
   12983             :                 }
   12984             :         }
   12985           0 :         return 0;
   12986             : }
   12987             : 
   12988             : static PyGetSetDef py_netr_DELTA_POLICY_getsetters[] = {
   12989             :         {
   12990             :                 .name = discard_const_p(char, "maxlogsize"),
   12991             :                 .get = py_netr_DELTA_POLICY_get_maxlogsize,
   12992             :                 .set = py_netr_DELTA_POLICY_set_maxlogsize,
   12993             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12994             :         },
   12995             :         {
   12996             :                 .name = discard_const_p(char, "auditretentionperiod"),
   12997             :                 .get = py_netr_DELTA_POLICY_get_auditretentionperiod,
   12998             :                 .set = py_netr_DELTA_POLICY_set_auditretentionperiod,
   12999             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   13000             :         },
   13001             :         {
   13002             :                 .name = discard_const_p(char, "auditingmode"),
   13003             :                 .get = py_netr_DELTA_POLICY_get_auditingmode,
   13004             :                 .set = py_netr_DELTA_POLICY_set_auditingmode,
   13005             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   13006             :         },
   13007             :         {
   13008             :                 .name = discard_const_p(char, "maxauditeventcount"),
   13009             :                 .get = py_netr_DELTA_POLICY_get_maxauditeventcount,
   13010             :                 .set = py_netr_DELTA_POLICY_set_maxauditeventcount,
   13011             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13012             :         },
   13013             :         {
   13014             :                 .name = discard_const_p(char, "eventauditoptions"),
   13015             :                 .get = py_netr_DELTA_POLICY_get_eventauditoptions,
   13016             :                 .set = py_netr_DELTA_POLICY_set_eventauditoptions,
   13017             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13018             :         },
   13019             :         {
   13020             :                 .name = discard_const_p(char, "primary_domain_name"),
   13021             :                 .get = py_netr_DELTA_POLICY_get_primary_domain_name,
   13022             :                 .set = py_netr_DELTA_POLICY_set_primary_domain_name,
   13023             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13024             :         },
   13025             :         {
   13026             :                 .name = discard_const_p(char, "sid"),
   13027             :                 .get = py_netr_DELTA_POLICY_get_sid,
   13028             :                 .set = py_netr_DELTA_POLICY_set_sid,
   13029             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
   13030             :         },
   13031             :         {
   13032             :                 .name = discard_const_p(char, "quota_limits"),
   13033             :                 .get = py_netr_DELTA_POLICY_get_quota_limits,
   13034             :                 .set = py_netr_DELTA_POLICY_set_quota_limits,
   13035             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_QUOTA_LIMITS")
   13036             :         },
   13037             :         {
   13038             :                 .name = discard_const_p(char, "sequence_num"),
   13039             :                 .get = py_netr_DELTA_POLICY_get_sequence_num,
   13040             :                 .set = py_netr_DELTA_POLICY_set_sequence_num,
   13041             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   13042             :         },
   13043             :         {
   13044             :                 .name = discard_const_p(char, "db_create_time"),
   13045             :                 .get = py_netr_DELTA_POLICY_get_db_create_time,
   13046             :                 .set = py_netr_DELTA_POLICY_set_db_create_time,
   13047             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   13048             :         },
   13049             :         {
   13050             :                 .name = discard_const_p(char, "SecurityInformation"),
   13051             :                 .get = py_netr_DELTA_POLICY_get_SecurityInformation,
   13052             :                 .set = py_netr_DELTA_POLICY_set_SecurityInformation,
   13053             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13054             :         },
   13055             :         {
   13056             :                 .name = discard_const_p(char, "sdbuf"),
   13057             :                 .get = py_netr_DELTA_POLICY_get_sdbuf,
   13058             :                 .set = py_netr_DELTA_POLICY_set_sdbuf,
   13059             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   13060             :         },
   13061             :         {
   13062             :                 .name = discard_const_p(char, "unknown1"),
   13063             :                 .get = py_netr_DELTA_POLICY_get_unknown1,
   13064             :                 .set = py_netr_DELTA_POLICY_set_unknown1,
   13065             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13066             :         },
   13067             :         {
   13068             :                 .name = discard_const_p(char, "unknown2"),
   13069             :                 .get = py_netr_DELTA_POLICY_get_unknown2,
   13070             :                 .set = py_netr_DELTA_POLICY_set_unknown2,
   13071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13072             :         },
   13073             :         {
   13074             :                 .name = discard_const_p(char, "unknown3"),
   13075             :                 .get = py_netr_DELTA_POLICY_get_unknown3,
   13076             :                 .set = py_netr_DELTA_POLICY_set_unknown3,
   13077             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13078             :         },
   13079             :         {
   13080             :                 .name = discard_const_p(char, "unknown4"),
   13081             :                 .get = py_netr_DELTA_POLICY_get_unknown4,
   13082             :                 .set = py_netr_DELTA_POLICY_set_unknown4,
   13083             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13084             :         },
   13085             :         {
   13086             :                 .name = discard_const_p(char, "unknown5"),
   13087             :                 .get = py_netr_DELTA_POLICY_get_unknown5,
   13088             :                 .set = py_netr_DELTA_POLICY_set_unknown5,
   13089             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13090             :         },
   13091             :         {
   13092             :                 .name = discard_const_p(char, "unknown6"),
   13093             :                 .get = py_netr_DELTA_POLICY_get_unknown6,
   13094             :                 .set = py_netr_DELTA_POLICY_set_unknown6,
   13095             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13096             :         },
   13097             :         {
   13098             :                 .name = discard_const_p(char, "unknown7"),
   13099             :                 .get = py_netr_DELTA_POLICY_get_unknown7,
   13100             :                 .set = py_netr_DELTA_POLICY_set_unknown7,
   13101             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13102             :         },
   13103             :         {
   13104             :                 .name = discard_const_p(char, "unknown8"),
   13105             :                 .get = py_netr_DELTA_POLICY_get_unknown8,
   13106             :                 .set = py_netr_DELTA_POLICY_set_unknown8,
   13107             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13108             :         },
   13109             :         { .name = NULL }
   13110             : };
   13111             : 
   13112           0 : static PyObject *py_netr_DELTA_POLICY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13113             : {
   13114           0 :         return pytalloc_new(struct netr_DELTA_POLICY, type);
   13115             : }
   13116             : 
   13117             : 
   13118             : static PyTypeObject netr_DELTA_POLICY_Type = {
   13119             :         PyVarObject_HEAD_INIT(NULL, 0)
   13120             :         .tp_name = "netlogon.netr_DELTA_POLICY",
   13121             :         .tp_getset = py_netr_DELTA_POLICY_getsetters,
   13122             :         .tp_methods = NULL,
   13123             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13124             :         .tp_new = py_netr_DELTA_POLICY_new,
   13125             : };
   13126             : 
   13127             : 
   13128           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_domain_name(PyObject *obj, void *closure)
   13129             : {
   13130           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13131           0 :         PyObject *py_domain_name;
   13132           0 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
   13133           0 :         return py_domain_name;
   13134             : }
   13135             : 
   13136           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   13137             : {
   13138           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13139           0 :         if (value == NULL) {
   13140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
   13141           0 :                 return -1;
   13142             :         }
   13143           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13144           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13145           0 :                 PyErr_NoMemory();
   13146           0 :                 return -1;
   13147             :         }
   13148           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   13149           0 :         return 0;
   13150             : }
   13151             : 
   13152           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_num_controllers(PyObject *obj, void *closure)
   13153             : {
   13154           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13155           0 :         PyObject *py_num_controllers;
   13156           0 :         py_num_controllers = PyLong_FromUnsignedLongLong((uint32_t)object->num_controllers);
   13157           0 :         return py_num_controllers;
   13158             : }
   13159             : 
   13160           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_num_controllers(PyObject *py_obj, PyObject *value, void *closure)
   13161             : {
   13162           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13163           0 :         if (value == NULL) {
   13164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_controllers");
   13165           0 :                 return -1;
   13166             :         }
   13167             :         {
   13168           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_controllers));
   13169           0 :                 if (PyLong_Check(value)) {
   13170           0 :                         unsigned long long test_var;
   13171           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13172           0 :                         if (PyErr_Occurred() != NULL) {
   13173           0 :                                 return -1;
   13174             :                         }
   13175           0 :                         if (test_var > uint_max) {
   13176           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13177             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13178           0 :                                 return -1;
   13179             :                         }
   13180           0 :                         object->num_controllers = test_var;
   13181             :                 } else {
   13182           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13183             :                           PyLong_Type.tp_name);
   13184           0 :                         return -1;
   13185             :                 }
   13186             :         }
   13187           0 :         return 0;
   13188             : }
   13189             : 
   13190           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_controller_names(PyObject *obj, void *closure)
   13191             : {
   13192           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13193           0 :         PyObject *py_controller_names;
   13194           0 :         if (object->controller_names == NULL) {
   13195           0 :                 Py_RETURN_NONE;
   13196             :         }
   13197           0 :         if (object->controller_names == NULL) {
   13198           0 :                 py_controller_names = Py_None;
   13199           0 :                 Py_INCREF(py_controller_names);
   13200             :         } else {
   13201           0 :                 py_controller_names = PyList_New(object->num_controllers);
   13202           0 :                 if (py_controller_names == NULL) {
   13203           0 :                         return NULL;
   13204             :                 }
   13205             :                 {
   13206             :                         int controller_names_cntr_1;
   13207           0 :                         for (controller_names_cntr_1 = 0; controller_names_cntr_1 < (object->num_controllers); controller_names_cntr_1++) {
   13208           0 :                                 PyObject *py_controller_names_1;
   13209           0 :                                 py_controller_names_1 = pytalloc_reference_ex(lsa_String_Type, object->controller_names, &object->controller_names[controller_names_cntr_1]);
   13210           0 :                                 PyList_SetItem(py_controller_names, controller_names_cntr_1, py_controller_names_1);
   13211             :                         }
   13212             :                 }
   13213             :         }
   13214           0 :         return py_controller_names;
   13215             : }
   13216             : 
   13217           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_controller_names(PyObject *py_obj, PyObject *value, void *closure)
   13218             : {
   13219           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13220           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->controller_names));
   13221           0 :         if (value == NULL) {
   13222           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->controller_names");
   13223           0 :                 return -1;
   13224             :         }
   13225           0 :         if (value == Py_None) {
   13226           0 :                 object->controller_names = NULL;
   13227             :         } else {
   13228           0 :                 object->controller_names = NULL;
   13229           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13230             :                 {
   13231           0 :                         int controller_names_cntr_1;
   13232           0 :                         object->controller_names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->controller_names, PyList_GET_SIZE(value));
   13233           0 :                         if (!object->controller_names) { return -1; }
   13234           0 :                         talloc_set_name_const(object->controller_names, "ARRAY: object->controller_names");
   13235           0 :                         for (controller_names_cntr_1 = 0; controller_names_cntr_1 < PyList_GET_SIZE(value); controller_names_cntr_1++) {
   13236           0 :                                 if (PyList_GET_ITEM(value, controller_names_cntr_1) == NULL) {
   13237           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->controller_names[controller_names_cntr_1]");
   13238           0 :                                         return -1;
   13239             :                                 }
   13240           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, controller_names_cntr_1), return -1;);
   13241           0 :                                 if (talloc_reference(object->controller_names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, controller_names_cntr_1))) == NULL) {
   13242           0 :                                         PyErr_NoMemory();
   13243           0 :                                         return -1;
   13244             :                                 }
   13245           0 :                                 object->controller_names[controller_names_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, controller_names_cntr_1));
   13246             :                         }
   13247             :                 }
   13248             :         }
   13249           0 :         return 0;
   13250             : }
   13251             : 
   13252           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_SecurityInformation(PyObject *obj, void *closure)
   13253             : {
   13254           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13255           0 :         PyObject *py_SecurityInformation;
   13256           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   13257           0 :         return py_SecurityInformation;
   13258             : }
   13259             : 
   13260           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   13261             : {
   13262           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13263           0 :         if (value == NULL) {
   13264           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   13265           0 :                 return -1;
   13266             :         }
   13267             :         {
   13268           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   13269           0 :                 if (PyLong_Check(value)) {
   13270           0 :                         unsigned long long test_var;
   13271           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13272           0 :                         if (PyErr_Occurred() != NULL) {
   13273           0 :                                 return -1;
   13274             :                         }
   13275           0 :                         if (test_var > uint_max) {
   13276           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13277             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13278           0 :                                 return -1;
   13279             :                         }
   13280           0 :                         object->SecurityInformation = test_var;
   13281             :                 } else {
   13282           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13283             :                           PyLong_Type.tp_name);
   13284           0 :                         return -1;
   13285             :                 }
   13286             :         }
   13287           0 :         return 0;
   13288             : }
   13289             : 
   13290           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_sdbuf(PyObject *obj, void *closure)
   13291             : {
   13292           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13293           0 :         PyObject *py_sdbuf;
   13294           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   13295           0 :         return py_sdbuf;
   13296             : }
   13297             : 
   13298           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   13299             : {
   13300           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13301           0 :         if (value == NULL) {
   13302           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   13303           0 :                 return -1;
   13304             :         }
   13305           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   13306           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13307           0 :                 PyErr_NoMemory();
   13308           0 :                 return -1;
   13309             :         }
   13310           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   13311           0 :         return 0;
   13312             : }
   13313             : 
   13314           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown1(PyObject *obj, void *closure)
   13315             : {
   13316           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13317           0 :         PyObject *py_unknown1;
   13318           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   13319           0 :         return py_unknown1;
   13320             : }
   13321             : 
   13322           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   13323             : {
   13324           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13325           0 :         if (value == NULL) {
   13326           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   13327           0 :                 return -1;
   13328             :         }
   13329           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13330           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13331           0 :                 PyErr_NoMemory();
   13332           0 :                 return -1;
   13333             :         }
   13334           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13335           0 :         return 0;
   13336             : }
   13337             : 
   13338           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown2(PyObject *obj, void *closure)
   13339             : {
   13340           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13341           0 :         PyObject *py_unknown2;
   13342           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   13343           0 :         return py_unknown2;
   13344             : }
   13345             : 
   13346           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   13347             : {
   13348           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13349           0 :         if (value == NULL) {
   13350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   13351           0 :                 return -1;
   13352             :         }
   13353           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13354           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13355           0 :                 PyErr_NoMemory();
   13356           0 :                 return -1;
   13357             :         }
   13358           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13359           0 :         return 0;
   13360             : }
   13361             : 
   13362           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown3(PyObject *obj, void *closure)
   13363             : {
   13364           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13365           0 :         PyObject *py_unknown3;
   13366           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   13367           0 :         return py_unknown3;
   13368             : }
   13369             : 
   13370           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   13371             : {
   13372           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13373           0 :         if (value == NULL) {
   13374           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   13375           0 :                 return -1;
   13376             :         }
   13377           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13378           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13379           0 :                 PyErr_NoMemory();
   13380           0 :                 return -1;
   13381             :         }
   13382           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13383           0 :         return 0;
   13384             : }
   13385             : 
   13386           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown4(PyObject *obj, void *closure)
   13387             : {
   13388           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13389           0 :         PyObject *py_unknown4;
   13390           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   13391           0 :         return py_unknown4;
   13392             : }
   13393             : 
   13394           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   13395             : {
   13396           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13397           0 :         if (value == NULL) {
   13398           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   13399           0 :                 return -1;
   13400             :         }
   13401           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13402           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13403           0 :                 PyErr_NoMemory();
   13404           0 :                 return -1;
   13405             :         }
   13406           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13407           0 :         return 0;
   13408             : }
   13409             : 
   13410           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_posix_offset(PyObject *obj, void *closure)
   13411             : {
   13412           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13413           0 :         PyObject *py_posix_offset;
   13414           0 :         py_posix_offset = PyLong_FromUnsignedLongLong((uint32_t)object->posix_offset);
   13415           0 :         return py_posix_offset;
   13416             : }
   13417             : 
   13418           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_posix_offset(PyObject *py_obj, PyObject *value, void *closure)
   13419             : {
   13420           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13421           0 :         if (value == NULL) {
   13422           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->posix_offset");
   13423           0 :                 return -1;
   13424             :         }
   13425             :         {
   13426           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->posix_offset));
   13427           0 :                 if (PyLong_Check(value)) {
   13428           0 :                         unsigned long long test_var;
   13429           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13430           0 :                         if (PyErr_Occurred() != NULL) {
   13431           0 :                                 return -1;
   13432             :                         }
   13433           0 :                         if (test_var > uint_max) {
   13434           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13435             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13436           0 :                                 return -1;
   13437             :                         }
   13438           0 :                         object->posix_offset = test_var;
   13439             :                 } else {
   13440           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13441             :                           PyLong_Type.tp_name);
   13442           0 :                         return -1;
   13443             :                 }
   13444             :         }
   13445           0 :         return 0;
   13446             : }
   13447             : 
   13448           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown6(PyObject *obj, void *closure)
   13449             : {
   13450           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13451           0 :         PyObject *py_unknown6;
   13452           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   13453           0 :         return py_unknown6;
   13454             : }
   13455             : 
   13456           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   13457             : {
   13458           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13459           0 :         if (value == NULL) {
   13460           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   13461           0 :                 return -1;
   13462             :         }
   13463             :         {
   13464           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   13465           0 :                 if (PyLong_Check(value)) {
   13466           0 :                         unsigned long long test_var;
   13467           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13468           0 :                         if (PyErr_Occurred() != NULL) {
   13469           0 :                                 return -1;
   13470             :                         }
   13471           0 :                         if (test_var > uint_max) {
   13472           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13473             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13474           0 :                                 return -1;
   13475             :                         }
   13476           0 :                         object->unknown6 = test_var;
   13477             :                 } else {
   13478           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13479             :                           PyLong_Type.tp_name);
   13480           0 :                         return -1;
   13481             :                 }
   13482             :         }
   13483           0 :         return 0;
   13484             : }
   13485             : 
   13486           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown7(PyObject *obj, void *closure)
   13487             : {
   13488           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13489           0 :         PyObject *py_unknown7;
   13490           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   13491           0 :         return py_unknown7;
   13492             : }
   13493             : 
   13494           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   13495             : {
   13496           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13497           0 :         if (value == NULL) {
   13498           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   13499           0 :                 return -1;
   13500             :         }
   13501             :         {
   13502           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   13503           0 :                 if (PyLong_Check(value)) {
   13504           0 :                         unsigned long long test_var;
   13505           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13506           0 :                         if (PyErr_Occurred() != NULL) {
   13507           0 :                                 return -1;
   13508             :                         }
   13509           0 :                         if (test_var > uint_max) {
   13510           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13511             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13512           0 :                                 return -1;
   13513             :                         }
   13514           0 :                         object->unknown7 = test_var;
   13515             :                 } else {
   13516           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13517             :                           PyLong_Type.tp_name);
   13518           0 :                         return -1;
   13519             :                 }
   13520             :         }
   13521           0 :         return 0;
   13522             : }
   13523             : 
   13524           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown8(PyObject *obj, void *closure)
   13525             : {
   13526           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13527           0 :         PyObject *py_unknown8;
   13528           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   13529           0 :         return py_unknown8;
   13530             : }
   13531             : 
   13532           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   13533             : {
   13534           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13535           0 :         if (value == NULL) {
   13536           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   13537           0 :                 return -1;
   13538             :         }
   13539             :         {
   13540           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   13541           0 :                 if (PyLong_Check(value)) {
   13542           0 :                         unsigned long long test_var;
   13543           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13544           0 :                         if (PyErr_Occurred() != NULL) {
   13545           0 :                                 return -1;
   13546             :                         }
   13547           0 :                         if (test_var > uint_max) {
   13548           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13549             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13550           0 :                                 return -1;
   13551             :                         }
   13552           0 :                         object->unknown8 = test_var;
   13553             :                 } else {
   13554           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13555             :                           PyLong_Type.tp_name);
   13556           0 :                         return -1;
   13557             :                 }
   13558             :         }
   13559           0 :         return 0;
   13560             : }
   13561             : 
   13562             : static PyGetSetDef py_netr_DELTA_TRUSTED_DOMAIN_getsetters[] = {
   13563             :         {
   13564             :                 .name = discard_const_p(char, "domain_name"),
   13565             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_domain_name,
   13566             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_domain_name,
   13567             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13568             :         },
   13569             :         {
   13570             :                 .name = discard_const_p(char, "num_controllers"),
   13571             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_num_controllers,
   13572             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_num_controllers,
   13573             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13574             :         },
   13575             :         {
   13576             :                 .name = discard_const_p(char, "controller_names"),
   13577             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_controller_names,
   13578             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_controller_names,
   13579             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13580             :         },
   13581             :         {
   13582             :                 .name = discard_const_p(char, "SecurityInformation"),
   13583             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_SecurityInformation,
   13584             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_SecurityInformation,
   13585             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13586             :         },
   13587             :         {
   13588             :                 .name = discard_const_p(char, "sdbuf"),
   13589             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_sdbuf,
   13590             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_sdbuf,
   13591             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   13592             :         },
   13593             :         {
   13594             :                 .name = discard_const_p(char, "unknown1"),
   13595             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown1,
   13596             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown1,
   13597             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13598             :         },
   13599             :         {
   13600             :                 .name = discard_const_p(char, "unknown2"),
   13601             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown2,
   13602             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown2,
   13603             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13604             :         },
   13605             :         {
   13606             :                 .name = discard_const_p(char, "unknown3"),
   13607             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown3,
   13608             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown3,
   13609             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13610             :         },
   13611             :         {
   13612             :                 .name = discard_const_p(char, "unknown4"),
   13613             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown4,
   13614             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown4,
   13615             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13616             :         },
   13617             :         {
   13618             :                 .name = discard_const_p(char, "posix_offset"),
   13619             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_posix_offset,
   13620             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_posix_offset,
   13621             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13622             :         },
   13623             :         {
   13624             :                 .name = discard_const_p(char, "unknown6"),
   13625             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown6,
   13626             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown6,
   13627             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13628             :         },
   13629             :         {
   13630             :                 .name = discard_const_p(char, "unknown7"),
   13631             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown7,
   13632             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown7,
   13633             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13634             :         },
   13635             :         {
   13636             :                 .name = discard_const_p(char, "unknown8"),
   13637             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown8,
   13638             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown8,
   13639             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13640             :         },
   13641             :         { .name = NULL }
   13642             : };
   13643             : 
   13644           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13645             : {
   13646           0 :         return pytalloc_new(struct netr_DELTA_TRUSTED_DOMAIN, type);
   13647             : }
   13648             : 
   13649             : 
   13650             : static PyTypeObject netr_DELTA_TRUSTED_DOMAIN_Type = {
   13651             :         PyVarObject_HEAD_INIT(NULL, 0)
   13652             :         .tp_name = "netlogon.netr_DELTA_TRUSTED_DOMAIN",
   13653             :         .tp_getset = py_netr_DELTA_TRUSTED_DOMAIN_getsetters,
   13654             :         .tp_methods = NULL,
   13655             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13656             :         .tp_new = py_netr_DELTA_TRUSTED_DOMAIN_new,
   13657             : };
   13658             : 
   13659             : 
   13660           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_entries(PyObject *obj, void *closure)
   13661             : {
   13662           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13663           0 :         PyObject *py_privilege_entries;
   13664           0 :         py_privilege_entries = PyLong_FromUnsignedLongLong((uint32_t)object->privilege_entries);
   13665           0 :         return py_privilege_entries;
   13666             : }
   13667             : 
   13668           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_entries(PyObject *py_obj, PyObject *value, void *closure)
   13669             : {
   13670           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13671           0 :         if (value == NULL) {
   13672           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_entries");
   13673           0 :                 return -1;
   13674             :         }
   13675             :         {
   13676           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_entries));
   13677           0 :                 if (PyLong_Check(value)) {
   13678           0 :                         unsigned long long test_var;
   13679           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13680           0 :                         if (PyErr_Occurred() != NULL) {
   13681           0 :                                 return -1;
   13682             :                         }
   13683           0 :                         if (test_var > uint_max) {
   13684           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13685             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13686           0 :                                 return -1;
   13687             :                         }
   13688           0 :                         object->privilege_entries = test_var;
   13689             :                 } else {
   13690           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13691             :                           PyLong_Type.tp_name);
   13692           0 :                         return -1;
   13693             :                 }
   13694             :         }
   13695           0 :         return 0;
   13696             : }
   13697             : 
   13698           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_control(PyObject *obj, void *closure)
   13699             : {
   13700           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13701           0 :         PyObject *py_privilege_control;
   13702           0 :         py_privilege_control = PyLong_FromUnsignedLongLong((uint32_t)object->privilege_control);
   13703           0 :         return py_privilege_control;
   13704             : }
   13705             : 
   13706           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_control(PyObject *py_obj, PyObject *value, void *closure)
   13707             : {
   13708           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13709           0 :         if (value == NULL) {
   13710           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_control");
   13711           0 :                 return -1;
   13712             :         }
   13713             :         {
   13714           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_control));
   13715           0 :                 if (PyLong_Check(value)) {
   13716           0 :                         unsigned long long test_var;
   13717           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13718           0 :                         if (PyErr_Occurred() != NULL) {
   13719           0 :                                 return -1;
   13720             :                         }
   13721           0 :                         if (test_var > uint_max) {
   13722           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13723             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13724           0 :                                 return -1;
   13725             :                         }
   13726           0 :                         object->privilege_control = test_var;
   13727             :                 } else {
   13728           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13729             :                           PyLong_Type.tp_name);
   13730           0 :                         return -1;
   13731             :                 }
   13732             :         }
   13733           0 :         return 0;
   13734             : }
   13735             : 
   13736           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_attrib(PyObject *obj, void *closure)
   13737             : {
   13738           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13739           0 :         PyObject *py_privilege_attrib;
   13740           0 :         if (object->privilege_attrib == NULL) {
   13741           0 :                 Py_RETURN_NONE;
   13742             :         }
   13743           0 :         if (object->privilege_attrib == NULL) {
   13744           0 :                 py_privilege_attrib = Py_None;
   13745           0 :                 Py_INCREF(py_privilege_attrib);
   13746             :         } else {
   13747           0 :                 py_privilege_attrib = PyList_New(object->privilege_entries);
   13748           0 :                 if (py_privilege_attrib == NULL) {
   13749           0 :                         return NULL;
   13750             :                 }
   13751             :                 {
   13752             :                         int privilege_attrib_cntr_1;
   13753           0 :                         for (privilege_attrib_cntr_1 = 0; privilege_attrib_cntr_1 < (object->privilege_entries); privilege_attrib_cntr_1++) {
   13754           0 :                                 PyObject *py_privilege_attrib_1;
   13755           0 :                                 py_privilege_attrib_1 = PyLong_FromUnsignedLongLong((uint32_t)object->privilege_attrib[privilege_attrib_cntr_1]);
   13756           0 :                                 PyList_SetItem(py_privilege_attrib, privilege_attrib_cntr_1, py_privilege_attrib_1);
   13757             :                         }
   13758             :                 }
   13759             :         }
   13760           0 :         return py_privilege_attrib;
   13761             : }
   13762             : 
   13763           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_attrib(PyObject *py_obj, PyObject *value, void *closure)
   13764             : {
   13765           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13766           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->privilege_attrib));
   13767           0 :         if (value == NULL) {
   13768           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_attrib");
   13769           0 :                 return -1;
   13770             :         }
   13771           0 :         if (value == Py_None) {
   13772           0 :                 object->privilege_attrib = NULL;
   13773             :         } else {
   13774           0 :                 object->privilege_attrib = NULL;
   13775           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13776             :                 {
   13777           0 :                         int privilege_attrib_cntr_1;
   13778           0 :                         object->privilege_attrib = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->privilege_attrib, PyList_GET_SIZE(value));
   13779           0 :                         if (!object->privilege_attrib) { return -1; }
   13780           0 :                         talloc_set_name_const(object->privilege_attrib, "ARRAY: object->privilege_attrib");
   13781           0 :                         for (privilege_attrib_cntr_1 = 0; privilege_attrib_cntr_1 < PyList_GET_SIZE(value); privilege_attrib_cntr_1++) {
   13782           0 :                                 if (PyList_GET_ITEM(value, privilege_attrib_cntr_1) == NULL) {
   13783           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_attrib[privilege_attrib_cntr_1]");
   13784           0 :                                         return -1;
   13785             :                                 }
   13786             :                                 {
   13787           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_attrib[privilege_attrib_cntr_1]));
   13788           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, privilege_attrib_cntr_1))) {
   13789           0 :                                                 unsigned long long test_var;
   13790           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, privilege_attrib_cntr_1));
   13791           0 :                                                 if (PyErr_Occurred() != NULL) {
   13792           0 :                                                         return -1;
   13793             :                                                 }
   13794           0 :                                                 if (test_var > uint_max) {
   13795           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13796             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   13797           0 :                                                         return -1;
   13798             :                                                 }
   13799           0 :                                                 object->privilege_attrib[privilege_attrib_cntr_1] = test_var;
   13800             :                                         } else {
   13801           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   13802             :                                                   PyLong_Type.tp_name);
   13803           0 :                                                 return -1;
   13804             :                                         }
   13805             :                                 }
   13806             :                         }
   13807             :                 }
   13808             :         }
   13809           0 :         return 0;
   13810             : }
   13811             : 
   13812           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_name(PyObject *obj, void *closure)
   13813             : {
   13814           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13815           0 :         PyObject *py_privilege_name;
   13816           0 :         if (object->privilege_name == NULL) {
   13817           0 :                 Py_RETURN_NONE;
   13818             :         }
   13819           0 :         if (object->privilege_name == NULL) {
   13820           0 :                 py_privilege_name = Py_None;
   13821           0 :                 Py_INCREF(py_privilege_name);
   13822             :         } else {
   13823           0 :                 py_privilege_name = PyList_New(object->privilege_entries);
   13824           0 :                 if (py_privilege_name == NULL) {
   13825           0 :                         return NULL;
   13826             :                 }
   13827             :                 {
   13828             :                         int privilege_name_cntr_1;
   13829           0 :                         for (privilege_name_cntr_1 = 0; privilege_name_cntr_1 < (object->privilege_entries); privilege_name_cntr_1++) {
   13830           0 :                                 PyObject *py_privilege_name_1;
   13831           0 :                                 py_privilege_name_1 = pytalloc_reference_ex(lsa_String_Type, object->privilege_name, &object->privilege_name[privilege_name_cntr_1]);
   13832           0 :                                 PyList_SetItem(py_privilege_name, privilege_name_cntr_1, py_privilege_name_1);
   13833             :                         }
   13834             :                 }
   13835             :         }
   13836           0 :         return py_privilege_name;
   13837             : }
   13838             : 
   13839           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_name(PyObject *py_obj, PyObject *value, void *closure)
   13840             : {
   13841           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13842           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->privilege_name));
   13843           0 :         if (value == NULL) {
   13844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_name");
   13845           0 :                 return -1;
   13846             :         }
   13847           0 :         if (value == Py_None) {
   13848           0 :                 object->privilege_name = NULL;
   13849             :         } else {
   13850           0 :                 object->privilege_name = NULL;
   13851           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13852             :                 {
   13853           0 :                         int privilege_name_cntr_1;
   13854           0 :                         object->privilege_name = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->privilege_name, PyList_GET_SIZE(value));
   13855           0 :                         if (!object->privilege_name) { return -1; }
   13856           0 :                         talloc_set_name_const(object->privilege_name, "ARRAY: object->privilege_name");
   13857           0 :                         for (privilege_name_cntr_1 = 0; privilege_name_cntr_1 < PyList_GET_SIZE(value); privilege_name_cntr_1++) {
   13858           0 :                                 if (PyList_GET_ITEM(value, privilege_name_cntr_1) == NULL) {
   13859           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_name[privilege_name_cntr_1]");
   13860           0 :                                         return -1;
   13861             :                                 }
   13862           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, privilege_name_cntr_1), return -1;);
   13863           0 :                                 if (talloc_reference(object->privilege_name, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, privilege_name_cntr_1))) == NULL) {
   13864           0 :                                         PyErr_NoMemory();
   13865           0 :                                         return -1;
   13866             :                                 }
   13867           0 :                                 object->privilege_name[privilege_name_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, privilege_name_cntr_1));
   13868             :                         }
   13869             :                 }
   13870             :         }
   13871           0 :         return 0;
   13872             : }
   13873             : 
   13874           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_quotalimits(PyObject *obj, void *closure)
   13875             : {
   13876           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13877           0 :         PyObject *py_quotalimits;
   13878           0 :         py_quotalimits = pytalloc_reference_ex(&netr_QUOTA_LIMITS_Type, pytalloc_get_mem_ctx(obj), &object->quotalimits);
   13879           0 :         return py_quotalimits;
   13880             : }
   13881             : 
   13882           0 : static int py_netr_DELTA_ACCOUNT_set_quotalimits(PyObject *py_obj, PyObject *value, void *closure)
   13883             : {
   13884           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13885           0 :         if (value == NULL) {
   13886           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->quotalimits");
   13887           0 :                 return -1;
   13888             :         }
   13889           0 :         PY_CHECK_TYPE(&netr_QUOTA_LIMITS_Type, value, return -1;);
   13890           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13891           0 :                 PyErr_NoMemory();
   13892           0 :                 return -1;
   13893             :         }
   13894           0 :         object->quotalimits = *(struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(value);
   13895           0 :         return 0;
   13896             : }
   13897             : 
   13898           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_system_flags(PyObject *obj, void *closure)
   13899             : {
   13900           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13901           0 :         PyObject *py_system_flags;
   13902           0 :         py_system_flags = PyLong_FromUnsignedLongLong((uint32_t)object->system_flags);
   13903           0 :         return py_system_flags;
   13904             : }
   13905             : 
   13906           0 : static int py_netr_DELTA_ACCOUNT_set_system_flags(PyObject *py_obj, PyObject *value, void *closure)
   13907             : {
   13908           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13909           0 :         if (value == NULL) {
   13910           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->system_flags");
   13911           0 :                 return -1;
   13912             :         }
   13913             :         {
   13914           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->system_flags));
   13915           0 :                 if (PyLong_Check(value)) {
   13916           0 :                         unsigned long long test_var;
   13917           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13918           0 :                         if (PyErr_Occurred() != NULL) {
   13919           0 :                                 return -1;
   13920             :                         }
   13921           0 :                         if (test_var > uint_max) {
   13922           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13923             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13924           0 :                                 return -1;
   13925             :                         }
   13926           0 :                         object->system_flags = test_var;
   13927             :                 } else {
   13928           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13929             :                           PyLong_Type.tp_name);
   13930           0 :                         return -1;
   13931             :                 }
   13932             :         }
   13933           0 :         return 0;
   13934             : }
   13935             : 
   13936           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_SecurityInformation(PyObject *obj, void *closure)
   13937             : {
   13938           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13939           0 :         PyObject *py_SecurityInformation;
   13940           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   13941           0 :         return py_SecurityInformation;
   13942             : }
   13943             : 
   13944           0 : static int py_netr_DELTA_ACCOUNT_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   13945             : {
   13946           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13947           0 :         if (value == NULL) {
   13948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   13949           0 :                 return -1;
   13950             :         }
   13951             :         {
   13952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   13953           0 :                 if (PyLong_Check(value)) {
   13954           0 :                         unsigned long long test_var;
   13955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13956           0 :                         if (PyErr_Occurred() != NULL) {
   13957           0 :                                 return -1;
   13958             :                         }
   13959           0 :                         if (test_var > uint_max) {
   13960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13961             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13962           0 :                                 return -1;
   13963             :                         }
   13964           0 :                         object->SecurityInformation = test_var;
   13965             :                 } else {
   13966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13967             :                           PyLong_Type.tp_name);
   13968           0 :                         return -1;
   13969             :                 }
   13970             :         }
   13971           0 :         return 0;
   13972             : }
   13973             : 
   13974           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_sdbuf(PyObject *obj, void *closure)
   13975             : {
   13976           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13977           0 :         PyObject *py_sdbuf;
   13978           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   13979           0 :         return py_sdbuf;
   13980             : }
   13981             : 
   13982           0 : static int py_netr_DELTA_ACCOUNT_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   13983             : {
   13984           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13985           0 :         if (value == NULL) {
   13986           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   13987           0 :                 return -1;
   13988             :         }
   13989           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   13990           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13991           0 :                 PyErr_NoMemory();
   13992           0 :                 return -1;
   13993             :         }
   13994           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   13995           0 :         return 0;
   13996             : }
   13997             : 
   13998           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown1(PyObject *obj, void *closure)
   13999             : {
   14000           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14001           0 :         PyObject *py_unknown1;
   14002           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   14003           0 :         return py_unknown1;
   14004             : }
   14005             : 
   14006           0 : static int py_netr_DELTA_ACCOUNT_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   14007             : {
   14008           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14009           0 :         if (value == NULL) {
   14010           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   14011           0 :                 return -1;
   14012             :         }
   14013           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14014           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14015           0 :                 PyErr_NoMemory();
   14016           0 :                 return -1;
   14017             :         }
   14018           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14019           0 :         return 0;
   14020             : }
   14021             : 
   14022           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown2(PyObject *obj, void *closure)
   14023             : {
   14024           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14025           0 :         PyObject *py_unknown2;
   14026           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   14027           0 :         return py_unknown2;
   14028             : }
   14029             : 
   14030           0 : static int py_netr_DELTA_ACCOUNT_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   14031             : {
   14032           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14033           0 :         if (value == NULL) {
   14034           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   14035           0 :                 return -1;
   14036             :         }
   14037           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14038           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14039           0 :                 PyErr_NoMemory();
   14040           0 :                 return -1;
   14041             :         }
   14042           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14043           0 :         return 0;
   14044             : }
   14045             : 
   14046           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown3(PyObject *obj, void *closure)
   14047             : {
   14048           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14049           0 :         PyObject *py_unknown3;
   14050           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   14051           0 :         return py_unknown3;
   14052             : }
   14053             : 
   14054           0 : static int py_netr_DELTA_ACCOUNT_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   14055             : {
   14056           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14057           0 :         if (value == NULL) {
   14058           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   14059           0 :                 return -1;
   14060             :         }
   14061           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14062           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14063           0 :                 PyErr_NoMemory();
   14064           0 :                 return -1;
   14065             :         }
   14066           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14067           0 :         return 0;
   14068             : }
   14069             : 
   14070           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown4(PyObject *obj, void *closure)
   14071             : {
   14072           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14073           0 :         PyObject *py_unknown4;
   14074           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   14075           0 :         return py_unknown4;
   14076             : }
   14077             : 
   14078           0 : static int py_netr_DELTA_ACCOUNT_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   14079             : {
   14080           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14081           0 :         if (value == NULL) {
   14082           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   14083           0 :                 return -1;
   14084             :         }
   14085           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14086           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14087           0 :                 PyErr_NoMemory();
   14088           0 :                 return -1;
   14089             :         }
   14090           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14091           0 :         return 0;
   14092             : }
   14093             : 
   14094           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown5(PyObject *obj, void *closure)
   14095             : {
   14096           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14097           0 :         PyObject *py_unknown5;
   14098           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   14099           0 :         return py_unknown5;
   14100             : }
   14101             : 
   14102           0 : static int py_netr_DELTA_ACCOUNT_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   14103             : {
   14104           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14105           0 :         if (value == NULL) {
   14106           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   14107           0 :                 return -1;
   14108             :         }
   14109             :         {
   14110           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   14111           0 :                 if (PyLong_Check(value)) {
   14112           0 :                         unsigned long long test_var;
   14113           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14114           0 :                         if (PyErr_Occurred() != NULL) {
   14115           0 :                                 return -1;
   14116             :                         }
   14117           0 :                         if (test_var > uint_max) {
   14118           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14119             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14120           0 :                                 return -1;
   14121             :                         }
   14122           0 :                         object->unknown5 = test_var;
   14123             :                 } else {
   14124           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14125             :                           PyLong_Type.tp_name);
   14126           0 :                         return -1;
   14127             :                 }
   14128             :         }
   14129           0 :         return 0;
   14130             : }
   14131             : 
   14132           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown6(PyObject *obj, void *closure)
   14133             : {
   14134           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14135           0 :         PyObject *py_unknown6;
   14136           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   14137           0 :         return py_unknown6;
   14138             : }
   14139             : 
   14140           0 : static int py_netr_DELTA_ACCOUNT_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   14141             : {
   14142           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14143           0 :         if (value == NULL) {
   14144           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   14145           0 :                 return -1;
   14146             :         }
   14147             :         {
   14148           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   14149           0 :                 if (PyLong_Check(value)) {
   14150           0 :                         unsigned long long test_var;
   14151           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14152           0 :                         if (PyErr_Occurred() != NULL) {
   14153           0 :                                 return -1;
   14154             :                         }
   14155           0 :                         if (test_var > uint_max) {
   14156           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14157             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14158           0 :                                 return -1;
   14159             :                         }
   14160           0 :                         object->unknown6 = test_var;
   14161             :                 } else {
   14162           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14163             :                           PyLong_Type.tp_name);
   14164           0 :                         return -1;
   14165             :                 }
   14166             :         }
   14167           0 :         return 0;
   14168             : }
   14169             : 
   14170           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown7(PyObject *obj, void *closure)
   14171             : {
   14172           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14173           0 :         PyObject *py_unknown7;
   14174           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   14175           0 :         return py_unknown7;
   14176             : }
   14177             : 
   14178           0 : static int py_netr_DELTA_ACCOUNT_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   14179             : {
   14180           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14181           0 :         if (value == NULL) {
   14182           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   14183           0 :                 return -1;
   14184             :         }
   14185             :         {
   14186           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   14187           0 :                 if (PyLong_Check(value)) {
   14188           0 :                         unsigned long long test_var;
   14189           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14190           0 :                         if (PyErr_Occurred() != NULL) {
   14191           0 :                                 return -1;
   14192             :                         }
   14193           0 :                         if (test_var > uint_max) {
   14194           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14195             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14196           0 :                                 return -1;
   14197             :                         }
   14198           0 :                         object->unknown7 = test_var;
   14199             :                 } else {
   14200           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14201             :                           PyLong_Type.tp_name);
   14202           0 :                         return -1;
   14203             :                 }
   14204             :         }
   14205           0 :         return 0;
   14206             : }
   14207             : 
   14208           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown8(PyObject *obj, void *closure)
   14209             : {
   14210           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14211           0 :         PyObject *py_unknown8;
   14212           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   14213           0 :         return py_unknown8;
   14214             : }
   14215             : 
   14216           0 : static int py_netr_DELTA_ACCOUNT_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   14217             : {
   14218           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14219           0 :         if (value == NULL) {
   14220           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   14221           0 :                 return -1;
   14222             :         }
   14223             :         {
   14224           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   14225           0 :                 if (PyLong_Check(value)) {
   14226           0 :                         unsigned long long test_var;
   14227           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14228           0 :                         if (PyErr_Occurred() != NULL) {
   14229           0 :                                 return -1;
   14230             :                         }
   14231           0 :                         if (test_var > uint_max) {
   14232           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14233             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14234           0 :                                 return -1;
   14235             :                         }
   14236           0 :                         object->unknown8 = test_var;
   14237             :                 } else {
   14238           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14239             :                           PyLong_Type.tp_name);
   14240           0 :                         return -1;
   14241             :                 }
   14242             :         }
   14243           0 :         return 0;
   14244             : }
   14245             : 
   14246             : static PyGetSetDef py_netr_DELTA_ACCOUNT_getsetters[] = {
   14247             :         {
   14248             :                 .name = discard_const_p(char, "privilege_entries"),
   14249             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_entries,
   14250             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_entries,
   14251             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14252             :         },
   14253             :         {
   14254             :                 .name = discard_const_p(char, "privilege_control"),
   14255             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_control,
   14256             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_control,
   14257             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14258             :         },
   14259             :         {
   14260             :                 .name = discard_const_p(char, "privilege_attrib"),
   14261             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_attrib,
   14262             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_attrib,
   14263             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14264             :         },
   14265             :         {
   14266             :                 .name = discard_const_p(char, "privilege_name"),
   14267             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_name,
   14268             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_name,
   14269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14270             :         },
   14271             :         {
   14272             :                 .name = discard_const_p(char, "quotalimits"),
   14273             :                 .get = py_netr_DELTA_ACCOUNT_get_quotalimits,
   14274             :                 .set = py_netr_DELTA_ACCOUNT_set_quotalimits,
   14275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_QUOTA_LIMITS")
   14276             :         },
   14277             :         {
   14278             :                 .name = discard_const_p(char, "system_flags"),
   14279             :                 .get = py_netr_DELTA_ACCOUNT_get_system_flags,
   14280             :                 .set = py_netr_DELTA_ACCOUNT_set_system_flags,
   14281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14282             :         },
   14283             :         {
   14284             :                 .name = discard_const_p(char, "SecurityInformation"),
   14285             :                 .get = py_netr_DELTA_ACCOUNT_get_SecurityInformation,
   14286             :                 .set = py_netr_DELTA_ACCOUNT_set_SecurityInformation,
   14287             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14288             :         },
   14289             :         {
   14290             :                 .name = discard_const_p(char, "sdbuf"),
   14291             :                 .get = py_netr_DELTA_ACCOUNT_get_sdbuf,
   14292             :                 .set = py_netr_DELTA_ACCOUNT_set_sdbuf,
   14293             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   14294             :         },
   14295             :         {
   14296             :                 .name = discard_const_p(char, "unknown1"),
   14297             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown1,
   14298             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown1,
   14299             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14300             :         },
   14301             :         {
   14302             :                 .name = discard_const_p(char, "unknown2"),
   14303             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown2,
   14304             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown2,
   14305             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14306             :         },
   14307             :         {
   14308             :                 .name = discard_const_p(char, "unknown3"),
   14309             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown3,
   14310             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown3,
   14311             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14312             :         },
   14313             :         {
   14314             :                 .name = discard_const_p(char, "unknown4"),
   14315             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown4,
   14316             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown4,
   14317             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14318             :         },
   14319             :         {
   14320             :                 .name = discard_const_p(char, "unknown5"),
   14321             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown5,
   14322             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown5,
   14323             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14324             :         },
   14325             :         {
   14326             :                 .name = discard_const_p(char, "unknown6"),
   14327             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown6,
   14328             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown6,
   14329             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14330             :         },
   14331             :         {
   14332             :                 .name = discard_const_p(char, "unknown7"),
   14333             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown7,
   14334             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown7,
   14335             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14336             :         },
   14337             :         {
   14338             :                 .name = discard_const_p(char, "unknown8"),
   14339             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown8,
   14340             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown8,
   14341             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14342             :         },
   14343             :         { .name = NULL }
   14344             : };
   14345             : 
   14346           0 : static PyObject *py_netr_DELTA_ACCOUNT_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14347             : {
   14348           0 :         return pytalloc_new(struct netr_DELTA_ACCOUNT, type);
   14349             : }
   14350             : 
   14351             : 
   14352             : static PyTypeObject netr_DELTA_ACCOUNT_Type = {
   14353             :         PyVarObject_HEAD_INIT(NULL, 0)
   14354             :         .tp_name = "netlogon.netr_DELTA_ACCOUNT",
   14355             :         .tp_getset = py_netr_DELTA_ACCOUNT_getsetters,
   14356             :         .tp_methods = NULL,
   14357             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14358             :         .tp_new = py_netr_DELTA_ACCOUNT_new,
   14359             : };
   14360             : 
   14361             : 
   14362           0 : static PyObject *py_netr_CIPHER_VALUE_get_len(PyObject *obj, void *closure)
   14363             : {
   14364           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(obj);
   14365           0 :         PyObject *py_len;
   14366           0 :         py_len = PyLong_FromUnsignedLongLong((uint32_t)object->len);
   14367           0 :         return py_len;
   14368             : }
   14369             : 
   14370           0 : static int py_netr_CIPHER_VALUE_set_len(PyObject *py_obj, PyObject *value, void *closure)
   14371             : {
   14372           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(py_obj);
   14373           0 :         if (value == NULL) {
   14374           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->len");
   14375           0 :                 return -1;
   14376             :         }
   14377             :         {
   14378           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->len));
   14379           0 :                 if (PyLong_Check(value)) {
   14380           0 :                         unsigned long long test_var;
   14381           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14382           0 :                         if (PyErr_Occurred() != NULL) {
   14383           0 :                                 return -1;
   14384             :                         }
   14385           0 :                         if (test_var > uint_max) {
   14386           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14387             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14388           0 :                                 return -1;
   14389             :                         }
   14390           0 :                         object->len = test_var;
   14391             :                 } else {
   14392           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14393             :                           PyLong_Type.tp_name);
   14394           0 :                         return -1;
   14395             :                 }
   14396             :         }
   14397           0 :         return 0;
   14398             : }
   14399             : 
   14400           0 : static PyObject *py_netr_CIPHER_VALUE_get_maxlen(PyObject *obj, void *closure)
   14401             : {
   14402           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(obj);
   14403           0 :         PyObject *py_maxlen;
   14404           0 :         py_maxlen = PyLong_FromUnsignedLongLong((uint32_t)object->maxlen);
   14405           0 :         return py_maxlen;
   14406             : }
   14407             : 
   14408           0 : static int py_netr_CIPHER_VALUE_set_maxlen(PyObject *py_obj, PyObject *value, void *closure)
   14409             : {
   14410           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(py_obj);
   14411           0 :         if (value == NULL) {
   14412           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxlen");
   14413           0 :                 return -1;
   14414             :         }
   14415             :         {
   14416           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlen));
   14417           0 :                 if (PyLong_Check(value)) {
   14418           0 :                         unsigned long long test_var;
   14419           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14420           0 :                         if (PyErr_Occurred() != NULL) {
   14421           0 :                                 return -1;
   14422             :                         }
   14423           0 :                         if (test_var > uint_max) {
   14424           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14425             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14426           0 :                                 return -1;
   14427             :                         }
   14428           0 :                         object->maxlen = test_var;
   14429             :                 } else {
   14430           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14431             :                           PyLong_Type.tp_name);
   14432           0 :                         return -1;
   14433             :                 }
   14434             :         }
   14435           0 :         return 0;
   14436             : }
   14437             : 
   14438           0 : static PyObject *py_netr_CIPHER_VALUE_get_cipher_data(PyObject *obj, void *closure)
   14439             : {
   14440           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(obj);
   14441           0 :         PyObject *py_cipher_data;
   14442           0 :         if (object->cipher_data == NULL) {
   14443           0 :                 Py_RETURN_NONE;
   14444             :         }
   14445           0 :         if (object->cipher_data == NULL) {
   14446           0 :                 py_cipher_data = Py_None;
   14447           0 :                 Py_INCREF(py_cipher_data);
   14448             :         } else {
   14449           0 :                 py_cipher_data = PyList_New(object->len);
   14450           0 :                 if (py_cipher_data == NULL) {
   14451           0 :                         return NULL;
   14452             :                 }
   14453             :                 {
   14454             :                         int cipher_data_cntr_1;
   14455           0 :                         for (cipher_data_cntr_1 = 0; cipher_data_cntr_1 < (object->len); cipher_data_cntr_1++) {
   14456           0 :                                 PyObject *py_cipher_data_1;
   14457           0 :                                 py_cipher_data_1 = PyLong_FromLong((uint16_t)object->cipher_data[cipher_data_cntr_1]);
   14458           0 :                                 PyList_SetItem(py_cipher_data, cipher_data_cntr_1, py_cipher_data_1);
   14459             :                         }
   14460             :                 }
   14461             :         }
   14462           0 :         return py_cipher_data;
   14463             : }
   14464             : 
   14465           0 : static int py_netr_CIPHER_VALUE_set_cipher_data(PyObject *py_obj, PyObject *value, void *closure)
   14466             : {
   14467           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(py_obj);
   14468           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->cipher_data));
   14469           0 :         if (value == NULL) {
   14470           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cipher_data");
   14471           0 :                 return -1;
   14472             :         }
   14473           0 :         if (value == Py_None) {
   14474           0 :                 object->cipher_data = NULL;
   14475             :         } else {
   14476           0 :                 object->cipher_data = NULL;
   14477           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   14478             :                 {
   14479           0 :                         int cipher_data_cntr_1;
   14480           0 :                         object->cipher_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cipher_data, PyList_GET_SIZE(value));
   14481           0 :                         if (!object->cipher_data) { return -1; }
   14482           0 :                         talloc_set_name_const(object->cipher_data, "ARRAY: object->cipher_data");
   14483           0 :                         for (cipher_data_cntr_1 = 0; cipher_data_cntr_1 < PyList_GET_SIZE(value); cipher_data_cntr_1++) {
   14484           0 :                                 if (PyList_GET_ITEM(value, cipher_data_cntr_1) == NULL) {
   14485           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cipher_data[cipher_data_cntr_1]");
   14486           0 :                                         return -1;
   14487             :                                 }
   14488             :                                 {
   14489           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cipher_data[cipher_data_cntr_1]));
   14490           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, cipher_data_cntr_1))) {
   14491           0 :                                                 unsigned long long test_var;
   14492           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, cipher_data_cntr_1));
   14493           0 :                                                 if (PyErr_Occurred() != NULL) {
   14494           0 :                                                         return -1;
   14495             :                                                 }
   14496           0 :                                                 if (test_var > uint_max) {
   14497           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14498             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   14499           0 :                                                         return -1;
   14500             :                                                 }
   14501           0 :                                                 object->cipher_data[cipher_data_cntr_1] = test_var;
   14502             :                                         } else {
   14503           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   14504             :                                                   PyLong_Type.tp_name);
   14505           0 :                                                 return -1;
   14506             :                                         }
   14507             :                                 }
   14508             :                         }
   14509             :                 }
   14510             :         }
   14511           0 :         return 0;
   14512             : }
   14513             : 
   14514             : static PyGetSetDef py_netr_CIPHER_VALUE_getsetters[] = {
   14515             :         {
   14516             :                 .name = discard_const_p(char, "len"),
   14517             :                 .get = py_netr_CIPHER_VALUE_get_len,
   14518             :                 .set = py_netr_CIPHER_VALUE_set_len,
   14519             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14520             :         },
   14521             :         {
   14522             :                 .name = discard_const_p(char, "maxlen"),
   14523             :                 .get = py_netr_CIPHER_VALUE_get_maxlen,
   14524             :                 .set = py_netr_CIPHER_VALUE_set_maxlen,
   14525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14526             :         },
   14527             :         {
   14528             :                 .name = discard_const_p(char, "cipher_data"),
   14529             :                 .get = py_netr_CIPHER_VALUE_get_cipher_data,
   14530             :                 .set = py_netr_CIPHER_VALUE_set_cipher_data,
   14531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14532             :         },
   14533             :         { .name = NULL }
   14534             : };
   14535             : 
   14536           0 : static PyObject *py_netr_CIPHER_VALUE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14537             : {
   14538           0 :         return pytalloc_new(struct netr_CIPHER_VALUE, type);
   14539             : }
   14540             : 
   14541             : 
   14542             : static PyTypeObject netr_CIPHER_VALUE_Type = {
   14543             :         PyVarObject_HEAD_INIT(NULL, 0)
   14544             :         .tp_name = "netlogon.netr_CIPHER_VALUE",
   14545             :         .tp_getset = py_netr_CIPHER_VALUE_getsetters,
   14546             :         .tp_methods = NULL,
   14547             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14548             :         .tp_new = py_netr_CIPHER_VALUE_new,
   14549             : };
   14550             : 
   14551             : 
   14552           0 : static PyObject *py_netr_DELTA_SECRET_get_current_cipher(PyObject *obj, void *closure)
   14553             : {
   14554           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14555           0 :         PyObject *py_current_cipher;
   14556           0 :         py_current_cipher = pytalloc_reference_ex(&netr_CIPHER_VALUE_Type, pytalloc_get_mem_ctx(obj), &object->current_cipher);
   14557           0 :         return py_current_cipher;
   14558             : }
   14559             : 
   14560           0 : static int py_netr_DELTA_SECRET_set_current_cipher(PyObject *py_obj, PyObject *value, void *closure)
   14561             : {
   14562           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14563           0 :         if (value == NULL) {
   14564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_cipher");
   14565           0 :                 return -1;
   14566             :         }
   14567           0 :         PY_CHECK_TYPE(&netr_CIPHER_VALUE_Type, value, return -1;);
   14568           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14569           0 :                 PyErr_NoMemory();
   14570           0 :                 return -1;
   14571             :         }
   14572           0 :         object->current_cipher = *(struct netr_CIPHER_VALUE *)pytalloc_get_ptr(value);
   14573           0 :         return 0;
   14574             : }
   14575             : 
   14576           0 : static PyObject *py_netr_DELTA_SECRET_get_current_cipher_set_time(PyObject *obj, void *closure)
   14577             : {
   14578           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14579           0 :         PyObject *py_current_cipher_set_time;
   14580           0 :         py_current_cipher_set_time = PyLong_FromUnsignedLongLong(object->current_cipher_set_time);
   14581           0 :         return py_current_cipher_set_time;
   14582             : }
   14583             : 
   14584           0 : static int py_netr_DELTA_SECRET_set_current_cipher_set_time(PyObject *py_obj, PyObject *value, void *closure)
   14585             : {
   14586           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14587           0 :         if (value == NULL) {
   14588           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_cipher_set_time");
   14589           0 :                 return -1;
   14590             :         }
   14591             :         {
   14592           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_cipher_set_time));
   14593           0 :                 if (PyLong_Check(value)) {
   14594           0 :                         unsigned long long test_var;
   14595           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14596           0 :                         if (PyErr_Occurred() != NULL) {
   14597           0 :                                 return -1;
   14598             :                         }
   14599           0 :                         if (test_var > uint_max) {
   14600           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14601             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14602           0 :                                 return -1;
   14603             :                         }
   14604           0 :                         object->current_cipher_set_time = test_var;
   14605             :                 } else {
   14606           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14607             :                           PyLong_Type.tp_name);
   14608           0 :                         return -1;
   14609             :                 }
   14610             :         }
   14611           0 :         return 0;
   14612             : }
   14613             : 
   14614           0 : static PyObject *py_netr_DELTA_SECRET_get_old_cipher(PyObject *obj, void *closure)
   14615             : {
   14616           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14617           0 :         PyObject *py_old_cipher;
   14618           0 :         py_old_cipher = pytalloc_reference_ex(&netr_CIPHER_VALUE_Type, pytalloc_get_mem_ctx(obj), &object->old_cipher);
   14619           0 :         return py_old_cipher;
   14620             : }
   14621             : 
   14622           0 : static int py_netr_DELTA_SECRET_set_old_cipher(PyObject *py_obj, PyObject *value, void *closure)
   14623             : {
   14624           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14625           0 :         if (value == NULL) {
   14626           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_cipher");
   14627           0 :                 return -1;
   14628             :         }
   14629           0 :         PY_CHECK_TYPE(&netr_CIPHER_VALUE_Type, value, return -1;);
   14630           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14631           0 :                 PyErr_NoMemory();
   14632           0 :                 return -1;
   14633             :         }
   14634           0 :         object->old_cipher = *(struct netr_CIPHER_VALUE *)pytalloc_get_ptr(value);
   14635           0 :         return 0;
   14636             : }
   14637             : 
   14638           0 : static PyObject *py_netr_DELTA_SECRET_get_old_cipher_set_time(PyObject *obj, void *closure)
   14639             : {
   14640           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14641           0 :         PyObject *py_old_cipher_set_time;
   14642           0 :         py_old_cipher_set_time = PyLong_FromUnsignedLongLong(object->old_cipher_set_time);
   14643           0 :         return py_old_cipher_set_time;
   14644             : }
   14645             : 
   14646           0 : static int py_netr_DELTA_SECRET_set_old_cipher_set_time(PyObject *py_obj, PyObject *value, void *closure)
   14647             : {
   14648           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14649           0 :         if (value == NULL) {
   14650           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_cipher_set_time");
   14651           0 :                 return -1;
   14652             :         }
   14653             :         {
   14654           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->old_cipher_set_time));
   14655           0 :                 if (PyLong_Check(value)) {
   14656           0 :                         unsigned long long test_var;
   14657           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14658           0 :                         if (PyErr_Occurred() != NULL) {
   14659           0 :                                 return -1;
   14660             :                         }
   14661           0 :                         if (test_var > uint_max) {
   14662           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14663             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14664           0 :                                 return -1;
   14665             :                         }
   14666           0 :                         object->old_cipher_set_time = test_var;
   14667             :                 } else {
   14668           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14669             :                           PyLong_Type.tp_name);
   14670           0 :                         return -1;
   14671             :                 }
   14672             :         }
   14673           0 :         return 0;
   14674             : }
   14675             : 
   14676           0 : static PyObject *py_netr_DELTA_SECRET_get_SecurityInformation(PyObject *obj, void *closure)
   14677             : {
   14678           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14679           0 :         PyObject *py_SecurityInformation;
   14680           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   14681           0 :         return py_SecurityInformation;
   14682             : }
   14683             : 
   14684           0 : static int py_netr_DELTA_SECRET_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   14685             : {
   14686           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14687           0 :         if (value == NULL) {
   14688           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   14689           0 :                 return -1;
   14690             :         }
   14691             :         {
   14692           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   14693           0 :                 if (PyLong_Check(value)) {
   14694           0 :                         unsigned long long test_var;
   14695           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14696           0 :                         if (PyErr_Occurred() != NULL) {
   14697           0 :                                 return -1;
   14698             :                         }
   14699           0 :                         if (test_var > uint_max) {
   14700           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14701             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14702           0 :                                 return -1;
   14703             :                         }
   14704           0 :                         object->SecurityInformation = test_var;
   14705             :                 } else {
   14706           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14707             :                           PyLong_Type.tp_name);
   14708           0 :                         return -1;
   14709             :                 }
   14710             :         }
   14711           0 :         return 0;
   14712             : }
   14713             : 
   14714           0 : static PyObject *py_netr_DELTA_SECRET_get_sdbuf(PyObject *obj, void *closure)
   14715             : {
   14716           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14717           0 :         PyObject *py_sdbuf;
   14718           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   14719           0 :         return py_sdbuf;
   14720             : }
   14721             : 
   14722           0 : static int py_netr_DELTA_SECRET_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   14723             : {
   14724           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14725           0 :         if (value == NULL) {
   14726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   14727           0 :                 return -1;
   14728             :         }
   14729           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   14730           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14731           0 :                 PyErr_NoMemory();
   14732           0 :                 return -1;
   14733             :         }
   14734           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   14735           0 :         return 0;
   14736             : }
   14737             : 
   14738           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown1(PyObject *obj, void *closure)
   14739             : {
   14740           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14741           0 :         PyObject *py_unknown1;
   14742           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   14743           0 :         return py_unknown1;
   14744             : }
   14745             : 
   14746           0 : static int py_netr_DELTA_SECRET_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   14747             : {
   14748           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14749           0 :         if (value == NULL) {
   14750           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   14751           0 :                 return -1;
   14752             :         }
   14753           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14754           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14755           0 :                 PyErr_NoMemory();
   14756           0 :                 return -1;
   14757             :         }
   14758           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14759           0 :         return 0;
   14760             : }
   14761             : 
   14762           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown2(PyObject *obj, void *closure)
   14763             : {
   14764           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14765           0 :         PyObject *py_unknown2;
   14766           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   14767           0 :         return py_unknown2;
   14768             : }
   14769             : 
   14770           0 : static int py_netr_DELTA_SECRET_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   14771             : {
   14772           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14773           0 :         if (value == NULL) {
   14774           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   14775           0 :                 return -1;
   14776             :         }
   14777           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14778           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14779           0 :                 PyErr_NoMemory();
   14780           0 :                 return -1;
   14781             :         }
   14782           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14783           0 :         return 0;
   14784             : }
   14785             : 
   14786           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown3(PyObject *obj, void *closure)
   14787             : {
   14788           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14789           0 :         PyObject *py_unknown3;
   14790           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   14791           0 :         return py_unknown3;
   14792             : }
   14793             : 
   14794           0 : static int py_netr_DELTA_SECRET_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   14795             : {
   14796           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14797           0 :         if (value == NULL) {
   14798           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   14799           0 :                 return -1;
   14800             :         }
   14801           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14802           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14803           0 :                 PyErr_NoMemory();
   14804           0 :                 return -1;
   14805             :         }
   14806           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14807           0 :         return 0;
   14808             : }
   14809             : 
   14810           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown4(PyObject *obj, void *closure)
   14811             : {
   14812           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14813           0 :         PyObject *py_unknown4;
   14814           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   14815           0 :         return py_unknown4;
   14816             : }
   14817             : 
   14818           0 : static int py_netr_DELTA_SECRET_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   14819             : {
   14820           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14821           0 :         if (value == NULL) {
   14822           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   14823           0 :                 return -1;
   14824             :         }
   14825           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14826           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14827           0 :                 PyErr_NoMemory();
   14828           0 :                 return -1;
   14829             :         }
   14830           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14831           0 :         return 0;
   14832             : }
   14833             : 
   14834           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown5(PyObject *obj, void *closure)
   14835             : {
   14836           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14837           0 :         PyObject *py_unknown5;
   14838           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   14839           0 :         return py_unknown5;
   14840             : }
   14841             : 
   14842           0 : static int py_netr_DELTA_SECRET_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   14843             : {
   14844           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14845           0 :         if (value == NULL) {
   14846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   14847           0 :                 return -1;
   14848             :         }
   14849             :         {
   14850           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   14851           0 :                 if (PyLong_Check(value)) {
   14852           0 :                         unsigned long long test_var;
   14853           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14854           0 :                         if (PyErr_Occurred() != NULL) {
   14855           0 :                                 return -1;
   14856             :                         }
   14857           0 :                         if (test_var > uint_max) {
   14858           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14859             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14860           0 :                                 return -1;
   14861             :                         }
   14862           0 :                         object->unknown5 = test_var;
   14863             :                 } else {
   14864           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14865             :                           PyLong_Type.tp_name);
   14866           0 :                         return -1;
   14867             :                 }
   14868             :         }
   14869           0 :         return 0;
   14870             : }
   14871             : 
   14872           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown6(PyObject *obj, void *closure)
   14873             : {
   14874           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14875           0 :         PyObject *py_unknown6;
   14876           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   14877           0 :         return py_unknown6;
   14878             : }
   14879             : 
   14880           0 : static int py_netr_DELTA_SECRET_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   14881             : {
   14882           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14883           0 :         if (value == NULL) {
   14884           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   14885           0 :                 return -1;
   14886             :         }
   14887             :         {
   14888           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   14889           0 :                 if (PyLong_Check(value)) {
   14890           0 :                         unsigned long long test_var;
   14891           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14892           0 :                         if (PyErr_Occurred() != NULL) {
   14893           0 :                                 return -1;
   14894             :                         }
   14895           0 :                         if (test_var > uint_max) {
   14896           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14897             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14898           0 :                                 return -1;
   14899             :                         }
   14900           0 :                         object->unknown6 = test_var;
   14901             :                 } else {
   14902           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14903             :                           PyLong_Type.tp_name);
   14904           0 :                         return -1;
   14905             :                 }
   14906             :         }
   14907           0 :         return 0;
   14908             : }
   14909             : 
   14910           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown7(PyObject *obj, void *closure)
   14911             : {
   14912           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14913           0 :         PyObject *py_unknown7;
   14914           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   14915           0 :         return py_unknown7;
   14916             : }
   14917             : 
   14918           0 : static int py_netr_DELTA_SECRET_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   14919             : {
   14920           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14921           0 :         if (value == NULL) {
   14922           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   14923           0 :                 return -1;
   14924             :         }
   14925             :         {
   14926           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   14927           0 :                 if (PyLong_Check(value)) {
   14928           0 :                         unsigned long long test_var;
   14929           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14930           0 :                         if (PyErr_Occurred() != NULL) {
   14931           0 :                                 return -1;
   14932             :                         }
   14933           0 :                         if (test_var > uint_max) {
   14934           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14935             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14936           0 :                                 return -1;
   14937             :                         }
   14938           0 :                         object->unknown7 = test_var;
   14939             :                 } else {
   14940           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14941             :                           PyLong_Type.tp_name);
   14942           0 :                         return -1;
   14943             :                 }
   14944             :         }
   14945           0 :         return 0;
   14946             : }
   14947             : 
   14948           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown8(PyObject *obj, void *closure)
   14949             : {
   14950           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14951           0 :         PyObject *py_unknown8;
   14952           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   14953           0 :         return py_unknown8;
   14954             : }
   14955             : 
   14956           0 : static int py_netr_DELTA_SECRET_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   14957             : {
   14958           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14959           0 :         if (value == NULL) {
   14960           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   14961           0 :                 return -1;
   14962             :         }
   14963             :         {
   14964           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   14965           0 :                 if (PyLong_Check(value)) {
   14966           0 :                         unsigned long long test_var;
   14967           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14968           0 :                         if (PyErr_Occurred() != NULL) {
   14969           0 :                                 return -1;
   14970             :                         }
   14971           0 :                         if (test_var > uint_max) {
   14972           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14973             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14974           0 :                                 return -1;
   14975             :                         }
   14976           0 :                         object->unknown8 = test_var;
   14977             :                 } else {
   14978           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14979             :                           PyLong_Type.tp_name);
   14980           0 :                         return -1;
   14981             :                 }
   14982             :         }
   14983           0 :         return 0;
   14984             : }
   14985             : 
   14986             : static PyGetSetDef py_netr_DELTA_SECRET_getsetters[] = {
   14987             :         {
   14988             :                 .name = discard_const_p(char, "current_cipher"),
   14989             :                 .get = py_netr_DELTA_SECRET_get_current_cipher,
   14990             :                 .set = py_netr_DELTA_SECRET_set_current_cipher,
   14991             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CIPHER_VALUE")
   14992             :         },
   14993             :         {
   14994             :                 .name = discard_const_p(char, "current_cipher_set_time"),
   14995             :                 .get = py_netr_DELTA_SECRET_get_current_cipher_set_time,
   14996             :                 .set = py_netr_DELTA_SECRET_set_current_cipher_set_time,
   14997             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   14998             :         },
   14999             :         {
   15000             :                 .name = discard_const_p(char, "old_cipher"),
   15001             :                 .get = py_netr_DELTA_SECRET_get_old_cipher,
   15002             :                 .set = py_netr_DELTA_SECRET_set_old_cipher,
   15003             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CIPHER_VALUE")
   15004             :         },
   15005             :         {
   15006             :                 .name = discard_const_p(char, "old_cipher_set_time"),
   15007             :                 .get = py_netr_DELTA_SECRET_get_old_cipher_set_time,
   15008             :                 .set = py_netr_DELTA_SECRET_set_old_cipher_set_time,
   15009             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   15010             :         },
   15011             :         {
   15012             :                 .name = discard_const_p(char, "SecurityInformation"),
   15013             :                 .get = py_netr_DELTA_SECRET_get_SecurityInformation,
   15014             :                 .set = py_netr_DELTA_SECRET_set_SecurityInformation,
   15015             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15016             :         },
   15017             :         {
   15018             :                 .name = discard_const_p(char, "sdbuf"),
   15019             :                 .get = py_netr_DELTA_SECRET_get_sdbuf,
   15020             :                 .set = py_netr_DELTA_SECRET_set_sdbuf,
   15021             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   15022             :         },
   15023             :         {
   15024             :                 .name = discard_const_p(char, "unknown1"),
   15025             :                 .get = py_netr_DELTA_SECRET_get_unknown1,
   15026             :                 .set = py_netr_DELTA_SECRET_set_unknown1,
   15027             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   15028             :         },
   15029             :         {
   15030             :                 .name = discard_const_p(char, "unknown2"),
   15031             :                 .get = py_netr_DELTA_SECRET_get_unknown2,
   15032             :                 .set = py_netr_DELTA_SECRET_set_unknown2,
   15033             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   15034             :         },
   15035             :         {
   15036             :                 .name = discard_const_p(char, "unknown3"),
   15037             :                 .get = py_netr_DELTA_SECRET_get_unknown3,
   15038             :                 .set = py_netr_DELTA_SECRET_set_unknown3,
   15039             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   15040             :         },
   15041             :         {
   15042             :                 .name = discard_const_p(char, "unknown4"),
   15043             :                 .get = py_netr_DELTA_SECRET_get_unknown4,
   15044             :                 .set = py_netr_DELTA_SECRET_set_unknown4,
   15045             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   15046             :         },
   15047             :         {
   15048             :                 .name = discard_const_p(char, "unknown5"),
   15049             :                 .get = py_netr_DELTA_SECRET_get_unknown5,
   15050             :                 .set = py_netr_DELTA_SECRET_set_unknown5,
   15051             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15052             :         },
   15053             :         {
   15054             :                 .name = discard_const_p(char, "unknown6"),
   15055             :                 .get = py_netr_DELTA_SECRET_get_unknown6,
   15056             :                 .set = py_netr_DELTA_SECRET_set_unknown6,
   15057             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15058             :         },
   15059             :         {
   15060             :                 .name = discard_const_p(char, "unknown7"),
   15061             :                 .get = py_netr_DELTA_SECRET_get_unknown7,
   15062             :                 .set = py_netr_DELTA_SECRET_set_unknown7,
   15063             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15064             :         },
   15065             :         {
   15066             :                 .name = discard_const_p(char, "unknown8"),
   15067             :                 .get = py_netr_DELTA_SECRET_get_unknown8,
   15068             :                 .set = py_netr_DELTA_SECRET_set_unknown8,
   15069             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15070             :         },
   15071             :         { .name = NULL }
   15072             : };
   15073             : 
   15074           0 : static PyObject *py_netr_DELTA_SECRET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15075             : {
   15076           0 :         return pytalloc_new(struct netr_DELTA_SECRET, type);
   15077             : }
   15078             : 
   15079             : 
   15080             : static PyTypeObject netr_DELTA_SECRET_Type = {
   15081             :         PyVarObject_HEAD_INIT(NULL, 0)
   15082             :         .tp_name = "netlogon.netr_DELTA_SECRET",
   15083             :         .tp_getset = py_netr_DELTA_SECRET_getsetters,
   15084             :         .tp_methods = NULL,
   15085             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15086             :         .tp_new = py_netr_DELTA_SECRET_new,
   15087             : };
   15088             : 
   15089           0 : static PyObject *py_import_netr_DELTA_UNION(TALLOC_CTX *mem_ctx, int level, union netr_DELTA_UNION *in)
   15090             : {
   15091           0 :         PyObject *ret;
   15092             : 
   15093           0 :         switch (level) {
   15094           0 :                 case NETR_DELTA_DOMAIN:
   15095           0 :                         if (in->domain == NULL) {
   15096           0 :                                 ret = Py_None;
   15097           0 :                                 Py_INCREF(ret);
   15098             :                         } else {
   15099           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_DOMAIN_Type, in->domain, in->domain);
   15100             :                         }
   15101           0 :                         return ret;
   15102             : 
   15103           0 :                 case NETR_DELTA_GROUP:
   15104           0 :                         if (in->group == NULL) {
   15105           0 :                                 ret = Py_None;
   15106           0 :                                 Py_INCREF(ret);
   15107             :                         } else {
   15108           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_GROUP_Type, in->group, in->group);
   15109             :                         }
   15110           0 :                         return ret;
   15111             : 
   15112           0 :                 case NETR_DELTA_DELETE_GROUP:
   15113           0 :                         ret = Py_None;
   15114           0 :                         Py_INCREF(ret);
   15115           0 :                         return ret;
   15116             : 
   15117           0 :                 case NETR_DELTA_RENAME_GROUP:
   15118           0 :                         if (in->rename_group == NULL) {
   15119           0 :                                 ret = Py_None;
   15120           0 :                                 Py_INCREF(ret);
   15121             :                         } else {
   15122           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_group, in->rename_group);
   15123             :                         }
   15124           0 :                         return ret;
   15125             : 
   15126           0 :                 case NETR_DELTA_USER:
   15127           0 :                         if (in->user == NULL) {
   15128           0 :                                 ret = Py_None;
   15129           0 :                                 Py_INCREF(ret);
   15130             :                         } else {
   15131           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_USER_Type, in->user, in->user);
   15132             :                         }
   15133           0 :                         return ret;
   15134             : 
   15135           0 :                 case NETR_DELTA_DELETE_USER:
   15136           0 :                         ret = Py_None;
   15137           0 :                         Py_INCREF(ret);
   15138           0 :                         return ret;
   15139             : 
   15140           0 :                 case NETR_DELTA_RENAME_USER:
   15141           0 :                         if (in->rename_user == NULL) {
   15142           0 :                                 ret = Py_None;
   15143           0 :                                 Py_INCREF(ret);
   15144             :                         } else {
   15145           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_user, in->rename_user);
   15146             :                         }
   15147           0 :                         return ret;
   15148             : 
   15149           0 :                 case NETR_DELTA_GROUP_MEMBER:
   15150           0 :                         if (in->group_member == NULL) {
   15151           0 :                                 ret = Py_None;
   15152           0 :                                 Py_INCREF(ret);
   15153             :                         } else {
   15154           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_GROUP_MEMBER_Type, in->group_member, in->group_member);
   15155             :                         }
   15156           0 :                         return ret;
   15157             : 
   15158           0 :                 case NETR_DELTA_ALIAS:
   15159           0 :                         if (in->alias == NULL) {
   15160           0 :                                 ret = Py_None;
   15161           0 :                                 Py_INCREF(ret);
   15162             :                         } else {
   15163           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_ALIAS_Type, in->alias, in->alias);
   15164             :                         }
   15165           0 :                         return ret;
   15166             : 
   15167           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15168           0 :                         ret = Py_None;
   15169           0 :                         Py_INCREF(ret);
   15170           0 :                         return ret;
   15171             : 
   15172           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15173           0 :                         if (in->rename_alias == NULL) {
   15174           0 :                                 ret = Py_None;
   15175           0 :                                 Py_INCREF(ret);
   15176             :                         } else {
   15177           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_alias, in->rename_alias);
   15178             :                         }
   15179           0 :                         return ret;
   15180             : 
   15181           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15182           0 :                         if (in->alias_member == NULL) {
   15183           0 :                                 ret = Py_None;
   15184           0 :                                 Py_INCREF(ret);
   15185             :                         } else {
   15186           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_ALIAS_MEMBER_Type, in->alias_member, in->alias_member);
   15187             :                         }
   15188           0 :                         return ret;
   15189             : 
   15190           0 :                 case NETR_DELTA_POLICY:
   15191           0 :                         if (in->policy == NULL) {
   15192           0 :                                 ret = Py_None;
   15193           0 :                                 Py_INCREF(ret);
   15194             :                         } else {
   15195           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_POLICY_Type, in->policy, in->policy);
   15196             :                         }
   15197           0 :                         return ret;
   15198             : 
   15199           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   15200           0 :                         if (in->trusted_domain == NULL) {
   15201           0 :                                 ret = Py_None;
   15202           0 :                                 Py_INCREF(ret);
   15203             :                         } else {
   15204           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_TRUSTED_DOMAIN_Type, in->trusted_domain, in->trusted_domain);
   15205             :                         }
   15206           0 :                         return ret;
   15207             : 
   15208           0 :                 case NETR_DELTA_DELETE_TRUST:
   15209           0 :                         ret = Py_None;
   15210           0 :                         Py_INCREF(ret);
   15211           0 :                         return ret;
   15212             : 
   15213           0 :                 case NETR_DELTA_ACCOUNT:
   15214           0 :                         if (in->account == NULL) {
   15215           0 :                                 ret = Py_None;
   15216           0 :                                 Py_INCREF(ret);
   15217             :                         } else {
   15218           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_ACCOUNT_Type, in->account, in->account);
   15219             :                         }
   15220           0 :                         return ret;
   15221             : 
   15222           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   15223           0 :                         ret = Py_None;
   15224           0 :                         Py_INCREF(ret);
   15225           0 :                         return ret;
   15226             : 
   15227           0 :                 case NETR_DELTA_SECRET:
   15228           0 :                         if (in->secret == NULL) {
   15229           0 :                                 ret = Py_None;
   15230           0 :                                 Py_INCREF(ret);
   15231             :                         } else {
   15232           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_SECRET_Type, in->secret, in->secret);
   15233             :                         }
   15234           0 :                         return ret;
   15235             : 
   15236           0 :                 case NETR_DELTA_DELETE_SECRET:
   15237           0 :                         ret = Py_None;
   15238           0 :                         Py_INCREF(ret);
   15239           0 :                         return ret;
   15240             : 
   15241           0 :                 case NETR_DELTA_DELETE_GROUP2:
   15242           0 :                         if (in->delete_group == NULL) {
   15243           0 :                                 ret = Py_None;
   15244           0 :                                 Py_INCREF(ret);
   15245             :                         } else {
   15246           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_DELETE_USER_Type, in->delete_group, in->delete_group);
   15247             :                         }
   15248           0 :                         return ret;
   15249             : 
   15250           0 :                 case NETR_DELTA_DELETE_USER2:
   15251           0 :                         if (in->delete_user == NULL) {
   15252           0 :                                 ret = Py_None;
   15253           0 :                                 Py_INCREF(ret);
   15254             :                         } else {
   15255           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_DELETE_USER_Type, in->delete_user, in->delete_user);
   15256             :                         }
   15257           0 :                         return ret;
   15258             : 
   15259           0 :                 case NETR_DELTA_MODIFY_COUNT:
   15260           0 :                         if (in->modified_count == NULL) {
   15261           0 :                                 ret = Py_None;
   15262           0 :                                 Py_INCREF(ret);
   15263             :                         } else {
   15264           0 :                                 ret = PyLong_FromUnsignedLongLong(*in->modified_count);
   15265             :                         }
   15266           0 :                         return ret;
   15267             : 
   15268           0 :                 default:
   15269           0 :                         ret = Py_None;
   15270           0 :                         Py_INCREF(ret);
   15271           0 :                         return ret;
   15272             : 
   15273             :         }
   15274             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   15275             :         return NULL;
   15276             : }
   15277             : 
   15278           0 : static union netr_DELTA_UNION *py_export_netr_DELTA_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   15279             : {
   15280           0 :         union netr_DELTA_UNION *ret = talloc_zero(mem_ctx, union netr_DELTA_UNION);
   15281           0 :         switch (level) {
   15282           0 :                 case NETR_DELTA_DOMAIN:
   15283           0 :                         if (in == NULL) {
   15284           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   15285           0 :                                 talloc_free(ret); return NULL;
   15286             :                         }
   15287           0 :                         if (in == Py_None) {
   15288           0 :                                 ret->domain = NULL;
   15289             :                         } else {
   15290           0 :                                 ret->domain = NULL;
   15291           0 :                                 PY_CHECK_TYPE(&netr_DELTA_DOMAIN_Type, in, talloc_free(ret); return NULL;);
   15292           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15293           0 :                                         PyErr_NoMemory();
   15294           0 :                                         talloc_free(ret); return NULL;
   15295             :                                 }
   15296           0 :                                 ret->domain = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(in);
   15297             :                         }
   15298           0 :                         break;
   15299             : 
   15300           0 :                 case NETR_DELTA_GROUP:
   15301           0 :                         if (in == NULL) {
   15302           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->group");
   15303           0 :                                 talloc_free(ret); return NULL;
   15304             :                         }
   15305           0 :                         if (in == Py_None) {
   15306           0 :                                 ret->group = NULL;
   15307             :                         } else {
   15308           0 :                                 ret->group = NULL;
   15309           0 :                                 PY_CHECK_TYPE(&netr_DELTA_GROUP_Type, in, talloc_free(ret); return NULL;);
   15310           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15311           0 :                                         PyErr_NoMemory();
   15312           0 :                                         talloc_free(ret); return NULL;
   15313             :                                 }
   15314           0 :                                 ret->group = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(in);
   15315             :                         }
   15316           0 :                         break;
   15317             : 
   15318           0 :                 case NETR_DELTA_DELETE_GROUP:
   15319           0 :                         break;
   15320             : 
   15321           0 :                 case NETR_DELTA_RENAME_GROUP:
   15322           0 :                         if (in == NULL) {
   15323           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rename_group");
   15324           0 :                                 talloc_free(ret); return NULL;
   15325             :                         }
   15326           0 :                         if (in == Py_None) {
   15327           0 :                                 ret->rename_group = NULL;
   15328             :                         } else {
   15329           0 :                                 ret->rename_group = NULL;
   15330           0 :                                 PY_CHECK_TYPE(&netr_DELTA_RENAME_Type, in, talloc_free(ret); return NULL;);
   15331           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15332           0 :                                         PyErr_NoMemory();
   15333           0 :                                         talloc_free(ret); return NULL;
   15334             :                                 }
   15335           0 :                                 ret->rename_group = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
   15336             :                         }
   15337           0 :                         break;
   15338             : 
   15339           0 :                 case NETR_DELTA_USER:
   15340           0 :                         if (in == NULL) {
   15341           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->user");
   15342           0 :                                 talloc_free(ret); return NULL;
   15343             :                         }
   15344           0 :                         if (in == Py_None) {
   15345           0 :                                 ret->user = NULL;
   15346             :                         } else {
   15347           0 :                                 ret->user = NULL;
   15348           0 :                                 PY_CHECK_TYPE(&netr_DELTA_USER_Type, in, talloc_free(ret); return NULL;);
   15349           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15350           0 :                                         PyErr_NoMemory();
   15351           0 :                                         talloc_free(ret); return NULL;
   15352             :                                 }
   15353           0 :                                 ret->user = (struct netr_DELTA_USER *)pytalloc_get_ptr(in);
   15354             :                         }
   15355           0 :                         break;
   15356             : 
   15357           0 :                 case NETR_DELTA_DELETE_USER:
   15358           0 :                         break;
   15359             : 
   15360           0 :                 case NETR_DELTA_RENAME_USER:
   15361           0 :                         if (in == NULL) {
   15362           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rename_user");
   15363           0 :                                 talloc_free(ret); return NULL;
   15364             :                         }
   15365           0 :                         if (in == Py_None) {
   15366           0 :                                 ret->rename_user = NULL;
   15367             :                         } else {
   15368           0 :                                 ret->rename_user = NULL;
   15369           0 :                                 PY_CHECK_TYPE(&netr_DELTA_RENAME_Type, in, talloc_free(ret); return NULL;);
   15370           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15371           0 :                                         PyErr_NoMemory();
   15372           0 :                                         talloc_free(ret); return NULL;
   15373             :                                 }
   15374           0 :                                 ret->rename_user = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
   15375             :                         }
   15376           0 :                         break;
   15377             : 
   15378           0 :                 case NETR_DELTA_GROUP_MEMBER:
   15379           0 :                         if (in == NULL) {
   15380           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->group_member");
   15381           0 :                                 talloc_free(ret); return NULL;
   15382             :                         }
   15383           0 :                         if (in == Py_None) {
   15384           0 :                                 ret->group_member = NULL;
   15385             :                         } else {
   15386           0 :                                 ret->group_member = NULL;
   15387           0 :                                 PY_CHECK_TYPE(&netr_DELTA_GROUP_MEMBER_Type, in, talloc_free(ret); return NULL;);
   15388           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15389           0 :                                         PyErr_NoMemory();
   15390           0 :                                         talloc_free(ret); return NULL;
   15391             :                                 }
   15392           0 :                                 ret->group_member = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(in);
   15393             :                         }
   15394           0 :                         break;
   15395             : 
   15396           0 :                 case NETR_DELTA_ALIAS:
   15397           0 :                         if (in == NULL) {
   15398           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->alias");
   15399           0 :                                 talloc_free(ret); return NULL;
   15400             :                         }
   15401           0 :                         if (in == Py_None) {
   15402           0 :                                 ret->alias = NULL;
   15403             :                         } else {
   15404           0 :                                 ret->alias = NULL;
   15405           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ALIAS_Type, in, talloc_free(ret); return NULL;);
   15406           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15407           0 :                                         PyErr_NoMemory();
   15408           0 :                                         talloc_free(ret); return NULL;
   15409             :                                 }
   15410           0 :                                 ret->alias = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(in);
   15411             :                         }
   15412           0 :                         break;
   15413             : 
   15414           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15415           0 :                         break;
   15416             : 
   15417           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15418           0 :                         if (in == NULL) {
   15419           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rename_alias");
   15420           0 :                                 talloc_free(ret); return NULL;
   15421             :                         }
   15422           0 :                         if (in == Py_None) {
   15423           0 :                                 ret->rename_alias = NULL;
   15424             :                         } else {
   15425           0 :                                 ret->rename_alias = NULL;
   15426           0 :                                 PY_CHECK_TYPE(&netr_DELTA_RENAME_Type, in, talloc_free(ret); return NULL;);
   15427           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15428           0 :                                         PyErr_NoMemory();
   15429           0 :                                         talloc_free(ret); return NULL;
   15430             :                                 }
   15431           0 :                                 ret->rename_alias = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
   15432             :                         }
   15433           0 :                         break;
   15434             : 
   15435           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15436           0 :                         if (in == NULL) {
   15437           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->alias_member");
   15438           0 :                                 talloc_free(ret); return NULL;
   15439             :                         }
   15440           0 :                         if (in == Py_None) {
   15441           0 :                                 ret->alias_member = NULL;
   15442             :                         } else {
   15443           0 :                                 ret->alias_member = NULL;
   15444           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ALIAS_MEMBER_Type, in, talloc_free(ret); return NULL;);
   15445           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15446           0 :                                         PyErr_NoMemory();
   15447           0 :                                         talloc_free(ret); return NULL;
   15448             :                                 }
   15449           0 :                                 ret->alias_member = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(in);
   15450             :                         }
   15451           0 :                         break;
   15452             : 
   15453           0 :                 case NETR_DELTA_POLICY:
   15454           0 :                         if (in == NULL) {
   15455           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->policy");
   15456           0 :                                 talloc_free(ret); return NULL;
   15457             :                         }
   15458           0 :                         if (in == Py_None) {
   15459           0 :                                 ret->policy = NULL;
   15460             :                         } else {
   15461           0 :                                 ret->policy = NULL;
   15462           0 :                                 PY_CHECK_TYPE(&netr_DELTA_POLICY_Type, in, talloc_free(ret); return NULL;);
   15463           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15464           0 :                                         PyErr_NoMemory();
   15465           0 :                                         talloc_free(ret); return NULL;
   15466             :                                 }
   15467           0 :                                 ret->policy = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(in);
   15468             :                         }
   15469           0 :                         break;
   15470             : 
   15471           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   15472           0 :                         if (in == NULL) {
   15473           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->trusted_domain");
   15474           0 :                                 talloc_free(ret); return NULL;
   15475             :                         }
   15476           0 :                         if (in == Py_None) {
   15477           0 :                                 ret->trusted_domain = NULL;
   15478             :                         } else {
   15479           0 :                                 ret->trusted_domain = NULL;
   15480           0 :                                 PY_CHECK_TYPE(&netr_DELTA_TRUSTED_DOMAIN_Type, in, talloc_free(ret); return NULL;);
   15481           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15482           0 :                                         PyErr_NoMemory();
   15483           0 :                                         talloc_free(ret); return NULL;
   15484             :                                 }
   15485           0 :                                 ret->trusted_domain = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(in);
   15486             :                         }
   15487           0 :                         break;
   15488             : 
   15489           0 :                 case NETR_DELTA_DELETE_TRUST:
   15490           0 :                         break;
   15491             : 
   15492           0 :                 case NETR_DELTA_ACCOUNT:
   15493           0 :                         if (in == NULL) {
   15494           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->account");
   15495           0 :                                 talloc_free(ret); return NULL;
   15496             :                         }
   15497           0 :                         if (in == Py_None) {
   15498           0 :                                 ret->account = NULL;
   15499             :                         } else {
   15500           0 :                                 ret->account = NULL;
   15501           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ACCOUNT_Type, in, talloc_free(ret); return NULL;);
   15502           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15503           0 :                                         PyErr_NoMemory();
   15504           0 :                                         talloc_free(ret); return NULL;
   15505             :                                 }
   15506           0 :                                 ret->account = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(in);
   15507             :                         }
   15508           0 :                         break;
   15509             : 
   15510           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   15511           0 :                         break;
   15512             : 
   15513           0 :                 case NETR_DELTA_SECRET:
   15514           0 :                         if (in == NULL) {
   15515           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->secret");
   15516           0 :                                 talloc_free(ret); return NULL;
   15517             :                         }
   15518           0 :                         if (in == Py_None) {
   15519           0 :                                 ret->secret = NULL;
   15520             :                         } else {
   15521           0 :                                 ret->secret = NULL;
   15522           0 :                                 PY_CHECK_TYPE(&netr_DELTA_SECRET_Type, in, talloc_free(ret); return NULL;);
   15523           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15524           0 :                                         PyErr_NoMemory();
   15525           0 :                                         talloc_free(ret); return NULL;
   15526             :                                 }
   15527           0 :                                 ret->secret = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(in);
   15528             :                         }
   15529           0 :                         break;
   15530             : 
   15531           0 :                 case NETR_DELTA_DELETE_SECRET:
   15532           0 :                         break;
   15533             : 
   15534           0 :                 case NETR_DELTA_DELETE_GROUP2:
   15535           0 :                         if (in == NULL) {
   15536           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->delete_group");
   15537           0 :                                 talloc_free(ret); return NULL;
   15538             :                         }
   15539           0 :                         if (in == Py_None) {
   15540           0 :                                 ret->delete_group = NULL;
   15541             :                         } else {
   15542           0 :                                 ret->delete_group = NULL;
   15543           0 :                                 PY_CHECK_TYPE(&netr_DELTA_DELETE_USER_Type, in, talloc_free(ret); return NULL;);
   15544           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15545           0 :                                         PyErr_NoMemory();
   15546           0 :                                         talloc_free(ret); return NULL;
   15547             :                                 }
   15548           0 :                                 ret->delete_group = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(in);
   15549             :                         }
   15550           0 :                         break;
   15551             : 
   15552           0 :                 case NETR_DELTA_DELETE_USER2:
   15553           0 :                         if (in == NULL) {
   15554           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->delete_user");
   15555           0 :                                 talloc_free(ret); return NULL;
   15556             :                         }
   15557           0 :                         if (in == Py_None) {
   15558           0 :                                 ret->delete_user = NULL;
   15559             :                         } else {
   15560           0 :                                 ret->delete_user = NULL;
   15561           0 :                                 PY_CHECK_TYPE(&netr_DELTA_DELETE_USER_Type, in, talloc_free(ret); return NULL;);
   15562           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15563           0 :                                         PyErr_NoMemory();
   15564           0 :                                         talloc_free(ret); return NULL;
   15565             :                                 }
   15566           0 :                                 ret->delete_user = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(in);
   15567             :                         }
   15568           0 :                         break;
   15569             : 
   15570           0 :                 case NETR_DELTA_MODIFY_COUNT:
   15571           0 :                         if (in == NULL) {
   15572           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->modified_count");
   15573           0 :                                 talloc_free(ret); return NULL;
   15574             :                         }
   15575           0 :                         if (in == Py_None) {
   15576           0 :                                 ret->modified_count = NULL;
   15577             :                         } else {
   15578           0 :                                 ret->modified_count = talloc_ptrtype(mem_ctx, ret->modified_count);
   15579           0 :                                 if (ret->modified_count == NULL) {
   15580           0 :                                         PyErr_NoMemory();
   15581           0 :                                         talloc_free(ret); return NULL;
   15582             :                                 }
   15583             :                                 {
   15584           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*ret->modified_count));
   15585           0 :                                         if (PyLong_Check(in)) {
   15586           0 :                                                 unsigned long long test_var;
   15587           0 :                                                 test_var = PyLong_AsUnsignedLongLong(in);
   15588           0 :                                                 if (PyErr_Occurred() != NULL) {
   15589           0 :                                                         talloc_free(ret); return NULL;
   15590             :                                                 }
   15591           0 :                                                 if (test_var > uint_max) {
   15592           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15593             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   15594           0 :                                                         talloc_free(ret); return NULL;
   15595             :                                                 }
   15596           0 :                                                 *ret->modified_count = test_var;
   15597             :                                         } else {
   15598           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   15599             :                                                   PyLong_Type.tp_name);
   15600           0 :                                                 talloc_free(ret); return NULL;
   15601             :                                         }
   15602             :                                 }
   15603             :                         }
   15604           0 :                         break;
   15605             : 
   15606           0 :                 default:
   15607           0 :                         break;
   15608             : 
   15609             :         }
   15610             : 
   15611           0 :         return ret;
   15612             : }
   15613             : 
   15614           0 : static PyObject *py_netr_DELTA_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15615             : {
   15616           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   15617           0 :         PyObject *mem_ctx_obj = NULL;
   15618           0 :         TALLOC_CTX *mem_ctx = NULL;
   15619           0 :         int level = 0;
   15620           0 :         PyObject *in_obj = NULL;
   15621           0 :         union netr_DELTA_UNION *in = NULL;
   15622             : 
   15623           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   15624             :                 discard_const_p(char *, kwnames),
   15625             :                 &mem_ctx_obj,
   15626             :                 &level,
   15627             :                 &in_obj)) {
   15628           0 :                 return NULL;
   15629             :         }
   15630           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   15631           0 :         if (mem_ctx == NULL) {
   15632           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   15633           0 :                 return NULL;
   15634             :         }
   15635           0 :         in = (union netr_DELTA_UNION *)pytalloc_get_ptr(in_obj);
   15636           0 :         if (in == NULL) {
   15637           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DELTA_UNION!");
   15638           0 :                 return NULL;
   15639             :         }
   15640             : 
   15641           0 :         return py_import_netr_DELTA_UNION(mem_ctx, level, in);
   15642             : }
   15643             : 
   15644           0 : static PyObject *py_netr_DELTA_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15645             : {
   15646           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   15647           0 :         PyObject *mem_ctx_obj = NULL;
   15648           0 :         TALLOC_CTX *mem_ctx = NULL;
   15649           0 :         int level = 0;
   15650           0 :         PyObject *in = NULL;
   15651           0 :         union netr_DELTA_UNION *out = NULL;
   15652             : 
   15653           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   15654             :                 discard_const_p(char *, kwnames),
   15655             :                 &mem_ctx_obj,
   15656             :                 &level,
   15657             :                 &in)) {
   15658           0 :                 return NULL;
   15659             :         }
   15660           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   15661           0 :         if (mem_ctx == NULL) {
   15662           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   15663           0 :                 return NULL;
   15664             :         }
   15665             : 
   15666           0 :         out = py_export_netr_DELTA_UNION(mem_ctx, level, in);
   15667           0 :         if (out == NULL) {
   15668           0 :                 return NULL;
   15669             :         }
   15670             : 
   15671           0 :         return pytalloc_GenericObject_reference(out);
   15672             : }
   15673             : 
   15674             : static PyMethodDef py_netr_DELTA_UNION_methods[] = {
   15675             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_UNION_import),
   15676             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   15677             :                 "T.__import__(mem_ctx, level, in) => ret." },
   15678             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_UNION_export),
   15679             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   15680             :                 "T.__export__(mem_ctx, level, in) => ret." },
   15681             :         { NULL, NULL, 0, NULL }
   15682             : };
   15683             : 
   15684           0 : static PyObject *py_netr_DELTA_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15685             : {
   15686           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   15687           0 :         return NULL;
   15688             : }
   15689             : 
   15690             : 
   15691             : static PyTypeObject netr_DELTA_UNION_Type = {
   15692             :         PyVarObject_HEAD_INIT(NULL, 0)
   15693             :         .tp_name = "netlogon.netr_DELTA_UNION",
   15694             :         .tp_getset = NULL,
   15695             :         .tp_methods = py_netr_DELTA_UNION_methods,
   15696             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15697             :         .tp_new = py_netr_DELTA_UNION_new,
   15698             : };
   15699             : 
   15700           0 : static PyObject *py_import_netr_DELTA_ID_UNION(TALLOC_CTX *mem_ctx, int level, union netr_DELTA_ID_UNION *in)
   15701             : {
   15702           0 :         PyObject *ret;
   15703             : 
   15704           0 :         switch (level) {
   15705           0 :                 case NETR_DELTA_DOMAIN:
   15706           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15707           0 :                         return ret;
   15708             : 
   15709           0 :                 case NETR_DELTA_GROUP:
   15710           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15711           0 :                         return ret;
   15712             : 
   15713           0 :                 case NETR_DELTA_DELETE_GROUP:
   15714           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15715           0 :                         return ret;
   15716             : 
   15717           0 :                 case NETR_DELTA_RENAME_GROUP:
   15718           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15719           0 :                         return ret;
   15720             : 
   15721           0 :                 case NETR_DELTA_USER:
   15722           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15723           0 :                         return ret;
   15724             : 
   15725           0 :                 case NETR_DELTA_DELETE_USER:
   15726           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15727           0 :                         return ret;
   15728             : 
   15729           0 :                 case NETR_DELTA_RENAME_USER:
   15730           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15731           0 :                         return ret;
   15732             : 
   15733           0 :                 case NETR_DELTA_GROUP_MEMBER:
   15734           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15735           0 :                         return ret;
   15736             : 
   15737           0 :                 case NETR_DELTA_ALIAS:
   15738           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15739           0 :                         return ret;
   15740             : 
   15741           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15742           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15743           0 :                         return ret;
   15744             : 
   15745           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15746           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15747           0 :                         return ret;
   15748             : 
   15749           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15750           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15751           0 :                         return ret;
   15752             : 
   15753           0 :                 case NETR_DELTA_POLICY:
   15754           0 :                         if (in->sid == NULL) {
   15755           0 :                                 ret = Py_None;
   15756           0 :                                 Py_INCREF(ret);
   15757             :                         } else {
   15758           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15759             :                         }
   15760           0 :                         return ret;
   15761             : 
   15762           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   15763           0 :                         if (in->sid == NULL) {
   15764           0 :                                 ret = Py_None;
   15765           0 :                                 Py_INCREF(ret);
   15766             :                         } else {
   15767           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15768             :                         }
   15769           0 :                         return ret;
   15770             : 
   15771           0 :                 case NETR_DELTA_DELETE_TRUST:
   15772           0 :                         if (in->sid == NULL) {
   15773           0 :                                 ret = Py_None;
   15774           0 :                                 Py_INCREF(ret);
   15775             :                         } else {
   15776           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15777             :                         }
   15778           0 :                         return ret;
   15779             : 
   15780           0 :                 case NETR_DELTA_ACCOUNT:
   15781           0 :                         if (in->sid == NULL) {
   15782           0 :                                 ret = Py_None;
   15783           0 :                                 Py_INCREF(ret);
   15784             :                         } else {
   15785           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15786             :                         }
   15787           0 :                         return ret;
   15788             : 
   15789           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   15790           0 :                         if (in->sid == NULL) {
   15791           0 :                                 ret = Py_None;
   15792           0 :                                 Py_INCREF(ret);
   15793             :                         } else {
   15794           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15795             :                         }
   15796           0 :                         return ret;
   15797             : 
   15798           0 :                 case NETR_DELTA_SECRET:
   15799           0 :                         if (in->name == NULL) {
   15800           0 :                                 ret = Py_None;
   15801           0 :                                 Py_INCREF(ret);
   15802             :                         } else {
   15803           0 :                                 if (in->name == NULL) {
   15804           0 :                                         ret = Py_None;
   15805           0 :                                         Py_INCREF(ret);
   15806             :                                 } else {
   15807           0 :                                         ret = PyUnicode_Decode(in->name, strlen(in->name), "utf-8", "ignore");
   15808             :                                 }
   15809             :                         }
   15810           0 :                         return ret;
   15811             : 
   15812           0 :                 case NETR_DELTA_DELETE_SECRET:
   15813           0 :                         if (in->name == NULL) {
   15814           0 :                                 ret = Py_None;
   15815           0 :                                 Py_INCREF(ret);
   15816             :                         } else {
   15817           0 :                                 if (in->name == NULL) {
   15818           0 :                                         ret = Py_None;
   15819           0 :                                         Py_INCREF(ret);
   15820             :                                 } else {
   15821           0 :                                         ret = PyUnicode_Decode(in->name, strlen(in->name), "utf-8", "ignore");
   15822             :                                 }
   15823             :                         }
   15824           0 :                         return ret;
   15825             : 
   15826           0 :                 case NETR_DELTA_DELETE_GROUP2:
   15827           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15828           0 :                         return ret;
   15829             : 
   15830           0 :                 case NETR_DELTA_DELETE_USER2:
   15831           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15832           0 :                         return ret;
   15833             : 
   15834           0 :                 case NETR_DELTA_MODIFY_COUNT:
   15835           0 :                         ret = Py_None;
   15836           0 :                         Py_INCREF(ret);
   15837           0 :                         return ret;
   15838             : 
   15839           0 :                 default:
   15840           0 :                         ret = Py_None;
   15841           0 :                         Py_INCREF(ret);
   15842           0 :                         return ret;
   15843             : 
   15844             :         }
   15845             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   15846             :         return NULL;
   15847             : }
   15848             : 
   15849           0 : static union netr_DELTA_ID_UNION *py_export_netr_DELTA_ID_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   15850             : {
   15851           0 :         union netr_DELTA_ID_UNION *ret = talloc_zero(mem_ctx, union netr_DELTA_ID_UNION);
   15852           0 :         switch (level) {
   15853           0 :                 case NETR_DELTA_DOMAIN:
   15854           0 :                         if (in == NULL) {
   15855           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15856           0 :                                 talloc_free(ret); return NULL;
   15857             :                         }
   15858             :                         {
   15859           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15860           0 :                                 if (PyLong_Check(in)) {
   15861           0 :                                         unsigned long long test_var;
   15862           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15863           0 :                                         if (PyErr_Occurred() != NULL) {
   15864           0 :                                                 talloc_free(ret); return NULL;
   15865             :                                         }
   15866           0 :                                         if (test_var > uint_max) {
   15867           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15868             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15869           0 :                                                 talloc_free(ret); return NULL;
   15870             :                                         }
   15871           0 :                                         ret->rid = test_var;
   15872             :                                 } else {
   15873           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15874             :                                           PyLong_Type.tp_name);
   15875           0 :                                         talloc_free(ret); return NULL;
   15876             :                                 }
   15877             :                         }
   15878           0 :                         break;
   15879             : 
   15880           0 :                 case NETR_DELTA_GROUP:
   15881           0 :                         if (in == NULL) {
   15882           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15883           0 :                                 talloc_free(ret); return NULL;
   15884             :                         }
   15885             :                         {
   15886           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15887           0 :                                 if (PyLong_Check(in)) {
   15888           0 :                                         unsigned long long test_var;
   15889           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15890           0 :                                         if (PyErr_Occurred() != NULL) {
   15891           0 :                                                 talloc_free(ret); return NULL;
   15892             :                                         }
   15893           0 :                                         if (test_var > uint_max) {
   15894           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15895             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15896           0 :                                                 talloc_free(ret); return NULL;
   15897             :                                         }
   15898           0 :                                         ret->rid = test_var;
   15899             :                                 } else {
   15900           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15901             :                                           PyLong_Type.tp_name);
   15902           0 :                                         talloc_free(ret); return NULL;
   15903             :                                 }
   15904             :                         }
   15905           0 :                         break;
   15906             : 
   15907           0 :                 case NETR_DELTA_DELETE_GROUP:
   15908           0 :                         if (in == NULL) {
   15909           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15910           0 :                                 talloc_free(ret); return NULL;
   15911             :                         }
   15912             :                         {
   15913           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15914           0 :                                 if (PyLong_Check(in)) {
   15915           0 :                                         unsigned long long test_var;
   15916           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15917           0 :                                         if (PyErr_Occurred() != NULL) {
   15918           0 :                                                 talloc_free(ret); return NULL;
   15919             :                                         }
   15920           0 :                                         if (test_var > uint_max) {
   15921           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15922             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15923           0 :                                                 talloc_free(ret); return NULL;
   15924             :                                         }
   15925           0 :                                         ret->rid = test_var;
   15926             :                                 } else {
   15927           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15928             :                                           PyLong_Type.tp_name);
   15929           0 :                                         talloc_free(ret); return NULL;
   15930             :                                 }
   15931             :                         }
   15932           0 :                         break;
   15933             : 
   15934           0 :                 case NETR_DELTA_RENAME_GROUP:
   15935           0 :                         if (in == NULL) {
   15936           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15937           0 :                                 talloc_free(ret); return NULL;
   15938             :                         }
   15939             :                         {
   15940           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15941           0 :                                 if (PyLong_Check(in)) {
   15942           0 :                                         unsigned long long test_var;
   15943           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15944           0 :                                         if (PyErr_Occurred() != NULL) {
   15945           0 :                                                 talloc_free(ret); return NULL;
   15946             :                                         }
   15947           0 :                                         if (test_var > uint_max) {
   15948           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15949             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15950           0 :                                                 talloc_free(ret); return NULL;
   15951             :                                         }
   15952           0 :                                         ret->rid = test_var;
   15953             :                                 } else {
   15954           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15955             :                                           PyLong_Type.tp_name);
   15956           0 :                                         talloc_free(ret); return NULL;
   15957             :                                 }
   15958             :                         }
   15959           0 :                         break;
   15960             : 
   15961           0 :                 case NETR_DELTA_USER:
   15962           0 :                         if (in == NULL) {
   15963           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15964           0 :                                 talloc_free(ret); return NULL;
   15965             :                         }
   15966             :                         {
   15967           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15968           0 :                                 if (PyLong_Check(in)) {
   15969           0 :                                         unsigned long long test_var;
   15970           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15971           0 :                                         if (PyErr_Occurred() != NULL) {
   15972           0 :                                                 talloc_free(ret); return NULL;
   15973             :                                         }
   15974           0 :                                         if (test_var > uint_max) {
   15975           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15976             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15977           0 :                                                 talloc_free(ret); return NULL;
   15978             :                                         }
   15979           0 :                                         ret->rid = test_var;
   15980             :                                 } else {
   15981           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15982             :                                           PyLong_Type.tp_name);
   15983           0 :                                         talloc_free(ret); return NULL;
   15984             :                                 }
   15985             :                         }
   15986           0 :                         break;
   15987             : 
   15988           0 :                 case NETR_DELTA_DELETE_USER:
   15989           0 :                         if (in == NULL) {
   15990           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15991           0 :                                 talloc_free(ret); return NULL;
   15992             :                         }
   15993             :                         {
   15994           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15995           0 :                                 if (PyLong_Check(in)) {
   15996           0 :                                         unsigned long long test_var;
   15997           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15998           0 :                                         if (PyErr_Occurred() != NULL) {
   15999           0 :                                                 talloc_free(ret); return NULL;
   16000             :                                         }
   16001           0 :                                         if (test_var > uint_max) {
   16002           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16003             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16004           0 :                                                 talloc_free(ret); return NULL;
   16005             :                                         }
   16006           0 :                                         ret->rid = test_var;
   16007             :                                 } else {
   16008           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16009             :                                           PyLong_Type.tp_name);
   16010           0 :                                         talloc_free(ret); return NULL;
   16011             :                                 }
   16012             :                         }
   16013           0 :                         break;
   16014             : 
   16015           0 :                 case NETR_DELTA_RENAME_USER:
   16016           0 :                         if (in == NULL) {
   16017           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16018           0 :                                 talloc_free(ret); return NULL;
   16019             :                         }
   16020             :                         {
   16021           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16022           0 :                                 if (PyLong_Check(in)) {
   16023           0 :                                         unsigned long long test_var;
   16024           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16025           0 :                                         if (PyErr_Occurred() != NULL) {
   16026           0 :                                                 talloc_free(ret); return NULL;
   16027             :                                         }
   16028           0 :                                         if (test_var > uint_max) {
   16029           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16030             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16031           0 :                                                 talloc_free(ret); return NULL;
   16032             :                                         }
   16033           0 :                                         ret->rid = test_var;
   16034             :                                 } else {
   16035           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16036             :                                           PyLong_Type.tp_name);
   16037           0 :                                         talloc_free(ret); return NULL;
   16038             :                                 }
   16039             :                         }
   16040           0 :                         break;
   16041             : 
   16042           0 :                 case NETR_DELTA_GROUP_MEMBER:
   16043           0 :                         if (in == NULL) {
   16044           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16045           0 :                                 talloc_free(ret); return NULL;
   16046             :                         }
   16047             :                         {
   16048           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16049           0 :                                 if (PyLong_Check(in)) {
   16050           0 :                                         unsigned long long test_var;
   16051           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16052           0 :                                         if (PyErr_Occurred() != NULL) {
   16053           0 :                                                 talloc_free(ret); return NULL;
   16054             :                                         }
   16055           0 :                                         if (test_var > uint_max) {
   16056           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16057             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16058           0 :                                                 talloc_free(ret); return NULL;
   16059             :                                         }
   16060           0 :                                         ret->rid = test_var;
   16061             :                                 } else {
   16062           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16063             :                                           PyLong_Type.tp_name);
   16064           0 :                                         talloc_free(ret); return NULL;
   16065             :                                 }
   16066             :                         }
   16067           0 :                         break;
   16068             : 
   16069           0 :                 case NETR_DELTA_ALIAS:
   16070           0 :                         if (in == NULL) {
   16071           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16072           0 :                                 talloc_free(ret); return NULL;
   16073             :                         }
   16074             :                         {
   16075           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16076           0 :                                 if (PyLong_Check(in)) {
   16077           0 :                                         unsigned long long test_var;
   16078           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16079           0 :                                         if (PyErr_Occurred() != NULL) {
   16080           0 :                                                 talloc_free(ret); return NULL;
   16081             :                                         }
   16082           0 :                                         if (test_var > uint_max) {
   16083           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16084             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16085           0 :                                                 talloc_free(ret); return NULL;
   16086             :                                         }
   16087           0 :                                         ret->rid = test_var;
   16088             :                                 } else {
   16089           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16090             :                                           PyLong_Type.tp_name);
   16091           0 :                                         talloc_free(ret); return NULL;
   16092             :                                 }
   16093             :                         }
   16094           0 :                         break;
   16095             : 
   16096           0 :                 case NETR_DELTA_DELETE_ALIAS:
   16097           0 :                         if (in == NULL) {
   16098           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16099           0 :                                 talloc_free(ret); return NULL;
   16100             :                         }
   16101             :                         {
   16102           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16103           0 :                                 if (PyLong_Check(in)) {
   16104           0 :                                         unsigned long long test_var;
   16105           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16106           0 :                                         if (PyErr_Occurred() != NULL) {
   16107           0 :                                                 talloc_free(ret); return NULL;
   16108             :                                         }
   16109           0 :                                         if (test_var > uint_max) {
   16110           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16111             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16112           0 :                                                 talloc_free(ret); return NULL;
   16113             :                                         }
   16114           0 :                                         ret->rid = test_var;
   16115             :                                 } else {
   16116           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16117             :                                           PyLong_Type.tp_name);
   16118           0 :                                         talloc_free(ret); return NULL;
   16119             :                                 }
   16120             :                         }
   16121           0 :                         break;
   16122             : 
   16123           0 :                 case NETR_DELTA_RENAME_ALIAS:
   16124           0 :                         if (in == NULL) {
   16125           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16126           0 :                                 talloc_free(ret); return NULL;
   16127             :                         }
   16128             :                         {
   16129           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16130           0 :                                 if (PyLong_Check(in)) {
   16131           0 :                                         unsigned long long test_var;
   16132           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16133           0 :                                         if (PyErr_Occurred() != NULL) {
   16134           0 :                                                 talloc_free(ret); return NULL;
   16135             :                                         }
   16136           0 :                                         if (test_var > uint_max) {
   16137           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16138             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16139           0 :                                                 talloc_free(ret); return NULL;
   16140             :                                         }
   16141           0 :                                         ret->rid = test_var;
   16142             :                                 } else {
   16143           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16144             :                                           PyLong_Type.tp_name);
   16145           0 :                                         talloc_free(ret); return NULL;
   16146             :                                 }
   16147             :                         }
   16148           0 :                         break;
   16149             : 
   16150           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   16151           0 :                         if (in == NULL) {
   16152           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16153           0 :                                 talloc_free(ret); return NULL;
   16154             :                         }
   16155             :                         {
   16156           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16157           0 :                                 if (PyLong_Check(in)) {
   16158           0 :                                         unsigned long long test_var;
   16159           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16160           0 :                                         if (PyErr_Occurred() != NULL) {
   16161           0 :                                                 talloc_free(ret); return NULL;
   16162             :                                         }
   16163           0 :                                         if (test_var > uint_max) {
   16164           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16165             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16166           0 :                                                 talloc_free(ret); return NULL;
   16167             :                                         }
   16168           0 :                                         ret->rid = test_var;
   16169             :                                 } else {
   16170           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16171             :                                           PyLong_Type.tp_name);
   16172           0 :                                         talloc_free(ret); return NULL;
   16173             :                                 }
   16174             :                         }
   16175           0 :                         break;
   16176             : 
   16177           0 :                 case NETR_DELTA_POLICY:
   16178           0 :                         if (in == NULL) {
   16179           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16180           0 :                                 talloc_free(ret); return NULL;
   16181             :                         }
   16182           0 :                         if (in == Py_None) {
   16183           0 :                                 ret->sid = NULL;
   16184             :                         } else {
   16185           0 :                                 ret->sid = NULL;
   16186           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16187           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16188           0 :                                         PyErr_NoMemory();
   16189           0 :                                         talloc_free(ret); return NULL;
   16190             :                                 }
   16191           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16192             :                         }
   16193           0 :                         break;
   16194             : 
   16195           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   16196           0 :                         if (in == NULL) {
   16197           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16198           0 :                                 talloc_free(ret); return NULL;
   16199             :                         }
   16200           0 :                         if (in == Py_None) {
   16201           0 :                                 ret->sid = NULL;
   16202             :                         } else {
   16203           0 :                                 ret->sid = NULL;
   16204           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16205           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16206           0 :                                         PyErr_NoMemory();
   16207           0 :                                         talloc_free(ret); return NULL;
   16208             :                                 }
   16209           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16210             :                         }
   16211           0 :                         break;
   16212             : 
   16213           0 :                 case NETR_DELTA_DELETE_TRUST:
   16214           0 :                         if (in == NULL) {
   16215           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16216           0 :                                 talloc_free(ret); return NULL;
   16217             :                         }
   16218           0 :                         if (in == Py_None) {
   16219           0 :                                 ret->sid = NULL;
   16220             :                         } else {
   16221           0 :                                 ret->sid = NULL;
   16222           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16223           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16224           0 :                                         PyErr_NoMemory();
   16225           0 :                                         talloc_free(ret); return NULL;
   16226             :                                 }
   16227           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16228             :                         }
   16229           0 :                         break;
   16230             : 
   16231           0 :                 case NETR_DELTA_ACCOUNT:
   16232           0 :                         if (in == NULL) {
   16233           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16234           0 :                                 talloc_free(ret); return NULL;
   16235             :                         }
   16236           0 :                         if (in == Py_None) {
   16237           0 :                                 ret->sid = NULL;
   16238             :                         } else {
   16239           0 :                                 ret->sid = NULL;
   16240           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16241           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16242           0 :                                         PyErr_NoMemory();
   16243           0 :                                         talloc_free(ret); return NULL;
   16244             :                                 }
   16245           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16246             :                         }
   16247           0 :                         break;
   16248             : 
   16249           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   16250           0 :                         if (in == NULL) {
   16251           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16252           0 :                                 talloc_free(ret); return NULL;
   16253             :                         }
   16254           0 :                         if (in == Py_None) {
   16255           0 :                                 ret->sid = NULL;
   16256             :                         } else {
   16257           0 :                                 ret->sid = NULL;
   16258           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16259           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16260           0 :                                         PyErr_NoMemory();
   16261           0 :                                         talloc_free(ret); return NULL;
   16262             :                                 }
   16263           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16264             :                         }
   16265           0 :                         break;
   16266             : 
   16267           0 :                 case NETR_DELTA_SECRET:
   16268           0 :                         if (in == NULL) {
   16269           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
   16270           0 :                                 talloc_free(ret); return NULL;
   16271             :                         }
   16272           0 :                         if (in == Py_None) {
   16273           0 :                                 ret->name = NULL;
   16274             :                         } else {
   16275           0 :                                 ret->name = NULL;
   16276             :                                 {
   16277           0 :                                         const char *test_str;
   16278           0 :                                         const char *talloc_str;
   16279           0 :                                         PyObject *unicode = NULL;
   16280           0 :                                         if (PyUnicode_Check(in)) {
   16281           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   16282           0 :                                                 if (unicode == NULL) {
   16283           0 :                                                         PyErr_NoMemory();
   16284           0 :                                                         talloc_free(ret); return NULL;
   16285             :                                                 }
   16286           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   16287           0 :                                         } else if (PyBytes_Check(in)) {
   16288           0 :                                                 test_str = PyBytes_AS_STRING(in);
   16289             :                                         } else {
   16290           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   16291           0 :                                                 talloc_free(ret); return NULL;
   16292             :                                         }
   16293           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   16294           0 :                                         if (unicode != NULL) {
   16295           0 :                                                 Py_DECREF(unicode);
   16296             :                                         }
   16297           0 :                                         if (talloc_str == NULL) {
   16298           0 :                                                 PyErr_NoMemory();
   16299           0 :                                                 talloc_free(ret); return NULL;
   16300             :                                         }
   16301           0 :                                         ret->name = talloc_str;
   16302             :                                 }
   16303             :                         }
   16304           0 :                         break;
   16305             : 
   16306           0 :                 case NETR_DELTA_DELETE_SECRET:
   16307           0 :                         if (in == NULL) {
   16308           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
   16309           0 :                                 talloc_free(ret); return NULL;
   16310             :                         }
   16311           0 :                         if (in == Py_None) {
   16312           0 :                                 ret->name = NULL;
   16313             :                         } else {
   16314           0 :                                 ret->name = NULL;
   16315             :                                 {
   16316           0 :                                         const char *test_str;
   16317           0 :                                         const char *talloc_str;
   16318           0 :                                         PyObject *unicode = NULL;
   16319           0 :                                         if (PyUnicode_Check(in)) {
   16320           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   16321           0 :                                                 if (unicode == NULL) {
   16322           0 :                                                         PyErr_NoMemory();
   16323           0 :                                                         talloc_free(ret); return NULL;
   16324             :                                                 }
   16325           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   16326           0 :                                         } else if (PyBytes_Check(in)) {
   16327           0 :                                                 test_str = PyBytes_AS_STRING(in);
   16328             :                                         } else {
   16329           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   16330           0 :                                                 talloc_free(ret); return NULL;
   16331             :                                         }
   16332           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   16333           0 :                                         if (unicode != NULL) {
   16334           0 :                                                 Py_DECREF(unicode);
   16335             :                                         }
   16336           0 :                                         if (talloc_str == NULL) {
   16337           0 :                                                 PyErr_NoMemory();
   16338           0 :                                                 talloc_free(ret); return NULL;
   16339             :                                         }
   16340           0 :                                         ret->name = talloc_str;
   16341             :                                 }
   16342             :                         }
   16343           0 :                         break;
   16344             : 
   16345           0 :                 case NETR_DELTA_DELETE_GROUP2:
   16346           0 :                         if (in == NULL) {
   16347           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16348           0 :                                 talloc_free(ret); return NULL;
   16349             :                         }
   16350             :                         {
   16351           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16352           0 :                                 if (PyLong_Check(in)) {
   16353           0 :                                         unsigned long long test_var;
   16354           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16355           0 :                                         if (PyErr_Occurred() != NULL) {
   16356           0 :                                                 talloc_free(ret); return NULL;
   16357             :                                         }
   16358           0 :                                         if (test_var > uint_max) {
   16359           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16360             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16361           0 :                                                 talloc_free(ret); return NULL;
   16362             :                                         }
   16363           0 :                                         ret->rid = test_var;
   16364             :                                 } else {
   16365           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16366             :                                           PyLong_Type.tp_name);
   16367           0 :                                         talloc_free(ret); return NULL;
   16368             :                                 }
   16369             :                         }
   16370           0 :                         break;
   16371             : 
   16372           0 :                 case NETR_DELTA_DELETE_USER2:
   16373           0 :                         if (in == NULL) {
   16374           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16375           0 :                                 talloc_free(ret); return NULL;
   16376             :                         }
   16377             :                         {
   16378           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16379           0 :                                 if (PyLong_Check(in)) {
   16380           0 :                                         unsigned long long test_var;
   16381           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16382           0 :                                         if (PyErr_Occurred() != NULL) {
   16383           0 :                                                 talloc_free(ret); return NULL;
   16384             :                                         }
   16385           0 :                                         if (test_var > uint_max) {
   16386           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16387             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16388           0 :                                                 talloc_free(ret); return NULL;
   16389             :                                         }
   16390           0 :                                         ret->rid = test_var;
   16391             :                                 } else {
   16392           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16393             :                                           PyLong_Type.tp_name);
   16394           0 :                                         talloc_free(ret); return NULL;
   16395             :                                 }
   16396             :                         }
   16397           0 :                         break;
   16398             : 
   16399           0 :                 case NETR_DELTA_MODIFY_COUNT:
   16400           0 :                         break;
   16401             : 
   16402           0 :                 default:
   16403           0 :                         break;
   16404             : 
   16405             :         }
   16406             : 
   16407           0 :         return ret;
   16408             : }
   16409             : 
   16410           0 : static PyObject *py_netr_DELTA_ID_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16411             : {
   16412           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16413           0 :         PyObject *mem_ctx_obj = NULL;
   16414           0 :         TALLOC_CTX *mem_ctx = NULL;
   16415           0 :         int level = 0;
   16416           0 :         PyObject *in_obj = NULL;
   16417           0 :         union netr_DELTA_ID_UNION *in = NULL;
   16418             : 
   16419           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   16420             :                 discard_const_p(char *, kwnames),
   16421             :                 &mem_ctx_obj,
   16422             :                 &level,
   16423             :                 &in_obj)) {
   16424           0 :                 return NULL;
   16425             :         }
   16426           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16427           0 :         if (mem_ctx == NULL) {
   16428           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16429           0 :                 return NULL;
   16430             :         }
   16431           0 :         in = (union netr_DELTA_ID_UNION *)pytalloc_get_ptr(in_obj);
   16432           0 :         if (in == NULL) {
   16433           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DELTA_ID_UNION!");
   16434           0 :                 return NULL;
   16435             :         }
   16436             : 
   16437           0 :         return py_import_netr_DELTA_ID_UNION(mem_ctx, level, in);
   16438             : }
   16439             : 
   16440           0 : static PyObject *py_netr_DELTA_ID_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16441             : {
   16442           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16443           0 :         PyObject *mem_ctx_obj = NULL;
   16444           0 :         TALLOC_CTX *mem_ctx = NULL;
   16445           0 :         int level = 0;
   16446           0 :         PyObject *in = NULL;
   16447           0 :         union netr_DELTA_ID_UNION *out = NULL;
   16448             : 
   16449           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   16450             :                 discard_const_p(char *, kwnames),
   16451             :                 &mem_ctx_obj,
   16452             :                 &level,
   16453             :                 &in)) {
   16454           0 :                 return NULL;
   16455             :         }
   16456           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16457           0 :         if (mem_ctx == NULL) {
   16458           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16459           0 :                 return NULL;
   16460             :         }
   16461             : 
   16462           0 :         out = py_export_netr_DELTA_ID_UNION(mem_ctx, level, in);
   16463           0 :         if (out == NULL) {
   16464           0 :                 return NULL;
   16465             :         }
   16466             : 
   16467           0 :         return pytalloc_GenericObject_reference(out);
   16468             : }
   16469             : 
   16470             : static PyMethodDef py_netr_DELTA_ID_UNION_methods[] = {
   16471             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_ID_UNION_import),
   16472             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16473             :                 "T.__import__(mem_ctx, level, in) => ret." },
   16474             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_ID_UNION_export),
   16475             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16476             :                 "T.__export__(mem_ctx, level, in) => ret." },
   16477             :         { NULL, NULL, 0, NULL }
   16478             : };
   16479             : 
   16480           0 : static PyObject *py_netr_DELTA_ID_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16481             : {
   16482           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   16483           0 :         return NULL;
   16484             : }
   16485             : 
   16486             : 
   16487             : static PyTypeObject netr_DELTA_ID_UNION_Type = {
   16488             :         PyVarObject_HEAD_INIT(NULL, 0)
   16489             :         .tp_name = "netlogon.netr_DELTA_ID_UNION",
   16490             :         .tp_getset = NULL,
   16491             :         .tp_methods = py_netr_DELTA_ID_UNION_methods,
   16492             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16493             :         .tp_new = py_netr_DELTA_ID_UNION_new,
   16494             : };
   16495             : 
   16496             : 
   16497           0 : static PyObject *py_netr_DELTA_ENUM_get_delta_type(PyObject *obj, void *closure)
   16498             : {
   16499           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(obj);
   16500           0 :         PyObject *py_delta_type;
   16501           0 :         py_delta_type = PyLong_FromLong((uint16_t)object->delta_type);
   16502           0 :         return py_delta_type;
   16503             : }
   16504             : 
   16505           0 : static int py_netr_DELTA_ENUM_set_delta_type(PyObject *py_obj, PyObject *value, void *closure)
   16506             : {
   16507           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(py_obj);
   16508           0 :         if (value == NULL) {
   16509           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_type");
   16510           0 :                 return -1;
   16511             :         }
   16512             :         {
   16513           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->delta_type));
   16514           0 :                 if (PyLong_Check(value)) {
   16515           0 :                         unsigned long long test_var;
   16516           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16517           0 :                         if (PyErr_Occurred() != NULL) {
   16518           0 :                                 return -1;
   16519             :                         }
   16520           0 :                         if (test_var > uint_max) {
   16521           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16522             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16523           0 :                                 return -1;
   16524             :                         }
   16525           0 :                         object->delta_type = test_var;
   16526             :                 } else {
   16527           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16528             :                           PyLong_Type.tp_name);
   16529           0 :                         return -1;
   16530             :                 }
   16531             :         }
   16532           0 :         return 0;
   16533             : }
   16534             : 
   16535           0 : static PyObject *py_netr_DELTA_ENUM_get_delta_id_union(PyObject *obj, void *closure)
   16536             : {
   16537           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(obj);
   16538           0 :         PyObject *py_delta_id_union;
   16539           0 :         py_delta_id_union = pyrpc_import_union(&netr_DELTA_ID_UNION_Type, pytalloc_get_mem_ctx(obj), object->delta_type, &object->delta_id_union, "union netr_DELTA_ID_UNION");
   16540           0 :         if (py_delta_id_union == NULL) {
   16541           0 :                 return NULL;
   16542             :         }
   16543           0 :         return py_delta_id_union;
   16544             : }
   16545             : 
   16546           0 : static int py_netr_DELTA_ENUM_set_delta_id_union(PyObject *py_obj, PyObject *value, void *closure)
   16547             : {
   16548           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(py_obj);
   16549           0 :         if (value == NULL) {
   16550           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_id_union");
   16551           0 :                 return -1;
   16552             :         }
   16553             :         {
   16554           0 :                 union netr_DELTA_ID_UNION *delta_id_union_switch_0;
   16555           0 :                 delta_id_union_switch_0 = (union netr_DELTA_ID_UNION *)pyrpc_export_union(&netr_DELTA_ID_UNION_Type, pytalloc_get_mem_ctx(py_obj), object->delta_type, value, "union netr_DELTA_ID_UNION");
   16556           0 :                 if (delta_id_union_switch_0 == NULL) {
   16557           0 :                         return -1;
   16558             :                 }
   16559           0 :                 object->delta_id_union = *delta_id_union_switch_0;
   16560             :         }
   16561           0 :         return 0;
   16562             : }
   16563             : 
   16564           0 : static PyObject *py_netr_DELTA_ENUM_get_delta_union(PyObject *obj, void *closure)
   16565             : {
   16566           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(obj);
   16567           0 :         PyObject *py_delta_union;
   16568           0 :         py_delta_union = pyrpc_import_union(&netr_DELTA_UNION_Type, pytalloc_get_mem_ctx(obj), object->delta_type, &object->delta_union, "union netr_DELTA_UNION");
   16569           0 :         if (py_delta_union == NULL) {
   16570           0 :                 return NULL;
   16571             :         }
   16572           0 :         return py_delta_union;
   16573             : }
   16574             : 
   16575           0 : static int py_netr_DELTA_ENUM_set_delta_union(PyObject *py_obj, PyObject *value, void *closure)
   16576             : {
   16577           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(py_obj);
   16578           0 :         if (value == NULL) {
   16579           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_union");
   16580           0 :                 return -1;
   16581             :         }
   16582             :         {
   16583           0 :                 union netr_DELTA_UNION *delta_union_switch_0;
   16584           0 :                 delta_union_switch_0 = (union netr_DELTA_UNION *)pyrpc_export_union(&netr_DELTA_UNION_Type, pytalloc_get_mem_ctx(py_obj), object->delta_type, value, "union netr_DELTA_UNION");
   16585           0 :                 if (delta_union_switch_0 == NULL) {
   16586           0 :                         return -1;
   16587             :                 }
   16588           0 :                 object->delta_union = *delta_union_switch_0;
   16589             :         }
   16590           0 :         return 0;
   16591             : }
   16592             : 
   16593             : static PyGetSetDef py_netr_DELTA_ENUM_getsetters[] = {
   16594             :         {
   16595             :                 .name = discard_const_p(char, "delta_type"),
   16596             :                 .get = py_netr_DELTA_ENUM_get_delta_type,
   16597             :                 .set = py_netr_DELTA_ENUM_set_delta_type,
   16598             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DeltaEnum")
   16599             :         },
   16600             :         {
   16601             :                 .name = discard_const_p(char, "delta_id_union"),
   16602             :                 .get = py_netr_DELTA_ENUM_get_delta_id_union,
   16603             :                 .set = py_netr_DELTA_ENUM_set_delta_id_union,
   16604             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ID_UNION")
   16605             :         },
   16606             :         {
   16607             :                 .name = discard_const_p(char, "delta_union"),
   16608             :                 .get = py_netr_DELTA_ENUM_get_delta_union,
   16609             :                 .set = py_netr_DELTA_ENUM_set_delta_union,
   16610             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_UNION")
   16611             :         },
   16612             :         { .name = NULL }
   16613             : };
   16614             : 
   16615           0 : static PyObject *py_netr_DELTA_ENUM_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16616             : {
   16617           0 :         return pytalloc_new(struct netr_DELTA_ENUM, type);
   16618             : }
   16619             : 
   16620             : 
   16621             : static PyTypeObject netr_DELTA_ENUM_Type = {
   16622             :         PyVarObject_HEAD_INIT(NULL, 0)
   16623             :         .tp_name = "netlogon.netr_DELTA_ENUM",
   16624             :         .tp_getset = py_netr_DELTA_ENUM_getsetters,
   16625             :         .tp_methods = NULL,
   16626             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16627             :         .tp_new = py_netr_DELTA_ENUM_new,
   16628             : };
   16629             : 
   16630             : 
   16631           0 : static PyObject *py_netr_DELTA_ENUM_ARRAY_get_num_deltas(PyObject *obj, void *closure)
   16632             : {
   16633           0 :         struct netr_DELTA_ENUM_ARRAY *object = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(obj);
   16634           0 :         PyObject *py_num_deltas;
   16635           0 :         py_num_deltas = PyLong_FromUnsignedLongLong((uint32_t)object->num_deltas);
   16636           0 :         return py_num_deltas;
   16637             : }
   16638             : 
   16639           0 : static int py_netr_DELTA_ENUM_ARRAY_set_num_deltas(PyObject *py_obj, PyObject *value, void *closure)
   16640             : {
   16641           0 :         struct netr_DELTA_ENUM_ARRAY *object = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(py_obj);
   16642           0 :         if (value == NULL) {
   16643           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_deltas");
   16644           0 :                 return -1;
   16645             :         }
   16646             :         {
   16647           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_deltas));
   16648           0 :                 if (PyLong_Check(value)) {
   16649           0 :                         unsigned long long test_var;
   16650           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16651           0 :                         if (PyErr_Occurred() != NULL) {
   16652           0 :                                 return -1;
   16653             :                         }
   16654           0 :                         if (test_var > uint_max) {
   16655           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16656             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16657           0 :                                 return -1;
   16658             :                         }
   16659           0 :                         object->num_deltas = test_var;
   16660             :                 } else {
   16661           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16662             :                           PyLong_Type.tp_name);
   16663           0 :                         return -1;
   16664             :                 }
   16665             :         }
   16666           0 :         return 0;
   16667             : }
   16668             : 
   16669           0 : static PyObject *py_netr_DELTA_ENUM_ARRAY_get_delta_enum(PyObject *obj, void *closure)
   16670             : {
   16671           0 :         struct netr_DELTA_ENUM_ARRAY *object = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(obj);
   16672           0 :         PyObject *py_delta_enum;
   16673           0 :         if (object->delta_enum == NULL) {
   16674           0 :                 Py_RETURN_NONE;
   16675             :         }
   16676           0 :         if (object->delta_enum == NULL) {
   16677           0 :                 py_delta_enum = Py_None;
   16678           0 :                 Py_INCREF(py_delta_enum);
   16679             :         } else {
   16680           0 :                 py_delta_enum = PyList_New(object->num_deltas);
   16681           0 :                 if (py_delta_enum == NULL) {
   16682           0 :                         return NULL;
   16683             :                 }
   16684             :                 {
   16685             :                         int delta_enum_cntr_1;
   16686           0 :                         for (delta_enum_cntr_1 = 0; delta_enum_cntr_1 < (object->num_deltas); delta_enum_cntr_1++) {
   16687           0 :                                 PyObject *py_delta_enum_1;
   16688           0 :                                 py_delta_enum_1 = pytalloc_reference_ex(&netr_DELTA_ENUM_Type, object->delta_enum, &object->delta_enum[delta_enum_cntr_1]);
   16689           0 :                                 PyList_SetItem(py_delta_enum, delta_enum_cntr_1, py_delta_enum_1);
   16690             :                         }
   16691             :                 }
   16692             :         }
   16693           0 :         return py_delta_enum;
   16694             : }
   16695             : 
   16696           0 : static int py_netr_DELTA_ENUM_ARRAY_set_delta_enum(PyObject *py_obj, PyObject *value, void *closure)
   16697             : {
   16698           0 :         struct netr_DELTA_ENUM_ARRAY *object = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(py_obj);
   16699           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->delta_enum));
   16700           0 :         if (value == NULL) {
   16701           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_enum");
   16702           0 :                 return -1;
   16703             :         }
   16704           0 :         if (value == Py_None) {
   16705           0 :                 object->delta_enum = NULL;
   16706             :         } else {
   16707           0 :                 object->delta_enum = NULL;
   16708           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   16709             :                 {
   16710           0 :                         int delta_enum_cntr_1;
   16711           0 :                         object->delta_enum = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->delta_enum, PyList_GET_SIZE(value));
   16712           0 :                         if (!object->delta_enum) { return -1; }
   16713           0 :                         talloc_set_name_const(object->delta_enum, "ARRAY: object->delta_enum");
   16714           0 :                         for (delta_enum_cntr_1 = 0; delta_enum_cntr_1 < PyList_GET_SIZE(value); delta_enum_cntr_1++) {
   16715           0 :                                 if (PyList_GET_ITEM(value, delta_enum_cntr_1) == NULL) {
   16716           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_enum[delta_enum_cntr_1]");
   16717           0 :                                         return -1;
   16718             :                                 }
   16719           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ENUM_Type, PyList_GET_ITEM(value, delta_enum_cntr_1), return -1;);
   16720           0 :                                 if (talloc_reference(object->delta_enum, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, delta_enum_cntr_1))) == NULL) {
   16721           0 :                                         PyErr_NoMemory();
   16722           0 :                                         return -1;
   16723             :                                 }
   16724           0 :                                 object->delta_enum[delta_enum_cntr_1] = *(struct netr_DELTA_ENUM *)pytalloc_get_ptr(PyList_GET_ITEM(value, delta_enum_cntr_1));
   16725             :                         }
   16726             :                 }
   16727             :         }
   16728           0 :         return 0;
   16729             : }
   16730             : 
   16731             : static PyGetSetDef py_netr_DELTA_ENUM_ARRAY_getsetters[] = {
   16732             :         {
   16733             :                 .name = discard_const_p(char, "num_deltas"),
   16734             :                 .get = py_netr_DELTA_ENUM_ARRAY_get_num_deltas,
   16735             :                 .set = py_netr_DELTA_ENUM_ARRAY_set_num_deltas,
   16736             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16737             :         },
   16738             :         {
   16739             :                 .name = discard_const_p(char, "delta_enum"),
   16740             :                 .get = py_netr_DELTA_ENUM_ARRAY_get_delta_enum,
   16741             :                 .set = py_netr_DELTA_ENUM_ARRAY_set_delta_enum,
   16742             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM")
   16743             :         },
   16744             :         { .name = NULL }
   16745             : };
   16746             : 
   16747           0 : static PyObject *py_netr_DELTA_ENUM_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16748             : {
   16749           0 :         return pytalloc_new(struct netr_DELTA_ENUM_ARRAY, type);
   16750             : }
   16751             : 
   16752             : 
   16753             : static PyTypeObject netr_DELTA_ENUM_ARRAY_Type = {
   16754             :         PyVarObject_HEAD_INIT(NULL, 0)
   16755             :         .tp_name = "netlogon.netr_DELTA_ENUM_ARRAY",
   16756             :         .tp_getset = py_netr_DELTA_ENUM_ARRAY_getsetters,
   16757             :         .tp_methods = NULL,
   16758             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16759             :         .tp_new = py_netr_DELTA_ENUM_ARRAY_new,
   16760             : };
   16761             : 
   16762             : 
   16763           0 : static PyObject *py_netr_UAS_INFO_0_get_computer_name(PyObject *obj, void *closure)
   16764             : {
   16765           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(obj);
   16766           0 :         PyObject *py_computer_name;
   16767           0 :         py_computer_name = PyList_New(16);
   16768           0 :         if (py_computer_name == NULL) {
   16769           0 :                 return NULL;
   16770             :         }
   16771             :         {
   16772             :                 int computer_name_cntr_0;
   16773           0 :                 for (computer_name_cntr_0 = 0; computer_name_cntr_0 < (16); computer_name_cntr_0++) {
   16774           0 :                         PyObject *py_computer_name_0;
   16775           0 :                         py_computer_name_0 = PyLong_FromLong((uint16_t)object->computer_name[computer_name_cntr_0]);
   16776           0 :                         PyList_SetItem(py_computer_name, computer_name_cntr_0, py_computer_name_0);
   16777             :                 }
   16778             :         }
   16779           0 :         return py_computer_name;
   16780             : }
   16781             : 
   16782           0 : static int py_netr_UAS_INFO_0_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   16783             : {
   16784           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_obj);
   16785           0 :         if (value == NULL) {
   16786           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_name");
   16787           0 :                 return -1;
   16788             :         }
   16789           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   16790             :         {
   16791           0 :                 int computer_name_cntr_0;
   16792           0 :                 if (ARRAY_SIZE(object->computer_name) != PyList_GET_SIZE(value)) {
   16793           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->computer_name),  PyList_GET_SIZE(value));
   16794           0 :                         return -1;
   16795             :                 }
   16796           0 :                 for (computer_name_cntr_0 = 0; computer_name_cntr_0 < PyList_GET_SIZE(value); computer_name_cntr_0++) {
   16797           0 :                         if (PyList_GET_ITEM(value, computer_name_cntr_0) == NULL) {
   16798           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_name[computer_name_cntr_0]");
   16799           0 :                                 return -1;
   16800             :                         }
   16801             :                         {
   16802           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->computer_name[computer_name_cntr_0]));
   16803           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, computer_name_cntr_0))) {
   16804           0 :                                         unsigned long long test_var;
   16805           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, computer_name_cntr_0));
   16806           0 :                                         if (PyErr_Occurred() != NULL) {
   16807           0 :                                                 return -1;
   16808             :                                         }
   16809           0 :                                         if (test_var > uint_max) {
   16810           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16811             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16812           0 :                                                 return -1;
   16813             :                                         }
   16814           0 :                                         object->computer_name[computer_name_cntr_0] = test_var;
   16815             :                                 } else {
   16816           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16817             :                                           PyLong_Type.tp_name);
   16818           0 :                                         return -1;
   16819             :                                 }
   16820             :                         }
   16821             :                 }
   16822             :         }
   16823           0 :         return 0;
   16824             : }
   16825             : 
   16826           0 : static PyObject *py_netr_UAS_INFO_0_get_timecreated(PyObject *obj, void *closure)
   16827             : {
   16828           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(obj);
   16829           0 :         PyObject *py_timecreated;
   16830           0 :         py_timecreated = PyLong_FromUnsignedLongLong((uint32_t)object->timecreated);
   16831           0 :         return py_timecreated;
   16832             : }
   16833             : 
   16834           0 : static int py_netr_UAS_INFO_0_set_timecreated(PyObject *py_obj, PyObject *value, void *closure)
   16835             : {
   16836           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_obj);
   16837           0 :         if (value == NULL) {
   16838           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timecreated");
   16839           0 :                 return -1;
   16840             :         }
   16841             :         {
   16842           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timecreated));
   16843           0 :                 if (PyLong_Check(value)) {
   16844           0 :                         unsigned long long test_var;
   16845           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16846           0 :                         if (PyErr_Occurred() != NULL) {
   16847           0 :                                 return -1;
   16848             :                         }
   16849           0 :                         if (test_var > uint_max) {
   16850           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16851             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16852           0 :                                 return -1;
   16853             :                         }
   16854           0 :                         object->timecreated = test_var;
   16855             :                 } else {
   16856           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16857             :                           PyLong_Type.tp_name);
   16858           0 :                         return -1;
   16859             :                 }
   16860             :         }
   16861           0 :         return 0;
   16862             : }
   16863             : 
   16864           0 : static PyObject *py_netr_UAS_INFO_0_get_serial_number(PyObject *obj, void *closure)
   16865             : {
   16866           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(obj);
   16867           0 :         PyObject *py_serial_number;
   16868           0 :         py_serial_number = PyLong_FromUnsignedLongLong((uint32_t)object->serial_number);
   16869           0 :         return py_serial_number;
   16870             : }
   16871             : 
   16872           0 : static int py_netr_UAS_INFO_0_set_serial_number(PyObject *py_obj, PyObject *value, void *closure)
   16873             : {
   16874           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_obj);
   16875           0 :         if (value == NULL) {
   16876           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_number");
   16877           0 :                 return -1;
   16878             :         }
   16879             :         {
   16880           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number));
   16881           0 :                 if (PyLong_Check(value)) {
   16882           0 :                         unsigned long long test_var;
   16883           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16884           0 :                         if (PyErr_Occurred() != NULL) {
   16885           0 :                                 return -1;
   16886             :                         }
   16887           0 :                         if (test_var > uint_max) {
   16888           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16889             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16890           0 :                                 return -1;
   16891             :                         }
   16892           0 :                         object->serial_number = test_var;
   16893             :                 } else {
   16894           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16895             :                           PyLong_Type.tp_name);
   16896           0 :                         return -1;
   16897             :                 }
   16898             :         }
   16899           0 :         return 0;
   16900             : }
   16901             : 
   16902             : static PyGetSetDef py_netr_UAS_INFO_0_getsetters[] = {
   16903             :         {
   16904             :                 .name = discard_const_p(char, "computer_name"),
   16905             :                 .get = py_netr_UAS_INFO_0_get_computer_name,
   16906             :                 .set = py_netr_UAS_INFO_0_set_computer_name,
   16907             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16908             :         },
   16909             :         {
   16910             :                 .name = discard_const_p(char, "timecreated"),
   16911             :                 .get = py_netr_UAS_INFO_0_get_timecreated,
   16912             :                 .set = py_netr_UAS_INFO_0_set_timecreated,
   16913             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16914             :         },
   16915             :         {
   16916             :                 .name = discard_const_p(char, "serial_number"),
   16917             :                 .get = py_netr_UAS_INFO_0_get_serial_number,
   16918             :                 .set = py_netr_UAS_INFO_0_set_serial_number,
   16919             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16920             :         },
   16921             :         { .name = NULL }
   16922             : };
   16923             : 
   16924           0 : static PyObject *py_netr_UAS_INFO_0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16925             : {
   16926           0 :         return pytalloc_new(struct netr_UAS_INFO_0, type);
   16927             : }
   16928             : 
   16929             : 
   16930             : static PyTypeObject netr_UAS_INFO_0_Type = {
   16931             :         PyVarObject_HEAD_INIT(NULL, 0)
   16932             :         .tp_name = "netlogon.netr_UAS_INFO_0",
   16933             :         .tp_getset = py_netr_UAS_INFO_0_getsetters,
   16934             :         .tp_methods = NULL,
   16935             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16936             :         .tp_new = py_netr_UAS_INFO_0_new,
   16937             : };
   16938             : 
   16939             : 
   16940           0 : static PyObject *py_netr_AccountBuffer_get_blob(PyObject *obj, void *closure)
   16941             : {
   16942           0 :         struct netr_AccountBuffer *object = (struct netr_AccountBuffer *)pytalloc_get_ptr(obj);
   16943           0 :         PyObject *py_blob;
   16944           0 :         py_blob = PyBytes_FromStringAndSize((char *)(object->blob).data, (object->blob).length);
   16945           0 :         return py_blob;
   16946             : }
   16947             : 
   16948           0 : static int py_netr_AccountBuffer_set_blob(PyObject *py_obj, PyObject *value, void *closure)
   16949             : {
   16950           0 :         struct netr_AccountBuffer *object = (struct netr_AccountBuffer *)pytalloc_get_ptr(py_obj);
   16951           0 :         if (value == NULL) {
   16952           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->blob");
   16953           0 :                 return -1;
   16954             :         }
   16955           0 :         object->blob = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   16956           0 :         return 0;
   16957             : }
   16958             : 
   16959             : static PyGetSetDef py_netr_AccountBuffer_getsetters[] = {
   16960             :         {
   16961             :                 .name = discard_const_p(char, "blob"),
   16962             :                 .get = py_netr_AccountBuffer_get_blob,
   16963             :                 .set = py_netr_AccountBuffer_set_blob,
   16964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16965             :         },
   16966             :         { .name = NULL }
   16967             : };
   16968             : 
   16969           0 : static PyObject *py_netr_AccountBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16970             : {
   16971           0 :         return pytalloc_new(struct netr_AccountBuffer, type);
   16972             : }
   16973             : 
   16974             : 
   16975             : static PyTypeObject netr_AccountBuffer_Type = {
   16976             :         PyVarObject_HEAD_INIT(NULL, 0)
   16977             :         .tp_name = "netlogon.netr_AccountBuffer",
   16978             :         .tp_getset = py_netr_AccountBuffer_getsetters,
   16979             :         .tp_methods = NULL,
   16980             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16981             :         .tp_new = py_netr_AccountBuffer_new,
   16982             : };
   16983             : 
   16984             : 
   16985           0 : static PyObject *py_netr_NETLOGON_INFO_1_get_flags(PyObject *obj, void *closure)
   16986             : {
   16987           0 :         struct netr_NETLOGON_INFO_1 *object = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(obj);
   16988           0 :         PyObject *py_flags;
   16989           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
   16990           0 :         return py_flags;
   16991             : }
   16992             : 
   16993           0 : static int py_netr_NETLOGON_INFO_1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   16994             : {
   16995           0 :         struct netr_NETLOGON_INFO_1 *object = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(py_obj);
   16996           0 :         if (value == NULL) {
   16997           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   16998           0 :                 return -1;
   16999             :         }
   17000             :         {
   17001           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   17002           0 :                 if (PyLong_Check(value)) {
   17003           0 :                         unsigned long long test_var;
   17004           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17005           0 :                         if (PyErr_Occurred() != NULL) {
   17006           0 :                                 return -1;
   17007             :                         }
   17008           0 :                         if (test_var > uint_max) {
   17009           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17010             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17011           0 :                                 return -1;
   17012             :                         }
   17013           0 :                         object->flags = test_var;
   17014             :                 } else {
   17015           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17016             :                           PyLong_Type.tp_name);
   17017           0 :                         return -1;
   17018             :                 }
   17019             :         }
   17020           0 :         return 0;
   17021             : }
   17022             : 
   17023           0 : static PyObject *py_netr_NETLOGON_INFO_1_get_pdc_connection_status(PyObject *obj, void *closure)
   17024             : {
   17025           0 :         struct netr_NETLOGON_INFO_1 *object = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(obj);
   17026           0 :         PyObject *py_pdc_connection_status;
   17027           0 :         py_pdc_connection_status = PyErr_FromWERROR(object->pdc_connection_status);
   17028           0 :         return py_pdc_connection_status;
   17029             : }
   17030             : 
   17031           0 : static int py_netr_NETLOGON_INFO_1_set_pdc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
   17032             : {
   17033           0 :         struct netr_NETLOGON_INFO_1 *object = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(py_obj);
   17034           0 :         if (value == NULL) {
   17035           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pdc_connection_status");
   17036           0 :                 return -1;
   17037             :         }
   17038           0 :         object->pdc_connection_status = W_ERROR(PyLong_AsLong(value));
   17039           0 :         return 0;
   17040             : }
   17041             : 
   17042             : static PyGetSetDef py_netr_NETLOGON_INFO_1_getsetters[] = {
   17043             :         {
   17044             :                 .name = discard_const_p(char, "flags"),
   17045             :                 .get = py_netr_NETLOGON_INFO_1_get_flags,
   17046             :                 .set = py_netr_NETLOGON_INFO_1_set_flags,
   17047             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
   17048             :         },
   17049             :         {
   17050             :                 .name = discard_const_p(char, "pdc_connection_status"),
   17051             :                 .get = py_netr_NETLOGON_INFO_1_get_pdc_connection_status,
   17052             :                 .set = py_netr_NETLOGON_INFO_1_set_pdc_connection_status,
   17053             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   17054             :         },
   17055             :         { .name = NULL }
   17056             : };
   17057             : 
   17058           0 : static PyObject *py_netr_NETLOGON_INFO_1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17059             : {
   17060           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_1, type);
   17061             : }
   17062             : 
   17063             : 
   17064             : static PyTypeObject netr_NETLOGON_INFO_1_Type = {
   17065             :         PyVarObject_HEAD_INIT(NULL, 0)
   17066             :         .tp_name = "netlogon.netr_NETLOGON_INFO_1",
   17067             :         .tp_getset = py_netr_NETLOGON_INFO_1_getsetters,
   17068             :         .tp_methods = NULL,
   17069             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17070             :         .tp_new = py_netr_NETLOGON_INFO_1_new,
   17071             : };
   17072             : 
   17073             : 
   17074          53 : static PyObject *py_netr_NETLOGON_INFO_2_get_flags(PyObject *obj, void *closure)
   17075             : {
   17076          53 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(obj);
   17077           0 :         PyObject *py_flags;
   17078          53 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
   17079          53 :         return py_flags;
   17080             : }
   17081             : 
   17082           0 : static int py_netr_NETLOGON_INFO_2_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   17083             : {
   17084           0 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(py_obj);
   17085           0 :         if (value == NULL) {
   17086           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   17087           0 :                 return -1;
   17088             :         }
   17089             :         {
   17090           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   17091           0 :                 if (PyLong_Check(value)) {
   17092           0 :                         unsigned long long test_var;
   17093           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17094           0 :                         if (PyErr_Occurred() != NULL) {
   17095           0 :                                 return -1;
   17096             :                         }
   17097           0 :                         if (test_var > uint_max) {
   17098           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17099             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17100           0 :                                 return -1;
   17101             :                         }
   17102           0 :                         object->flags = test_var;
   17103             :                 } else {
   17104           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17105             :                           PyLong_Type.tp_name);
   17106           0 :                         return -1;
   17107             :                 }
   17108             :         }
   17109           0 :         return 0;
   17110             : }
   17111             : 
   17112         106 : static PyObject *py_netr_NETLOGON_INFO_2_get_pdc_connection_status(PyObject *obj, void *closure)
   17113             : {
   17114         106 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(obj);
   17115           0 :         PyObject *py_pdc_connection_status;
   17116         106 :         py_pdc_connection_status = PyErr_FromWERROR(object->pdc_connection_status);
   17117         106 :         return py_pdc_connection_status;
   17118             : }
   17119             : 
   17120           0 : static int py_netr_NETLOGON_INFO_2_set_pdc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
   17121             : {
   17122           0 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(py_obj);
   17123           0 :         if (value == NULL) {
   17124           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pdc_connection_status");
   17125           0 :                 return -1;
   17126             :         }
   17127           0 :         object->pdc_connection_status = W_ERROR(PyLong_AsLong(value));
   17128           0 :         return 0;
   17129             : }
   17130             : 
   17131         109 : static PyObject *py_netr_NETLOGON_INFO_2_get_trusted_dc_name(PyObject *obj, void *closure)
   17132             : {
   17133         109 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(obj);
   17134           0 :         PyObject *py_trusted_dc_name;
   17135         109 :         if (object->trusted_dc_name == NULL) {
   17136           0 :                 Py_RETURN_NONE;
   17137             :         }
   17138         109 :         if (object->trusted_dc_name == NULL) {
   17139           0 :                 py_trusted_dc_name = Py_None;
   17140           0 :                 Py_INCREF(py_trusted_dc_name);
   17141             :         } else {
   17142         109 :                 if (object->trusted_dc_name == NULL) {
   17143           0 :                         py_trusted_dc_name = Py_None;
   17144           0 :                         Py_INCREF(py_trusted_dc_name);
   17145             :                 } else {
   17146         109 :                         py_trusted_dc_name = PyUnicode_Decode(object->trusted_dc_name, strlen(object->trusted_dc_name), "utf-8", "ignore");
   17147             :                 }
   17148             :         }
   17149         109 :         return py_trusted_dc_name;
   17150             : }
   17151             : 
   17152           0 : static int py_netr_NETLOGON_INFO_2_set_trusted_dc_name(PyObject *py_obj, PyObject *value, void *closure)
   17153             : {
   17154           0 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(py_obj);
   17155           0 :         if (value == NULL) {
   17156           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_dc_name");
   17157           0 :                 return -1;
   17158             :         }
   17159           0 :         if (value == Py_None) {
   17160           0 :                 object->trusted_dc_name = NULL;
   17161             :         } else {
   17162           0 :                 object->trusted_dc_name = NULL;
   17163             :                 {
   17164           0 :                         const char *test_str;
   17165           0 :                         const char *talloc_str;
   17166           0 :                         PyObject *unicode = NULL;
   17167           0 :                         if (PyUnicode_Check(value)) {
   17168           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17169           0 :                                 if (unicode == NULL) {
   17170           0 :                                         PyErr_NoMemory();
   17171           0 :                                         return -1;
   17172             :                                 }
   17173           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17174           0 :                         } else if (PyBytes_Check(value)) {
   17175           0 :                                 test_str = PyBytes_AS_STRING(value);
   17176             :                         } else {
   17177           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17178           0 :                                 return -1;
   17179             :                         }
   17180           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17181           0 :                         if (unicode != NULL) {
   17182           0 :                                 Py_DECREF(unicode);
   17183             :                         }
   17184           0 :                         if (talloc_str == NULL) {
   17185           0 :                                 PyErr_NoMemory();
   17186           0 :                                 return -1;
   17187             :                         }
   17188           0 :                         object->trusted_dc_name = talloc_str;
   17189             :                 }
   17190             :         }
   17191           0 :         return 0;
   17192             : }
   17193             : 
   17194         162 : static PyObject *py_netr_NETLOGON_INFO_2_get_tc_connection_status(PyObject *obj, void *closure)
   17195             : {
   17196         162 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(obj);
   17197           0 :         PyObject *py_tc_connection_status;
   17198         162 :         py_tc_connection_status = PyErr_FromWERROR(object->tc_connection_status);
   17199         162 :         return py_tc_connection_status;
   17200             : }
   17201             : 
   17202           0 : static int py_netr_NETLOGON_INFO_2_set_tc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
   17203             : {
   17204           0 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(py_obj);
   17205           0 :         if (value == NULL) {
   17206           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->tc_connection_status");
   17207           0 :                 return -1;
   17208             :         }
   17209           0 :         object->tc_connection_status = W_ERROR(PyLong_AsLong(value));
   17210           0 :         return 0;
   17211             : }
   17212             : 
   17213             : static PyGetSetDef py_netr_NETLOGON_INFO_2_getsetters[] = {
   17214             :         {
   17215             :                 .name = discard_const_p(char, "flags"),
   17216             :                 .get = py_netr_NETLOGON_INFO_2_get_flags,
   17217             :                 .set = py_netr_NETLOGON_INFO_2_set_flags,
   17218             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
   17219             :         },
   17220             :         {
   17221             :                 .name = discard_const_p(char, "pdc_connection_status"),
   17222             :                 .get = py_netr_NETLOGON_INFO_2_get_pdc_connection_status,
   17223             :                 .set = py_netr_NETLOGON_INFO_2_set_pdc_connection_status,
   17224             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   17225             :         },
   17226             :         {
   17227             :                 .name = discard_const_p(char, "trusted_dc_name"),
   17228             :                 .get = py_netr_NETLOGON_INFO_2_get_trusted_dc_name,
   17229             :                 .set = py_netr_NETLOGON_INFO_2_set_trusted_dc_name,
   17230             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17231             :         },
   17232             :         {
   17233             :                 .name = discard_const_p(char, "tc_connection_status"),
   17234             :                 .get = py_netr_NETLOGON_INFO_2_get_tc_connection_status,
   17235             :                 .set = py_netr_NETLOGON_INFO_2_set_tc_connection_status,
   17236             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   17237             :         },
   17238             :         { .name = NULL }
   17239             : };
   17240             : 
   17241           0 : static PyObject *py_netr_NETLOGON_INFO_2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17242             : {
   17243           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_2, type);
   17244             : }
   17245             : 
   17246             : 
   17247             : static PyTypeObject netr_NETLOGON_INFO_2_Type = {
   17248             :         PyVarObject_HEAD_INIT(NULL, 0)
   17249             :         .tp_name = "netlogon.netr_NETLOGON_INFO_2",
   17250             :         .tp_getset = py_netr_NETLOGON_INFO_2_getsetters,
   17251             :         .tp_methods = NULL,
   17252             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17253             :         .tp_new = py_netr_NETLOGON_INFO_2_new,
   17254             : };
   17255             : 
   17256             : 
   17257           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_flags(PyObject *obj, void *closure)
   17258             : {
   17259           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17260           0 :         PyObject *py_flags;
   17261           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
   17262           0 :         return py_flags;
   17263             : }
   17264             : 
   17265           0 : static int py_netr_NETLOGON_INFO_3_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   17266             : {
   17267           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17268           0 :         if (value == NULL) {
   17269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   17270           0 :                 return -1;
   17271             :         }
   17272             :         {
   17273           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   17274           0 :                 if (PyLong_Check(value)) {
   17275           0 :                         unsigned long long test_var;
   17276           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17277           0 :                         if (PyErr_Occurred() != NULL) {
   17278           0 :                                 return -1;
   17279             :                         }
   17280           0 :                         if (test_var > uint_max) {
   17281           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17282             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17283           0 :                                 return -1;
   17284             :                         }
   17285           0 :                         object->flags = test_var;
   17286             :                 } else {
   17287           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17288             :                           PyLong_Type.tp_name);
   17289           0 :                         return -1;
   17290             :                 }
   17291             :         }
   17292           0 :         return 0;
   17293             : }
   17294             : 
   17295           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_logon_attempts(PyObject *obj, void *closure)
   17296             : {
   17297           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17298           0 :         PyObject *py_logon_attempts;
   17299           0 :         py_logon_attempts = PyLong_FromUnsignedLongLong((uint32_t)object->logon_attempts);
   17300           0 :         return py_logon_attempts;
   17301             : }
   17302             : 
   17303           0 : static int py_netr_NETLOGON_INFO_3_set_logon_attempts(PyObject *py_obj, PyObject *value, void *closure)
   17304             : {
   17305           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17306           0 :         if (value == NULL) {
   17307           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_attempts");
   17308           0 :                 return -1;
   17309             :         }
   17310             :         {
   17311           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_attempts));
   17312           0 :                 if (PyLong_Check(value)) {
   17313           0 :                         unsigned long long test_var;
   17314           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17315           0 :                         if (PyErr_Occurred() != NULL) {
   17316           0 :                                 return -1;
   17317             :                         }
   17318           0 :                         if (test_var > uint_max) {
   17319           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17320             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17321           0 :                                 return -1;
   17322             :                         }
   17323           0 :                         object->logon_attempts = test_var;
   17324             :                 } else {
   17325           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17326             :                           PyLong_Type.tp_name);
   17327           0 :                         return -1;
   17328             :                 }
   17329             :         }
   17330           0 :         return 0;
   17331             : }
   17332             : 
   17333           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown1(PyObject *obj, void *closure)
   17334             : {
   17335           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17336           0 :         PyObject *py_unknown1;
   17337           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
   17338           0 :         return py_unknown1;
   17339             : }
   17340             : 
   17341           0 : static int py_netr_NETLOGON_INFO_3_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   17342             : {
   17343           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17344           0 :         if (value == NULL) {
   17345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   17346           0 :                 return -1;
   17347             :         }
   17348             :         {
   17349           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   17350           0 :                 if (PyLong_Check(value)) {
   17351           0 :                         unsigned long long test_var;
   17352           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17353           0 :                         if (PyErr_Occurred() != NULL) {
   17354           0 :                                 return -1;
   17355             :                         }
   17356           0 :                         if (test_var > uint_max) {
   17357           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17358             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17359           0 :                                 return -1;
   17360             :                         }
   17361           0 :                         object->unknown1 = test_var;
   17362             :                 } else {
   17363           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17364             :                           PyLong_Type.tp_name);
   17365           0 :                         return -1;
   17366             :                 }
   17367             :         }
   17368           0 :         return 0;
   17369             : }
   17370             : 
   17371           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown2(PyObject *obj, void *closure)
   17372             : {
   17373           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17374           0 :         PyObject *py_unknown2;
   17375           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
   17376           0 :         return py_unknown2;
   17377             : }
   17378             : 
   17379           0 : static int py_netr_NETLOGON_INFO_3_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   17380             : {
   17381           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17382           0 :         if (value == NULL) {
   17383           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   17384           0 :                 return -1;
   17385             :         }
   17386             :         {
   17387           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   17388           0 :                 if (PyLong_Check(value)) {
   17389           0 :                         unsigned long long test_var;
   17390           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17391           0 :                         if (PyErr_Occurred() != NULL) {
   17392           0 :                                 return -1;
   17393             :                         }
   17394           0 :                         if (test_var > uint_max) {
   17395           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17396             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17397           0 :                                 return -1;
   17398             :                         }
   17399           0 :                         object->unknown2 = test_var;
   17400             :                 } else {
   17401           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17402             :                           PyLong_Type.tp_name);
   17403           0 :                         return -1;
   17404             :                 }
   17405             :         }
   17406           0 :         return 0;
   17407             : }
   17408             : 
   17409           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown3(PyObject *obj, void *closure)
   17410             : {
   17411           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17412           0 :         PyObject *py_unknown3;
   17413           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown3);
   17414           0 :         return py_unknown3;
   17415             : }
   17416             : 
   17417           0 : static int py_netr_NETLOGON_INFO_3_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   17418             : {
   17419           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17420           0 :         if (value == NULL) {
   17421           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   17422           0 :                 return -1;
   17423             :         }
   17424             :         {
   17425           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   17426           0 :                 if (PyLong_Check(value)) {
   17427           0 :                         unsigned long long test_var;
   17428           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17429           0 :                         if (PyErr_Occurred() != NULL) {
   17430           0 :                                 return -1;
   17431             :                         }
   17432           0 :                         if (test_var > uint_max) {
   17433           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17434             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17435           0 :                                 return -1;
   17436             :                         }
   17437           0 :                         object->unknown3 = test_var;
   17438             :                 } else {
   17439           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17440             :                           PyLong_Type.tp_name);
   17441           0 :                         return -1;
   17442             :                 }
   17443             :         }
   17444           0 :         return 0;
   17445             : }
   17446             : 
   17447           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown4(PyObject *obj, void *closure)
   17448             : {
   17449           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17450           0 :         PyObject *py_unknown4;
   17451           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4);
   17452           0 :         return py_unknown4;
   17453             : }
   17454             : 
   17455           0 : static int py_netr_NETLOGON_INFO_3_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   17456             : {
   17457           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17458           0 :         if (value == NULL) {
   17459           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   17460           0 :                 return -1;
   17461             :         }
   17462             :         {
   17463           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   17464           0 :                 if (PyLong_Check(value)) {
   17465           0 :                         unsigned long long test_var;
   17466           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17467           0 :                         if (PyErr_Occurred() != NULL) {
   17468           0 :                                 return -1;
   17469             :                         }
   17470           0 :                         if (test_var > uint_max) {
   17471           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17472             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17473           0 :                                 return -1;
   17474             :                         }
   17475           0 :                         object->unknown4 = test_var;
   17476             :                 } else {
   17477           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17478             :                           PyLong_Type.tp_name);
   17479           0 :                         return -1;
   17480             :                 }
   17481             :         }
   17482           0 :         return 0;
   17483             : }
   17484             : 
   17485           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown5(PyObject *obj, void *closure)
   17486             : {
   17487           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17488           0 :         PyObject *py_unknown5;
   17489           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   17490           0 :         return py_unknown5;
   17491             : }
   17492             : 
   17493           0 : static int py_netr_NETLOGON_INFO_3_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   17494             : {
   17495           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17496           0 :         if (value == NULL) {
   17497           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   17498           0 :                 return -1;
   17499             :         }
   17500             :         {
   17501           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   17502           0 :                 if (PyLong_Check(value)) {
   17503           0 :                         unsigned long long test_var;
   17504           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17505           0 :                         if (PyErr_Occurred() != NULL) {
   17506           0 :                                 return -1;
   17507             :                         }
   17508           0 :                         if (test_var > uint_max) {
   17509           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17510             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17511           0 :                                 return -1;
   17512             :                         }
   17513           0 :                         object->unknown5 = test_var;
   17514             :                 } else {
   17515           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17516             :                           PyLong_Type.tp_name);
   17517           0 :                         return -1;
   17518             :                 }
   17519             :         }
   17520           0 :         return 0;
   17521             : }
   17522             : 
   17523             : static PyGetSetDef py_netr_NETLOGON_INFO_3_getsetters[] = {
   17524             :         {
   17525             :                 .name = discard_const_p(char, "flags"),
   17526             :                 .get = py_netr_NETLOGON_INFO_3_get_flags,
   17527             :                 .set = py_netr_NETLOGON_INFO_3_set_flags,
   17528             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
   17529             :         },
   17530             :         {
   17531             :                 .name = discard_const_p(char, "logon_attempts"),
   17532             :                 .get = py_netr_NETLOGON_INFO_3_get_logon_attempts,
   17533             :                 .set = py_netr_NETLOGON_INFO_3_set_logon_attempts,
   17534             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17535             :         },
   17536             :         {
   17537             :                 .name = discard_const_p(char, "unknown1"),
   17538             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown1,
   17539             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown1,
   17540             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17541             :         },
   17542             :         {
   17543             :                 .name = discard_const_p(char, "unknown2"),
   17544             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown2,
   17545             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown2,
   17546             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17547             :         },
   17548             :         {
   17549             :                 .name = discard_const_p(char, "unknown3"),
   17550             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown3,
   17551             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown3,
   17552             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17553             :         },
   17554             :         {
   17555             :                 .name = discard_const_p(char, "unknown4"),
   17556             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown4,
   17557             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown4,
   17558             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17559             :         },
   17560             :         {
   17561             :                 .name = discard_const_p(char, "unknown5"),
   17562             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown5,
   17563             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown5,
   17564             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17565             :         },
   17566             :         { .name = NULL }
   17567             : };
   17568             : 
   17569           0 : static PyObject *py_netr_NETLOGON_INFO_3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17570             : {
   17571           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_3, type);
   17572             : }
   17573             : 
   17574             : 
   17575             : static PyTypeObject netr_NETLOGON_INFO_3_Type = {
   17576             :         PyVarObject_HEAD_INIT(NULL, 0)
   17577             :         .tp_name = "netlogon.netr_NETLOGON_INFO_3",
   17578             :         .tp_getset = py_netr_NETLOGON_INFO_3_getsetters,
   17579             :         .tp_methods = NULL,
   17580             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17581             :         .tp_new = py_netr_NETLOGON_INFO_3_new,
   17582             : };
   17583             : 
   17584             : 
   17585           0 : static PyObject *py_netr_NETLOGON_INFO_4_get_trusted_dc_name(PyObject *obj, void *closure)
   17586             : {
   17587           0 :         struct netr_NETLOGON_INFO_4 *object = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(obj);
   17588           0 :         PyObject *py_trusted_dc_name;
   17589           0 :         if (object->trusted_dc_name == NULL) {
   17590           0 :                 Py_RETURN_NONE;
   17591             :         }
   17592           0 :         if (object->trusted_dc_name == NULL) {
   17593           0 :                 py_trusted_dc_name = Py_None;
   17594           0 :                 Py_INCREF(py_trusted_dc_name);
   17595             :         } else {
   17596           0 :                 if (object->trusted_dc_name == NULL) {
   17597           0 :                         py_trusted_dc_name = Py_None;
   17598           0 :                         Py_INCREF(py_trusted_dc_name);
   17599             :                 } else {
   17600           0 :                         py_trusted_dc_name = PyUnicode_Decode(object->trusted_dc_name, strlen(object->trusted_dc_name), "utf-8", "ignore");
   17601             :                 }
   17602             :         }
   17603           0 :         return py_trusted_dc_name;
   17604             : }
   17605             : 
   17606           0 : static int py_netr_NETLOGON_INFO_4_set_trusted_dc_name(PyObject *py_obj, PyObject *value, void *closure)
   17607             : {
   17608           0 :         struct netr_NETLOGON_INFO_4 *object = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(py_obj);
   17609           0 :         if (value == NULL) {
   17610           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_dc_name");
   17611           0 :                 return -1;
   17612             :         }
   17613           0 :         if (value == Py_None) {
   17614           0 :                 object->trusted_dc_name = NULL;
   17615             :         } else {
   17616           0 :                 object->trusted_dc_name = NULL;
   17617             :                 {
   17618           0 :                         const char *test_str;
   17619           0 :                         const char *talloc_str;
   17620           0 :                         PyObject *unicode = NULL;
   17621           0 :                         if (PyUnicode_Check(value)) {
   17622           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17623           0 :                                 if (unicode == NULL) {
   17624           0 :                                         PyErr_NoMemory();
   17625           0 :                                         return -1;
   17626             :                                 }
   17627           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17628           0 :                         } else if (PyBytes_Check(value)) {
   17629           0 :                                 test_str = PyBytes_AS_STRING(value);
   17630             :                         } else {
   17631           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17632           0 :                                 return -1;
   17633             :                         }
   17634           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17635           0 :                         if (unicode != NULL) {
   17636           0 :                                 Py_DECREF(unicode);
   17637             :                         }
   17638           0 :                         if (talloc_str == NULL) {
   17639           0 :                                 PyErr_NoMemory();
   17640           0 :                                 return -1;
   17641             :                         }
   17642           0 :                         object->trusted_dc_name = talloc_str;
   17643             :                 }
   17644             :         }
   17645           0 :         return 0;
   17646             : }
   17647             : 
   17648           0 : static PyObject *py_netr_NETLOGON_INFO_4_get_trusted_domain_name(PyObject *obj, void *closure)
   17649             : {
   17650           0 :         struct netr_NETLOGON_INFO_4 *object = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(obj);
   17651           0 :         PyObject *py_trusted_domain_name;
   17652           0 :         if (object->trusted_domain_name == NULL) {
   17653           0 :                 Py_RETURN_NONE;
   17654             :         }
   17655           0 :         if (object->trusted_domain_name == NULL) {
   17656           0 :                 py_trusted_domain_name = Py_None;
   17657           0 :                 Py_INCREF(py_trusted_domain_name);
   17658             :         } else {
   17659           0 :                 if (object->trusted_domain_name == NULL) {
   17660           0 :                         py_trusted_domain_name = Py_None;
   17661           0 :                         Py_INCREF(py_trusted_domain_name);
   17662             :                 } else {
   17663           0 :                         py_trusted_domain_name = PyUnicode_Decode(object->trusted_domain_name, strlen(object->trusted_domain_name), "utf-8", "ignore");
   17664             :                 }
   17665             :         }
   17666           0 :         return py_trusted_domain_name;
   17667             : }
   17668             : 
   17669           0 : static int py_netr_NETLOGON_INFO_4_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   17670             : {
   17671           0 :         struct netr_NETLOGON_INFO_4 *object = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(py_obj);
   17672           0 :         if (value == NULL) {
   17673           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_domain_name");
   17674           0 :                 return -1;
   17675             :         }
   17676           0 :         if (value == Py_None) {
   17677           0 :                 object->trusted_domain_name = NULL;
   17678             :         } else {
   17679           0 :                 object->trusted_domain_name = NULL;
   17680             :                 {
   17681           0 :                         const char *test_str;
   17682           0 :                         const char *talloc_str;
   17683           0 :                         PyObject *unicode = NULL;
   17684           0 :                         if (PyUnicode_Check(value)) {
   17685           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17686           0 :                                 if (unicode == NULL) {
   17687           0 :                                         PyErr_NoMemory();
   17688           0 :                                         return -1;
   17689             :                                 }
   17690           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17691           0 :                         } else if (PyBytes_Check(value)) {
   17692           0 :                                 test_str = PyBytes_AS_STRING(value);
   17693             :                         } else {
   17694           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17695           0 :                                 return -1;
   17696             :                         }
   17697           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17698           0 :                         if (unicode != NULL) {
   17699           0 :                                 Py_DECREF(unicode);
   17700             :                         }
   17701           0 :                         if (talloc_str == NULL) {
   17702           0 :                                 PyErr_NoMemory();
   17703           0 :                                 return -1;
   17704             :                         }
   17705           0 :                         object->trusted_domain_name = talloc_str;
   17706             :                 }
   17707             :         }
   17708           0 :         return 0;
   17709             : }
   17710             : 
   17711             : static PyGetSetDef py_netr_NETLOGON_INFO_4_getsetters[] = {
   17712             :         {
   17713             :                 .name = discard_const_p(char, "trusted_dc_name"),
   17714             :                 .get = py_netr_NETLOGON_INFO_4_get_trusted_dc_name,
   17715             :                 .set = py_netr_NETLOGON_INFO_4_set_trusted_dc_name,
   17716             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17717             :         },
   17718             :         {
   17719             :                 .name = discard_const_p(char, "trusted_domain_name"),
   17720             :                 .get = py_netr_NETLOGON_INFO_4_get_trusted_domain_name,
   17721             :                 .set = py_netr_NETLOGON_INFO_4_set_trusted_domain_name,
   17722             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17723             :         },
   17724             :         { .name = NULL }
   17725             : };
   17726             : 
   17727           0 : static PyObject *py_netr_NETLOGON_INFO_4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17728             : {
   17729           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_4, type);
   17730             : }
   17731             : 
   17732             : 
   17733             : static PyTypeObject netr_NETLOGON_INFO_4_Type = {
   17734             :         PyVarObject_HEAD_INIT(NULL, 0)
   17735             :         .tp_name = "netlogon.netr_NETLOGON_INFO_4",
   17736             :         .tp_getset = py_netr_NETLOGON_INFO_4_getsetters,
   17737             :         .tp_methods = NULL,
   17738             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17739             :         .tp_new = py_netr_NETLOGON_INFO_4_new,
   17740             : };
   17741             : 
   17742          81 : static PyObject *py_import_netr_CONTROL_QUERY_INFORMATION(TALLOC_CTX *mem_ctx, int level, union netr_CONTROL_QUERY_INFORMATION *in)
   17743             : {
   17744           0 :         PyObject *ret;
   17745             : 
   17746          81 :         switch (level) {
   17747           0 :                 case 1:
   17748           0 :                         if (in->info1 == NULL) {
   17749           0 :                                 ret = Py_None;
   17750           0 :                                 Py_INCREF(ret);
   17751             :                         } else {
   17752           0 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_1_Type, in->info1, in->info1);
   17753             :                         }
   17754           0 :                         return ret;
   17755             : 
   17756          81 :                 case 2:
   17757          81 :                         if (in->info2 == NULL) {
   17758           0 :                                 ret = Py_None;
   17759           0 :                                 Py_INCREF(ret);
   17760             :                         } else {
   17761          81 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_2_Type, in->info2, in->info2);
   17762             :                         }
   17763          81 :                         return ret;
   17764             : 
   17765           0 :                 case 3:
   17766           0 :                         if (in->info3 == NULL) {
   17767           0 :                                 ret = Py_None;
   17768           0 :                                 Py_INCREF(ret);
   17769             :                         } else {
   17770           0 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_3_Type, in->info3, in->info3);
   17771             :                         }
   17772           0 :                         return ret;
   17773             : 
   17774           0 :                 case 4:
   17775           0 :                         if (in->info4 == NULL) {
   17776           0 :                                 ret = Py_None;
   17777           0 :                                 Py_INCREF(ret);
   17778             :                         } else {
   17779           0 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_4_Type, in->info4, in->info4);
   17780             :                         }
   17781           0 :                         return ret;
   17782             : 
   17783           0 :                 default:
   17784           0 :                         ret = Py_None;
   17785           0 :                         Py_INCREF(ret);
   17786           0 :                         return ret;
   17787             : 
   17788             :         }
   17789             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   17790             :         return NULL;
   17791             : }
   17792             : 
   17793           0 : static union netr_CONTROL_QUERY_INFORMATION *py_export_netr_CONTROL_QUERY_INFORMATION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   17794             : {
   17795           0 :         union netr_CONTROL_QUERY_INFORMATION *ret = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   17796           0 :         switch (level) {
   17797           0 :                 case 1:
   17798           0 :                         if (in == NULL) {
   17799           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
   17800           0 :                                 talloc_free(ret); return NULL;
   17801             :                         }
   17802           0 :                         if (in == Py_None) {
   17803           0 :                                 ret->info1 = NULL;
   17804             :                         } else {
   17805           0 :                                 ret->info1 = NULL;
   17806           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_1_Type, in, talloc_free(ret); return NULL;);
   17807           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17808           0 :                                         PyErr_NoMemory();
   17809           0 :                                         talloc_free(ret); return NULL;
   17810             :                                 }
   17811           0 :                                 ret->info1 = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(in);
   17812             :                         }
   17813           0 :                         break;
   17814             : 
   17815           0 :                 case 2:
   17816           0 :                         if (in == NULL) {
   17817           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info2");
   17818           0 :                                 talloc_free(ret); return NULL;
   17819             :                         }
   17820           0 :                         if (in == Py_None) {
   17821           0 :                                 ret->info2 = NULL;
   17822             :                         } else {
   17823           0 :                                 ret->info2 = NULL;
   17824           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_2_Type, in, talloc_free(ret); return NULL;);
   17825           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17826           0 :                                         PyErr_NoMemory();
   17827           0 :                                         talloc_free(ret); return NULL;
   17828             :                                 }
   17829           0 :                                 ret->info2 = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(in);
   17830             :                         }
   17831           0 :                         break;
   17832             : 
   17833           0 :                 case 3:
   17834           0 :                         if (in == NULL) {
   17835           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info3");
   17836           0 :                                 talloc_free(ret); return NULL;
   17837             :                         }
   17838           0 :                         if (in == Py_None) {
   17839           0 :                                 ret->info3 = NULL;
   17840             :                         } else {
   17841           0 :                                 ret->info3 = NULL;
   17842           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_3_Type, in, talloc_free(ret); return NULL;);
   17843           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17844           0 :                                         PyErr_NoMemory();
   17845           0 :                                         talloc_free(ret); return NULL;
   17846             :                                 }
   17847           0 :                                 ret->info3 = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(in);
   17848             :                         }
   17849           0 :                         break;
   17850             : 
   17851           0 :                 case 4:
   17852           0 :                         if (in == NULL) {
   17853           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info4");
   17854           0 :                                 talloc_free(ret); return NULL;
   17855             :                         }
   17856           0 :                         if (in == Py_None) {
   17857           0 :                                 ret->info4 = NULL;
   17858             :                         } else {
   17859           0 :                                 ret->info4 = NULL;
   17860           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_4_Type, in, talloc_free(ret); return NULL;);
   17861           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17862           0 :                                         PyErr_NoMemory();
   17863           0 :                                         talloc_free(ret); return NULL;
   17864             :                                 }
   17865           0 :                                 ret->info4 = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(in);
   17866             :                         }
   17867           0 :                         break;
   17868             : 
   17869           0 :                 default:
   17870           0 :                         break;
   17871             : 
   17872             :         }
   17873             : 
   17874           0 :         return ret;
   17875             : }
   17876             : 
   17877          81 : static PyObject *py_netr_CONTROL_QUERY_INFORMATION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17878             : {
   17879          81 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17880          81 :         PyObject *mem_ctx_obj = NULL;
   17881          81 :         TALLOC_CTX *mem_ctx = NULL;
   17882          81 :         int level = 0;
   17883          81 :         PyObject *in_obj = NULL;
   17884          81 :         union netr_CONTROL_QUERY_INFORMATION *in = NULL;
   17885             : 
   17886          81 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   17887             :                 discard_const_p(char *, kwnames),
   17888             :                 &mem_ctx_obj,
   17889             :                 &level,
   17890             :                 &in_obj)) {
   17891           0 :                 return NULL;
   17892             :         }
   17893          81 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17894          81 :         if (mem_ctx == NULL) {
   17895           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17896           0 :                 return NULL;
   17897             :         }
   17898          81 :         in = (union netr_CONTROL_QUERY_INFORMATION *)pytalloc_get_ptr(in_obj);
   17899          81 :         if (in == NULL) {
   17900           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_CONTROL_QUERY_INFORMATION!");
   17901           0 :                 return NULL;
   17902             :         }
   17903             : 
   17904          81 :         return py_import_netr_CONTROL_QUERY_INFORMATION(mem_ctx, level, in);
   17905             : }
   17906             : 
   17907           0 : static PyObject *py_netr_CONTROL_QUERY_INFORMATION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17908             : {
   17909           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17910           0 :         PyObject *mem_ctx_obj = NULL;
   17911           0 :         TALLOC_CTX *mem_ctx = NULL;
   17912           0 :         int level = 0;
   17913           0 :         PyObject *in = NULL;
   17914           0 :         union netr_CONTROL_QUERY_INFORMATION *out = NULL;
   17915             : 
   17916           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   17917             :                 discard_const_p(char *, kwnames),
   17918             :                 &mem_ctx_obj,
   17919             :                 &level,
   17920             :                 &in)) {
   17921           0 :                 return NULL;
   17922             :         }
   17923           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17924           0 :         if (mem_ctx == NULL) {
   17925           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17926           0 :                 return NULL;
   17927             :         }
   17928             : 
   17929           0 :         out = py_export_netr_CONTROL_QUERY_INFORMATION(mem_ctx, level, in);
   17930           0 :         if (out == NULL) {
   17931           0 :                 return NULL;
   17932             :         }
   17933             : 
   17934           0 :         return pytalloc_GenericObject_reference(out);
   17935             : }
   17936             : 
   17937             : static PyMethodDef py_netr_CONTROL_QUERY_INFORMATION_methods[] = {
   17938             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_QUERY_INFORMATION_import),
   17939             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17940             :                 "T.__import__(mem_ctx, level, in) => ret." },
   17941             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_QUERY_INFORMATION_export),
   17942             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17943             :                 "T.__export__(mem_ctx, level, in) => ret." },
   17944             :         { NULL, NULL, 0, NULL }
   17945             : };
   17946             : 
   17947           0 : static PyObject *py_netr_CONTROL_QUERY_INFORMATION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17948             : {
   17949           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   17950           0 :         return NULL;
   17951             : }
   17952             : 
   17953             : 
   17954             : static PyTypeObject netr_CONTROL_QUERY_INFORMATION_Type = {
   17955             :         PyVarObject_HEAD_INIT(NULL, 0)
   17956             :         .tp_name = "netlogon.netr_CONTROL_QUERY_INFORMATION",
   17957             :         .tp_getset = NULL,
   17958             :         .tp_methods = py_netr_CONTROL_QUERY_INFORMATION_methods,
   17959             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17960             :         .tp_new = py_netr_CONTROL_QUERY_INFORMATION_new,
   17961             : };
   17962             : 
   17963           0 : static PyObject *py_import_netr_CONTROL_DATA_INFORMATION(TALLOC_CTX *mem_ctx, int level, union netr_CONTROL_DATA_INFORMATION *in)
   17964             : {
   17965           0 :         PyObject *ret;
   17966             : 
   17967           0 :         switch (level) {
   17968           0 :                 case NETLOGON_CONTROL_REDISCOVER:
   17969           0 :                         if (in->domain == NULL) {
   17970           0 :                                 ret = Py_None;
   17971           0 :                                 Py_INCREF(ret);
   17972             :                         } else {
   17973           0 :                                 if (in->domain == NULL) {
   17974           0 :                                         ret = Py_None;
   17975           0 :                                         Py_INCREF(ret);
   17976             :                                 } else {
   17977           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17978             :                                 }
   17979             :                         }
   17980           0 :                         return ret;
   17981             : 
   17982           0 :                 case NETLOGON_CONTROL_TC_QUERY:
   17983           0 :                         if (in->domain == NULL) {
   17984           0 :                                 ret = Py_None;
   17985           0 :                                 Py_INCREF(ret);
   17986             :                         } else {
   17987           0 :                                 if (in->domain == NULL) {
   17988           0 :                                         ret = Py_None;
   17989           0 :                                         Py_INCREF(ret);
   17990             :                                 } else {
   17991           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17992             :                                 }
   17993             :                         }
   17994           0 :                         return ret;
   17995             : 
   17996           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
   17997           0 :                         if (in->domain == NULL) {
   17998           0 :                                 ret = Py_None;
   17999           0 :                                 Py_INCREF(ret);
   18000             :                         } else {
   18001           0 :                                 if (in->domain == NULL) {
   18002           0 :                                         ret = Py_None;
   18003           0 :                                         Py_INCREF(ret);
   18004             :                                 } else {
   18005           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   18006             :                                 }
   18007             :                         }
   18008           0 :                         return ret;
   18009             : 
   18010           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD:
   18011           0 :                         if (in->domain == NULL) {
   18012           0 :                                 ret = Py_None;
   18013           0 :                                 Py_INCREF(ret);
   18014             :                         } else {
   18015           0 :                                 if (in->domain == NULL) {
   18016           0 :                                         ret = Py_None;
   18017           0 :                                         Py_INCREF(ret);
   18018             :                                 } else {
   18019           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   18020             :                                 }
   18021             :                         }
   18022           0 :                         return ret;
   18023             : 
   18024           0 :                 case NETLOGON_CONTROL_TC_VERIFY:
   18025           0 :                         if (in->domain == NULL) {
   18026           0 :                                 ret = Py_None;
   18027           0 :                                 Py_INCREF(ret);
   18028             :                         } else {
   18029           0 :                                 if (in->domain == NULL) {
   18030           0 :                                         ret = Py_None;
   18031           0 :                                         Py_INCREF(ret);
   18032             :                                 } else {
   18033           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   18034             :                                 }
   18035             :                         }
   18036           0 :                         return ret;
   18037             : 
   18038           0 :                 case NETLOGON_CONTROL_FIND_USER:
   18039           0 :                         if (in->user == NULL) {
   18040           0 :                                 ret = Py_None;
   18041           0 :                                 Py_INCREF(ret);
   18042             :                         } else {
   18043           0 :                                 if (in->user == NULL) {
   18044           0 :                                         ret = Py_None;
   18045           0 :                                         Py_INCREF(ret);
   18046             :                                 } else {
   18047           0 :                                         ret = PyUnicode_Decode(in->user, strlen(in->user), "utf-8", "ignore");
   18048             :                                 }
   18049             :                         }
   18050           0 :                         return ret;
   18051             : 
   18052           0 :                 case NETLOGON_CONTROL_SET_DBFLAG:
   18053           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->debug_level);
   18054           0 :                         return ret;
   18055             : 
   18056           0 :                 default:
   18057           0 :                         ret = Py_None;
   18058           0 :                         Py_INCREF(ret);
   18059           0 :                         return ret;
   18060             : 
   18061             :         }
   18062             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   18063             :         return NULL;
   18064             : }
   18065             : 
   18066          81 : static union netr_CONTROL_DATA_INFORMATION *py_export_netr_CONTROL_DATA_INFORMATION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   18067             : {
   18068          81 :         union netr_CONTROL_DATA_INFORMATION *ret = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   18069          81 :         switch (level) {
   18070          28 :                 case NETLOGON_CONTROL_REDISCOVER:
   18071          28 :                         if (in == NULL) {
   18072           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   18073           0 :                                 talloc_free(ret); return NULL;
   18074             :                         }
   18075          28 :                         if (in == Py_None) {
   18076           0 :                                 ret->domain = NULL;
   18077             :                         } else {
   18078          28 :                                 ret->domain = NULL;
   18079             :                                 {
   18080           0 :                                         const char *test_str;
   18081           0 :                                         const char *talloc_str;
   18082          28 :                                         PyObject *unicode = NULL;
   18083          28 :                                         if (PyUnicode_Check(in)) {
   18084          28 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18085          28 :                                                 if (unicode == NULL) {
   18086           0 :                                                         PyErr_NoMemory();
   18087           0 :                                                         talloc_free(ret); return NULL;
   18088             :                                                 }
   18089          28 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18090           0 :                                         } else if (PyBytes_Check(in)) {
   18091           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18092             :                                         } else {
   18093           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18094           0 :                                                 talloc_free(ret); return NULL;
   18095             :                                         }
   18096          28 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18097          28 :                                         if (unicode != NULL) {
   18098          28 :                                                 Py_DECREF(unicode);
   18099             :                                         }
   18100          28 :                                         if (talloc_str == NULL) {
   18101           0 :                                                 PyErr_NoMemory();
   18102           0 :                                                 talloc_free(ret); return NULL;
   18103             :                                         }
   18104          28 :                                         ret->domain = talloc_str;
   18105             :                                 }
   18106             :                         }
   18107          28 :                         break;
   18108             : 
   18109           0 :                 case NETLOGON_CONTROL_TC_QUERY:
   18110           0 :                         if (in == NULL) {
   18111           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   18112           0 :                                 talloc_free(ret); return NULL;
   18113             :                         }
   18114           0 :                         if (in == Py_None) {
   18115           0 :                                 ret->domain = NULL;
   18116             :                         } else {
   18117           0 :                                 ret->domain = NULL;
   18118             :                                 {
   18119           0 :                                         const char *test_str;
   18120           0 :                                         const char *talloc_str;
   18121           0 :                                         PyObject *unicode = NULL;
   18122           0 :                                         if (PyUnicode_Check(in)) {
   18123           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18124           0 :                                                 if (unicode == NULL) {
   18125           0 :                                                         PyErr_NoMemory();
   18126           0 :                                                         talloc_free(ret); return NULL;
   18127             :                                                 }
   18128           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18129           0 :                                         } else if (PyBytes_Check(in)) {
   18130           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18131             :                                         } else {
   18132           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18133           0 :                                                 talloc_free(ret); return NULL;
   18134             :                                         }
   18135           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18136           0 :                                         if (unicode != NULL) {
   18137           0 :                                                 Py_DECREF(unicode);
   18138             :                                         }
   18139           0 :                                         if (talloc_str == NULL) {
   18140           0 :                                                 PyErr_NoMemory();
   18141           0 :                                                 talloc_free(ret); return NULL;
   18142             :                                         }
   18143           0 :                                         ret->domain = talloc_str;
   18144             :                                 }
   18145             :                         }
   18146           0 :                         break;
   18147             : 
   18148           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
   18149           0 :                         if (in == NULL) {
   18150           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   18151           0 :                                 talloc_free(ret); return NULL;
   18152             :                         }
   18153           0 :                         if (in == Py_None) {
   18154           0 :                                 ret->domain = NULL;
   18155             :                         } else {
   18156           0 :                                 ret->domain = NULL;
   18157             :                                 {
   18158           0 :                                         const char *test_str;
   18159           0 :                                         const char *talloc_str;
   18160           0 :                                         PyObject *unicode = NULL;
   18161           0 :                                         if (PyUnicode_Check(in)) {
   18162           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18163           0 :                                                 if (unicode == NULL) {
   18164           0 :                                                         PyErr_NoMemory();
   18165           0 :                                                         talloc_free(ret); return NULL;
   18166             :                                                 }
   18167           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18168           0 :                                         } else if (PyBytes_Check(in)) {
   18169           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18170             :                                         } else {
   18171           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18172           0 :                                                 talloc_free(ret); return NULL;
   18173             :                                         }
   18174           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18175           0 :                                         if (unicode != NULL) {
   18176           0 :                                                 Py_DECREF(unicode);
   18177             :                                         }
   18178           0 :                                         if (talloc_str == NULL) {
   18179           0 :                                                 PyErr_NoMemory();
   18180           0 :                                                 talloc_free(ret); return NULL;
   18181             :                                         }
   18182           0 :                                         ret->domain = talloc_str;
   18183             :                                 }
   18184             :                         }
   18185           0 :                         break;
   18186             : 
   18187           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD:
   18188           0 :                         if (in == NULL) {
   18189           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   18190           0 :                                 talloc_free(ret); return NULL;
   18191             :                         }
   18192           0 :                         if (in == Py_None) {
   18193           0 :                                 ret->domain = NULL;
   18194             :                         } else {
   18195           0 :                                 ret->domain = NULL;
   18196             :                                 {
   18197           0 :                                         const char *test_str;
   18198           0 :                                         const char *talloc_str;
   18199           0 :                                         PyObject *unicode = NULL;
   18200           0 :                                         if (PyUnicode_Check(in)) {
   18201           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18202           0 :                                                 if (unicode == NULL) {
   18203           0 :                                                         PyErr_NoMemory();
   18204           0 :                                                         talloc_free(ret); return NULL;
   18205             :                                                 }
   18206           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18207           0 :                                         } else if (PyBytes_Check(in)) {
   18208           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18209             :                                         } else {
   18210           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18211           0 :                                                 talloc_free(ret); return NULL;
   18212             :                                         }
   18213           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18214           0 :                                         if (unicode != NULL) {
   18215           0 :                                                 Py_DECREF(unicode);
   18216             :                                         }
   18217           0 :                                         if (talloc_str == NULL) {
   18218           0 :                                                 PyErr_NoMemory();
   18219           0 :                                                 talloc_free(ret); return NULL;
   18220             :                                         }
   18221           0 :                                         ret->domain = talloc_str;
   18222             :                                 }
   18223             :                         }
   18224           0 :                         break;
   18225             : 
   18226          53 :                 case NETLOGON_CONTROL_TC_VERIFY:
   18227          53 :                         if (in == NULL) {
   18228           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   18229           0 :                                 talloc_free(ret); return NULL;
   18230             :                         }
   18231          53 :                         if (in == Py_None) {
   18232           0 :                                 ret->domain = NULL;
   18233             :                         } else {
   18234          53 :                                 ret->domain = NULL;
   18235             :                                 {
   18236           0 :                                         const char *test_str;
   18237           0 :                                         const char *talloc_str;
   18238          53 :                                         PyObject *unicode = NULL;
   18239          53 :                                         if (PyUnicode_Check(in)) {
   18240          53 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18241          53 :                                                 if (unicode == NULL) {
   18242           0 :                                                         PyErr_NoMemory();
   18243           0 :                                                         talloc_free(ret); return NULL;
   18244             :                                                 }
   18245          53 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18246           0 :                                         } else if (PyBytes_Check(in)) {
   18247           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18248             :                                         } else {
   18249           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18250           0 :                                                 talloc_free(ret); return NULL;
   18251             :                                         }
   18252          53 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18253          53 :                                         if (unicode != NULL) {
   18254          53 :                                                 Py_DECREF(unicode);
   18255             :                                         }
   18256          53 :                                         if (talloc_str == NULL) {
   18257           0 :                                                 PyErr_NoMemory();
   18258           0 :                                                 talloc_free(ret); return NULL;
   18259             :                                         }
   18260          53 :                                         ret->domain = talloc_str;
   18261             :                                 }
   18262             :                         }
   18263          53 :                         break;
   18264             : 
   18265           0 :                 case NETLOGON_CONTROL_FIND_USER:
   18266           0 :                         if (in == NULL) {
   18267           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->user");
   18268           0 :                                 talloc_free(ret); return NULL;
   18269             :                         }
   18270           0 :                         if (in == Py_None) {
   18271           0 :                                 ret->user = NULL;
   18272             :                         } else {
   18273           0 :                                 ret->user = NULL;
   18274             :                                 {
   18275           0 :                                         const char *test_str;
   18276           0 :                                         const char *talloc_str;
   18277           0 :                                         PyObject *unicode = NULL;
   18278           0 :                                         if (PyUnicode_Check(in)) {
   18279           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18280           0 :                                                 if (unicode == NULL) {
   18281           0 :                                                         PyErr_NoMemory();
   18282           0 :                                                         talloc_free(ret); return NULL;
   18283             :                                                 }
   18284           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18285           0 :                                         } else if (PyBytes_Check(in)) {
   18286           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18287             :                                         } else {
   18288           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18289           0 :                                                 talloc_free(ret); return NULL;
   18290             :                                         }
   18291           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18292           0 :                                         if (unicode != NULL) {
   18293           0 :                                                 Py_DECREF(unicode);
   18294             :                                         }
   18295           0 :                                         if (talloc_str == NULL) {
   18296           0 :                                                 PyErr_NoMemory();
   18297           0 :                                                 talloc_free(ret); return NULL;
   18298             :                                         }
   18299           0 :                                         ret->user = talloc_str;
   18300             :                                 }
   18301             :                         }
   18302           0 :                         break;
   18303             : 
   18304           0 :                 case NETLOGON_CONTROL_SET_DBFLAG:
   18305           0 :                         if (in == NULL) {
   18306           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->debug_level");
   18307           0 :                                 talloc_free(ret); return NULL;
   18308             :                         }
   18309             :                         {
   18310           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->debug_level));
   18311           0 :                                 if (PyLong_Check(in)) {
   18312           0 :                                         unsigned long long test_var;
   18313           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   18314           0 :                                         if (PyErr_Occurred() != NULL) {
   18315           0 :                                                 talloc_free(ret); return NULL;
   18316             :                                         }
   18317           0 :                                         if (test_var > uint_max) {
   18318           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18319             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   18320           0 :                                                 talloc_free(ret); return NULL;
   18321             :                                         }
   18322           0 :                                         ret->debug_level = test_var;
   18323             :                                 } else {
   18324           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18325             :                                           PyLong_Type.tp_name);
   18326           0 :                                         talloc_free(ret); return NULL;
   18327             :                                 }
   18328             :                         }
   18329           0 :                         break;
   18330             : 
   18331           0 :                 default:
   18332           0 :                         break;
   18333             : 
   18334             :         }
   18335             : 
   18336          81 :         return ret;
   18337             : }
   18338             : 
   18339           0 : static PyObject *py_netr_CONTROL_DATA_INFORMATION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18340             : {
   18341           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18342           0 :         PyObject *mem_ctx_obj = NULL;
   18343           0 :         TALLOC_CTX *mem_ctx = NULL;
   18344           0 :         int level = 0;
   18345           0 :         PyObject *in_obj = NULL;
   18346           0 :         union netr_CONTROL_DATA_INFORMATION *in = NULL;
   18347             : 
   18348           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   18349             :                 discard_const_p(char *, kwnames),
   18350             :                 &mem_ctx_obj,
   18351             :                 &level,
   18352             :                 &in_obj)) {
   18353           0 :                 return NULL;
   18354             :         }
   18355           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18356           0 :         if (mem_ctx == NULL) {
   18357           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18358           0 :                 return NULL;
   18359             :         }
   18360           0 :         in = (union netr_CONTROL_DATA_INFORMATION *)pytalloc_get_ptr(in_obj);
   18361           0 :         if (in == NULL) {
   18362           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_CONTROL_DATA_INFORMATION!");
   18363           0 :                 return NULL;
   18364             :         }
   18365             : 
   18366           0 :         return py_import_netr_CONTROL_DATA_INFORMATION(mem_ctx, level, in);
   18367             : }
   18368             : 
   18369          81 : static PyObject *py_netr_CONTROL_DATA_INFORMATION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18370             : {
   18371          81 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18372          81 :         PyObject *mem_ctx_obj = NULL;
   18373          81 :         TALLOC_CTX *mem_ctx = NULL;
   18374          81 :         int level = 0;
   18375          81 :         PyObject *in = NULL;
   18376          81 :         union netr_CONTROL_DATA_INFORMATION *out = NULL;
   18377             : 
   18378          81 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   18379             :                 discard_const_p(char *, kwnames),
   18380             :                 &mem_ctx_obj,
   18381             :                 &level,
   18382             :                 &in)) {
   18383           0 :                 return NULL;
   18384             :         }
   18385          81 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18386          81 :         if (mem_ctx == NULL) {
   18387           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18388           0 :                 return NULL;
   18389             :         }
   18390             : 
   18391          81 :         out = py_export_netr_CONTROL_DATA_INFORMATION(mem_ctx, level, in);
   18392          81 :         if (out == NULL) {
   18393           0 :                 return NULL;
   18394             :         }
   18395             : 
   18396          81 :         return pytalloc_GenericObject_reference(out);
   18397             : }
   18398             : 
   18399             : static PyMethodDef py_netr_CONTROL_DATA_INFORMATION_methods[] = {
   18400             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_DATA_INFORMATION_import),
   18401             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18402             :                 "T.__import__(mem_ctx, level, in) => ret." },
   18403             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_DATA_INFORMATION_export),
   18404             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18405             :                 "T.__export__(mem_ctx, level, in) => ret." },
   18406             :         { NULL, NULL, 0, NULL }
   18407             : };
   18408             : 
   18409           0 : static PyObject *py_netr_CONTROL_DATA_INFORMATION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18410             : {
   18411           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   18412           0 :         return NULL;
   18413             : }
   18414             : 
   18415             : 
   18416             : static PyTypeObject netr_CONTROL_DATA_INFORMATION_Type = {
   18417             :         PyVarObject_HEAD_INIT(NULL, 0)
   18418             :         .tp_name = "netlogon.netr_CONTROL_DATA_INFORMATION",
   18419             :         .tp_getset = NULL,
   18420             :         .tp_methods = py_netr_CONTROL_DATA_INFORMATION_methods,
   18421             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18422             :         .tp_new = py_netr_CONTROL_DATA_INFORMATION_new,
   18423             : };
   18424             : 
   18425           0 : static PyObject *py_import_netr_ChangeLogObject(TALLOC_CTX *mem_ctx, int level, union netr_ChangeLogObject *in)
   18426             : {
   18427           0 :         PyObject *ret;
   18428             : 
   18429           0 :         switch (level) {
   18430           0 :                 case NETR_CHANGELOG_SID_INCLUDED:
   18431           0 :                         ret = pytalloc_reference_ex(dom_sid_Type, mem_ctx, &in->object_sid);
   18432           0 :                         return ret;
   18433             : 
   18434           0 :                 case NETR_CHANGELOG_NAME_INCLUDED:
   18435           0 :                         ret = PyString_FromStringOrNULL(in->object_name);
   18436           0 :                         return ret;
   18437             : 
   18438           0 :                 default:
   18439           0 :                         ret = Py_None;
   18440           0 :                         Py_INCREF(ret);
   18441           0 :                         return ret;
   18442             : 
   18443             :         }
   18444             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   18445             :         return NULL;
   18446             : }
   18447             : 
   18448           0 : static union netr_ChangeLogObject *py_export_netr_ChangeLogObject(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   18449             : {
   18450           0 :         union netr_ChangeLogObject *ret = talloc_zero(mem_ctx, union netr_ChangeLogObject);
   18451           0 :         switch (level) {
   18452           0 :                 case NETR_CHANGELOG_SID_INCLUDED:
   18453           0 :                         if (in == NULL) {
   18454           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->object_sid");
   18455           0 :                                 talloc_free(ret); return NULL;
   18456             :                         }
   18457           0 :                         PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   18458           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   18459           0 :                                 PyErr_NoMemory();
   18460           0 :                                 talloc_free(ret); return NULL;
   18461             :                         }
   18462           0 :                         ret->object_sid = *(struct dom_sid *)pytalloc_get_ptr(in);
   18463           0 :                         break;
   18464             : 
   18465           0 :                 case NETR_CHANGELOG_NAME_INCLUDED:
   18466           0 :                         if (in == NULL) {
   18467           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->object_name");
   18468           0 :                                 talloc_free(ret); return NULL;
   18469             :                         }
   18470             :                         {
   18471           0 :                                 const char *test_str;
   18472           0 :                                 const char *talloc_str;
   18473           0 :                                 PyObject *unicode = NULL;
   18474           0 :                                 if (PyUnicode_Check(in)) {
   18475           0 :                                         unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18476           0 :                                         if (unicode == NULL) {
   18477           0 :                                                 PyErr_NoMemory();
   18478           0 :                                                 talloc_free(ret); return NULL;
   18479             :                                         }
   18480           0 :                                         test_str = PyBytes_AS_STRING(unicode);
   18481           0 :                                 } else if (PyBytes_Check(in)) {
   18482           0 :                                         test_str = PyBytes_AS_STRING(in);
   18483             :                                 } else {
   18484           0 :                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18485           0 :                                         talloc_free(ret); return NULL;
   18486             :                                 }
   18487           0 :                                 talloc_str = talloc_strdup(mem_ctx, test_str);
   18488           0 :                                 if (unicode != NULL) {
   18489           0 :                                         Py_DECREF(unicode);
   18490             :                                 }
   18491           0 :                                 if (talloc_str == NULL) {
   18492           0 :                                         PyErr_NoMemory();
   18493           0 :                                         talloc_free(ret); return NULL;
   18494             :                                 }
   18495           0 :                                 ret->object_name = talloc_str;
   18496             :                         }
   18497           0 :                         break;
   18498             : 
   18499           0 :                 default:
   18500           0 :                         break;
   18501             : 
   18502             :         }
   18503             : 
   18504           0 :         return ret;
   18505             : }
   18506             : 
   18507           0 : static PyObject *py_netr_ChangeLogObject_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18508             : {
   18509           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18510           0 :         PyObject *mem_ctx_obj = NULL;
   18511           0 :         TALLOC_CTX *mem_ctx = NULL;
   18512           0 :         int level = 0;
   18513           0 :         PyObject *in_obj = NULL;
   18514           0 :         union netr_ChangeLogObject *in = NULL;
   18515             : 
   18516           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   18517             :                 discard_const_p(char *, kwnames),
   18518             :                 &mem_ctx_obj,
   18519             :                 &level,
   18520             :                 &in_obj)) {
   18521           0 :                 return NULL;
   18522             :         }
   18523           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18524           0 :         if (mem_ctx == NULL) {
   18525           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18526           0 :                 return NULL;
   18527             :         }
   18528           0 :         in = (union netr_ChangeLogObject *)pytalloc_get_ptr(in_obj);
   18529           0 :         if (in == NULL) {
   18530           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_ChangeLogObject!");
   18531           0 :                 return NULL;
   18532             :         }
   18533             : 
   18534           0 :         return py_import_netr_ChangeLogObject(mem_ctx, level, in);
   18535             : }
   18536             : 
   18537           0 : static PyObject *py_netr_ChangeLogObject_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18538             : {
   18539           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18540           0 :         PyObject *mem_ctx_obj = NULL;
   18541           0 :         TALLOC_CTX *mem_ctx = NULL;
   18542           0 :         int level = 0;
   18543           0 :         PyObject *in = NULL;
   18544           0 :         union netr_ChangeLogObject *out = NULL;
   18545             : 
   18546           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   18547             :                 discard_const_p(char *, kwnames),
   18548             :                 &mem_ctx_obj,
   18549             :                 &level,
   18550             :                 &in)) {
   18551           0 :                 return NULL;
   18552             :         }
   18553           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18554           0 :         if (mem_ctx == NULL) {
   18555           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18556           0 :                 return NULL;
   18557             :         }
   18558             : 
   18559           0 :         out = py_export_netr_ChangeLogObject(mem_ctx, level, in);
   18560           0 :         if (out == NULL) {
   18561           0 :                 return NULL;
   18562             :         }
   18563             : 
   18564           0 :         return pytalloc_GenericObject_reference(out);
   18565             : }
   18566             : 
   18567             : static PyMethodDef py_netr_ChangeLogObject_methods[] = {
   18568             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogObject_import),
   18569             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18570             :                 "T.__import__(mem_ctx, level, in) => ret." },
   18571             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogObject_export),
   18572             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18573             :                 "T.__export__(mem_ctx, level, in) => ret." },
   18574             :         { NULL, NULL, 0, NULL }
   18575             : };
   18576             : 
   18577           0 : static PyObject *py_netr_ChangeLogObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18578             : {
   18579           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   18580           0 :         return NULL;
   18581             : }
   18582             : 
   18583             : 
   18584             : static PyTypeObject netr_ChangeLogObject_Type = {
   18585             :         PyVarObject_HEAD_INIT(NULL, 0)
   18586             :         .tp_name = "netlogon.netr_ChangeLogObject",
   18587             :         .tp_getset = NULL,
   18588             :         .tp_methods = py_netr_ChangeLogObject_methods,
   18589             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18590             :         .tp_new = py_netr_ChangeLogObject_new,
   18591             : };
   18592             : 
   18593             : 
   18594           0 : static PyObject *py_netr_ChangeLogEntry_get_serial_number1(PyObject *obj, void *closure)
   18595             : {
   18596           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18597           0 :         PyObject *py_serial_number1;
   18598           0 :         py_serial_number1 = PyLong_FromUnsignedLongLong((uint32_t)object->serial_number1);
   18599           0 :         return py_serial_number1;
   18600             : }
   18601             : 
   18602           0 : static int py_netr_ChangeLogEntry_set_serial_number1(PyObject *py_obj, PyObject *value, void *closure)
   18603             : {
   18604           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18605           0 :         if (value == NULL) {
   18606           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_number1");
   18607           0 :                 return -1;
   18608             :         }
   18609             :         {
   18610           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number1));
   18611           0 :                 if (PyLong_Check(value)) {
   18612           0 :                         unsigned long long test_var;
   18613           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18614           0 :                         if (PyErr_Occurred() != NULL) {
   18615           0 :                                 return -1;
   18616             :                         }
   18617           0 :                         if (test_var > uint_max) {
   18618           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18619             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18620           0 :                                 return -1;
   18621             :                         }
   18622           0 :                         object->serial_number1 = test_var;
   18623             :                 } else {
   18624           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18625             :                           PyLong_Type.tp_name);
   18626           0 :                         return -1;
   18627             :                 }
   18628             :         }
   18629           0 :         return 0;
   18630             : }
   18631             : 
   18632           0 : static PyObject *py_netr_ChangeLogEntry_get_serial_number2(PyObject *obj, void *closure)
   18633             : {
   18634           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18635           0 :         PyObject *py_serial_number2;
   18636           0 :         py_serial_number2 = PyLong_FromUnsignedLongLong((uint32_t)object->serial_number2);
   18637           0 :         return py_serial_number2;
   18638             : }
   18639             : 
   18640           0 : static int py_netr_ChangeLogEntry_set_serial_number2(PyObject *py_obj, PyObject *value, void *closure)
   18641             : {
   18642           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18643           0 :         if (value == NULL) {
   18644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_number2");
   18645           0 :                 return -1;
   18646             :         }
   18647             :         {
   18648           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number2));
   18649           0 :                 if (PyLong_Check(value)) {
   18650           0 :                         unsigned long long test_var;
   18651           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18652           0 :                         if (PyErr_Occurred() != NULL) {
   18653           0 :                                 return -1;
   18654             :                         }
   18655           0 :                         if (test_var > uint_max) {
   18656           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18657             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18658           0 :                                 return -1;
   18659             :                         }
   18660           0 :                         object->serial_number2 = test_var;
   18661             :                 } else {
   18662           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18663             :                           PyLong_Type.tp_name);
   18664           0 :                         return -1;
   18665             :                 }
   18666             :         }
   18667           0 :         return 0;
   18668             : }
   18669             : 
   18670           0 : static PyObject *py_netr_ChangeLogEntry_get_object_rid(PyObject *obj, void *closure)
   18671             : {
   18672           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18673           0 :         PyObject *py_object_rid;
   18674           0 :         py_object_rid = PyLong_FromUnsignedLongLong((uint32_t)object->object_rid);
   18675           0 :         return py_object_rid;
   18676             : }
   18677             : 
   18678           0 : static int py_netr_ChangeLogEntry_set_object_rid(PyObject *py_obj, PyObject *value, void *closure)
   18679             : {
   18680           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18681           0 :         if (value == NULL) {
   18682           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_rid");
   18683           0 :                 return -1;
   18684             :         }
   18685             :         {
   18686           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->object_rid));
   18687           0 :                 if (PyLong_Check(value)) {
   18688           0 :                         unsigned long long test_var;
   18689           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18690           0 :                         if (PyErr_Occurred() != NULL) {
   18691           0 :                                 return -1;
   18692             :                         }
   18693           0 :                         if (test_var > uint_max) {
   18694           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18695             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18696           0 :                                 return -1;
   18697             :                         }
   18698           0 :                         object->object_rid = test_var;
   18699             :                 } else {
   18700           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18701             :                           PyLong_Type.tp_name);
   18702           0 :                         return -1;
   18703             :                 }
   18704             :         }
   18705           0 :         return 0;
   18706             : }
   18707             : 
   18708           0 : static PyObject *py_netr_ChangeLogEntry_get_flags(PyObject *obj, void *closure)
   18709             : {
   18710           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18711           0 :         PyObject *py_flags;
   18712           0 :         py_flags = PyLong_FromLong((uint16_t)object->flags);
   18713           0 :         return py_flags;
   18714             : }
   18715             : 
   18716           0 : static int py_netr_ChangeLogEntry_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   18717             : {
   18718           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18719           0 :         if (value == NULL) {
   18720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   18721           0 :                 return -1;
   18722             :         }
   18723             :         {
   18724           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   18725           0 :                 if (PyLong_Check(value)) {
   18726           0 :                         unsigned long long test_var;
   18727           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18728           0 :                         if (PyErr_Occurred() != NULL) {
   18729           0 :                                 return -1;
   18730             :                         }
   18731           0 :                         if (test_var > uint_max) {
   18732           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18733             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18734           0 :                                 return -1;
   18735             :                         }
   18736           0 :                         object->flags = test_var;
   18737             :                 } else {
   18738           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18739             :                           PyLong_Type.tp_name);
   18740           0 :                         return -1;
   18741             :                 }
   18742             :         }
   18743           0 :         return 0;
   18744             : }
   18745             : 
   18746           0 : static PyObject *py_netr_ChangeLogEntry_get_db_index(PyObject *obj, void *closure)
   18747             : {
   18748           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18749           0 :         PyObject *py_db_index;
   18750           0 :         py_db_index = PyLong_FromLong((uint16_t)object->db_index);
   18751           0 :         return py_db_index;
   18752             : }
   18753             : 
   18754           0 : static int py_netr_ChangeLogEntry_set_db_index(PyObject *py_obj, PyObject *value, void *closure)
   18755             : {
   18756           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18757           0 :         if (value == NULL) {
   18758           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->db_index");
   18759           0 :                 return -1;
   18760             :         }
   18761             :         {
   18762           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->db_index));
   18763           0 :                 if (PyLong_Check(value)) {
   18764           0 :                         unsigned long long test_var;
   18765           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18766           0 :                         if (PyErr_Occurred() != NULL) {
   18767           0 :                                 return -1;
   18768             :                         }
   18769           0 :                         if (test_var > uint_max) {
   18770           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18771             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18772           0 :                                 return -1;
   18773             :                         }
   18774           0 :                         object->db_index = test_var;
   18775             :                 } else {
   18776           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18777             :                           PyLong_Type.tp_name);
   18778           0 :                         return -1;
   18779             :                 }
   18780             :         }
   18781           0 :         return 0;
   18782             : }
   18783             : 
   18784           0 : static PyObject *py_netr_ChangeLogEntry_get_delta_type(PyObject *obj, void *closure)
   18785             : {
   18786           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18787           0 :         PyObject *py_delta_type;
   18788           0 :         py_delta_type = PyLong_FromLong((uint16_t)object->delta_type);
   18789           0 :         return py_delta_type;
   18790             : }
   18791             : 
   18792           0 : static int py_netr_ChangeLogEntry_set_delta_type(PyObject *py_obj, PyObject *value, void *closure)
   18793             : {
   18794           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18795           0 :         if (value == NULL) {
   18796           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_type");
   18797           0 :                 return -1;
   18798             :         }
   18799             :         {
   18800           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->delta_type));
   18801           0 :                 if (PyLong_Check(value)) {
   18802           0 :                         unsigned long long test_var;
   18803           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18804           0 :                         if (PyErr_Occurred() != NULL) {
   18805           0 :                                 return -1;
   18806             :                         }
   18807           0 :                         if (test_var > uint_max) {
   18808           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18809             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18810           0 :                                 return -1;
   18811             :                         }
   18812           0 :                         object->delta_type = test_var;
   18813             :                 } else {
   18814           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18815             :                           PyLong_Type.tp_name);
   18816           0 :                         return -1;
   18817             :                 }
   18818             :         }
   18819           0 :         return 0;
   18820             : }
   18821             : 
   18822           0 : static PyObject *py_netr_ChangeLogEntry_get_object(PyObject *obj, void *closure)
   18823             : {
   18824           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18825           0 :         PyObject *py_object;
   18826           0 :         py_object = pyrpc_import_union(&netr_ChangeLogObject_Type, pytalloc_get_mem_ctx(obj), object->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED), &object->object, "union netr_ChangeLogObject");
   18827           0 :         if (py_object == NULL) {
   18828           0 :                 return NULL;
   18829             :         }
   18830           0 :         return py_object;
   18831             : }
   18832             : 
   18833           0 : static int py_netr_ChangeLogEntry_set_object(PyObject *py_obj, PyObject *value, void *closure)
   18834             : {
   18835           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18836           0 :         if (value == NULL) {
   18837           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object");
   18838           0 :                 return -1;
   18839             :         }
   18840             :         {
   18841           0 :                 union netr_ChangeLogObject *object_switch_0;
   18842           0 :                 object_switch_0 = (union netr_ChangeLogObject *)pyrpc_export_union(&netr_ChangeLogObject_Type, pytalloc_get_mem_ctx(py_obj), object->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED), value, "union netr_ChangeLogObject");
   18843           0 :                 if (object_switch_0 == NULL) {
   18844           0 :                         return -1;
   18845             :                 }
   18846           0 :                 object->object = *object_switch_0;
   18847             :         }
   18848           0 :         return 0;
   18849             : }
   18850             : 
   18851             : static PyGetSetDef py_netr_ChangeLogEntry_getsetters[] = {
   18852             :         {
   18853             :                 .name = discard_const_p(char, "serial_number1"),
   18854             :                 .get = py_netr_ChangeLogEntry_get_serial_number1,
   18855             :                 .set = py_netr_ChangeLogEntry_set_serial_number1,
   18856             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18857             :         },
   18858             :         {
   18859             :                 .name = discard_const_p(char, "serial_number2"),
   18860             :                 .get = py_netr_ChangeLogEntry_get_serial_number2,
   18861             :                 .set = py_netr_ChangeLogEntry_set_serial_number2,
   18862             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18863             :         },
   18864             :         {
   18865             :                 .name = discard_const_p(char, "object_rid"),
   18866             :                 .get = py_netr_ChangeLogEntry_get_object_rid,
   18867             :                 .set = py_netr_ChangeLogEntry_set_object_rid,
   18868             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18869             :         },
   18870             :         {
   18871             :                 .name = discard_const_p(char, "flags"),
   18872             :                 .get = py_netr_ChangeLogEntry_get_flags,
   18873             :                 .set = py_netr_ChangeLogEntry_set_flags,
   18874             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogFlags")
   18875             :         },
   18876             :         {
   18877             :                 .name = discard_const_p(char, "db_index"),
   18878             :                 .get = py_netr_ChangeLogEntry_get_db_index,
   18879             :                 .set = py_netr_ChangeLogEntry_set_db_index,
   18880             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID8Bit")
   18881             :         },
   18882             :         {
   18883             :                 .name = discard_const_p(char, "delta_type"),
   18884             :                 .get = py_netr_ChangeLogEntry_get_delta_type,
   18885             :                 .set = py_netr_ChangeLogEntry_set_delta_type,
   18886             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DeltaEnum8Bit")
   18887             :         },
   18888             :         {
   18889             :                 .name = discard_const_p(char, "object"),
   18890             :                 .get = py_netr_ChangeLogEntry_get_object,
   18891             :                 .set = py_netr_ChangeLogEntry_set_object,
   18892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogObject")
   18893             :         },
   18894             :         { .name = NULL }
   18895             : };
   18896             : 
   18897           0 : static PyObject *py_netr_ChangeLogEntry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18898             : {
   18899           0 :         return pytalloc_new(struct netr_ChangeLogEntry, type);
   18900             : }
   18901             : 
   18902           0 : static PyObject *py_netr_ChangeLogEntry_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   18903             : {
   18904           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18905           0 :         PyObject *ret = NULL;
   18906           0 :         DATA_BLOB blob;
   18907           0 :         enum ndr_err_code err;
   18908           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   18909           0 :         if (tmp_ctx == NULL) {
   18910           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   18911           0 :                 return NULL;
   18912             :         }
   18913           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
   18914           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18915           0 :                 TALLOC_FREE(tmp_ctx);
   18916           0 :                 PyErr_SetNdrError(err);
   18917           0 :                 return NULL;
   18918             :         }
   18919             : 
   18920           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   18921           0 :         TALLOC_FREE(tmp_ctx);
   18922           0 :         return ret;
   18923             : }
   18924             : 
   18925           0 : static PyObject *py_netr_ChangeLogEntry_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18926             : {
   18927           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18928           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   18929           0 :         Py_ssize_t blob_length = 0;
   18930           0 :         enum ndr_err_code err;
   18931           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   18932           0 :         PyObject *allow_remaining_obj = NULL;
   18933           0 :         bool allow_remaining = false;
   18934             : 
   18935           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   18936             :                 discard_const_p(char *, kwnames),
   18937             :                 &blob.data, &blob_length,
   18938             :                 &allow_remaining_obj)) {
   18939           0 :                 return NULL;
   18940             :         }
   18941           0 :         blob.length = blob_length;
   18942             : 
   18943           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   18944           0 :                 allow_remaining = true;
   18945             :         }
   18946             : 
   18947           0 :         if (allow_remaining) {
   18948           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_ChangeLogEntry);
   18949             :         } else {
   18950           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_ChangeLogEntry);
   18951             :         }
   18952           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18953           0 :                 PyErr_SetNdrError(err);
   18954           0 :                 return NULL;
   18955             :         }
   18956             : 
   18957           0 :         Py_RETURN_NONE;
   18958             : }
   18959             : 
   18960           0 : static PyObject *py_netr_ChangeLogEntry_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   18961             : {
   18962           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18963           0 :         PyObject *ret;
   18964           0 :         char *retstr;
   18965             : 
   18966           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_ChangeLogEntry, "netr_ChangeLogEntry", object);
   18967           0 :         ret = PyUnicode_FromString(retstr);
   18968           0 :         talloc_free(retstr);
   18969             : 
   18970           0 :         return ret;
   18971             : }
   18972             : 
   18973             : static PyMethodDef py_netr_ChangeLogEntry_methods[] = {
   18974             :         { "__ndr_pack__", (PyCFunction)py_netr_ChangeLogEntry_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   18975             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogEntry_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   18976             :         { "__ndr_print__", (PyCFunction)py_netr_ChangeLogEntry_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   18977             :         { NULL, NULL, 0, NULL }
   18978             : };
   18979             : 
   18980             : 
   18981             : static PyTypeObject netr_ChangeLogEntry_Type = {
   18982             :         PyVarObject_HEAD_INIT(NULL, 0)
   18983             :         .tp_name = "netlogon.netr_ChangeLogEntry",
   18984             :         .tp_getset = py_netr_ChangeLogEntry_getsetters,
   18985             :         .tp_methods = py_netr_ChangeLogEntry_methods,
   18986             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18987             :         .tp_new = py_netr_ChangeLogEntry_new,
   18988             : };
   18989             : 
   18990             : 
   18991           0 : static PyObject *py_netr_Blob_get_length(PyObject *obj, void *closure)
   18992             : {
   18993           0 :         struct netr_Blob *object = (struct netr_Blob *)pytalloc_get_ptr(obj);
   18994           0 :         PyObject *py_length;
   18995           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
   18996           0 :         return py_length;
   18997             : }
   18998             : 
   18999           0 : static int py_netr_Blob_set_length(PyObject *py_obj, PyObject *value, void *closure)
   19000             : {
   19001           0 :         struct netr_Blob *object = (struct netr_Blob *)pytalloc_get_ptr(py_obj);
   19002           0 :         if (value == NULL) {
   19003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   19004           0 :                 return -1;
   19005             :         }
   19006             :         {
   19007           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   19008           0 :                 if (PyLong_Check(value)) {
   19009           0 :                         unsigned long long test_var;
   19010           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19011           0 :                         if (PyErr_Occurred() != NULL) {
   19012           0 :                                 return -1;
   19013             :                         }
   19014           0 :                         if (test_var > uint_max) {
   19015           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19016             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19017           0 :                                 return -1;
   19018             :                         }
   19019           0 :                         object->length = test_var;
   19020             :                 } else {
   19021           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19022             :                           PyLong_Type.tp_name);
   19023           0 :                         return -1;
   19024             :                 }
   19025             :         }
   19026           0 :         return 0;
   19027             : }
   19028             : 
   19029           0 : static PyObject *py_netr_Blob_get_data(PyObject *obj, void *closure)
   19030             : {
   19031           0 :         struct netr_Blob *object = (struct netr_Blob *)pytalloc_get_ptr(obj);
   19032           0 :         PyObject *py_data;
   19033           0 :         if (object->data == NULL) {
   19034           0 :                 Py_RETURN_NONE;
   19035             :         }
   19036           0 :         if (object->data == NULL) {
   19037           0 :                 py_data = Py_None;
   19038           0 :                 Py_INCREF(py_data);
   19039             :         } else {
   19040           0 :                 py_data = PyList_New(object->length);
   19041           0 :                 if (py_data == NULL) {
   19042           0 :                         return NULL;
   19043             :                 }
   19044             :                 {
   19045             :                         int data_cntr_1;
   19046           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
   19047           0 :                                 PyObject *py_data_1;
   19048           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
   19049           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
   19050             :                         }
   19051             :                 }
   19052             :         }
   19053           0 :         return py_data;
   19054             : }
   19055             : 
   19056           0 : static int py_netr_Blob_set_data(PyObject *py_obj, PyObject *value, void *closure)
   19057             : {
   19058           0 :         struct netr_Blob *object = (struct netr_Blob *)pytalloc_get_ptr(py_obj);
   19059           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
   19060           0 :         if (value == NULL) {
   19061           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   19062           0 :                 return -1;
   19063             :         }
   19064           0 :         if (value == Py_None) {
   19065           0 :                 object->data = NULL;
   19066             :         } else {
   19067           0 :                 object->data = NULL;
   19068           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   19069             :                 {
   19070           0 :                         int data_cntr_1;
   19071           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
   19072           0 :                         if (!object->data) { return -1; }
   19073           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
   19074           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
   19075           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
   19076           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
   19077           0 :                                         return -1;
   19078             :                                 }
   19079             :                                 {
   19080           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
   19081           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
   19082           0 :                                                 unsigned long long test_var;
   19083           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
   19084           0 :                                                 if (PyErr_Occurred() != NULL) {
   19085           0 :                                                         return -1;
   19086             :                                                 }
   19087           0 :                                                 if (test_var > uint_max) {
   19088           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19089             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   19090           0 :                                                         return -1;
   19091             :                                                 }
   19092           0 :                                                 object->data[data_cntr_1] = test_var;
   19093             :                                         } else {
   19094           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   19095             :                                                   PyLong_Type.tp_name);
   19096           0 :                                                 return -1;
   19097             :                                         }
   19098             :                                 }
   19099             :                         }
   19100             :                 }
   19101             :         }
   19102           0 :         return 0;
   19103             : }
   19104             : 
   19105             : static PyGetSetDef py_netr_Blob_getsetters[] = {
   19106             :         {
   19107             :                 .name = discard_const_p(char, "length"),
   19108             :                 .get = py_netr_Blob_get_length,
   19109             :                 .set = py_netr_Blob_set_length,
   19110             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19111             :         },
   19112             :         {
   19113             :                 .name = discard_const_p(char, "data"),
   19114             :                 .get = py_netr_Blob_get_data,
   19115             :                 .set = py_netr_Blob_set_data,
   19116             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   19117             :         },
   19118             :         { .name = NULL }
   19119             : };
   19120             : 
   19121           0 : static PyObject *py_netr_Blob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19122             : {
   19123           0 :         return pytalloc_new(struct netr_Blob, type);
   19124             : }
   19125             : 
   19126             : 
   19127             : static PyTypeObject netr_Blob_Type = {
   19128             :         PyVarObject_HEAD_INIT(NULL, 0)
   19129             :         .tp_name = "netlogon.netr_Blob",
   19130             :         .tp_getset = py_netr_Blob_getsetters,
   19131             :         .tp_methods = NULL,
   19132             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19133             :         .tp_new = py_netr_Blob_new,
   19134             : };
   19135             : 
   19136             : 
   19137         228 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_unc(PyObject *obj, void *closure)
   19138             : {
   19139         228 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19140           4 :         PyObject *py_dc_unc;
   19141         228 :         if (object->dc_unc == NULL) {
   19142           0 :                 Py_RETURN_NONE;
   19143             :         }
   19144         228 :         if (object->dc_unc == NULL) {
   19145           0 :                 py_dc_unc = Py_None;
   19146           0 :                 Py_INCREF(py_dc_unc);
   19147             :         } else {
   19148         228 :                 if (object->dc_unc == NULL) {
   19149           0 :                         py_dc_unc = Py_None;
   19150           0 :                         Py_INCREF(py_dc_unc);
   19151             :                 } else {
   19152         228 :                         py_dc_unc = PyUnicode_Decode(object->dc_unc, strlen(object->dc_unc), "utf-8", "ignore");
   19153             :                 }
   19154             :         }
   19155         228 :         return py_dc_unc;
   19156             : }
   19157             : 
   19158           0 : static int py_netr_DsRGetDCNameInfo_set_dc_unc(PyObject *py_obj, PyObject *value, void *closure)
   19159             : {
   19160           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19161           0 :         if (value == NULL) {
   19162           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_unc");
   19163           0 :                 return -1;
   19164             :         }
   19165           0 :         if (value == Py_None) {
   19166           0 :                 object->dc_unc = NULL;
   19167             :         } else {
   19168           0 :                 object->dc_unc = NULL;
   19169             :                 {
   19170           0 :                         const char *test_str;
   19171           0 :                         const char *talloc_str;
   19172           0 :                         PyObject *unicode = NULL;
   19173           0 :                         if (PyUnicode_Check(value)) {
   19174           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19175           0 :                                 if (unicode == NULL) {
   19176           0 :                                         PyErr_NoMemory();
   19177           0 :                                         return -1;
   19178             :                                 }
   19179           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19180           0 :                         } else if (PyBytes_Check(value)) {
   19181           0 :                                 test_str = PyBytes_AS_STRING(value);
   19182             :                         } else {
   19183           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19184           0 :                                 return -1;
   19185             :                         }
   19186           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19187           0 :                         if (unicode != NULL) {
   19188           0 :                                 Py_DECREF(unicode);
   19189             :                         }
   19190           0 :                         if (talloc_str == NULL) {
   19191           0 :                                 PyErr_NoMemory();
   19192           0 :                                 return -1;
   19193             :                         }
   19194           0 :                         object->dc_unc = talloc_str;
   19195             :                 }
   19196             :         }
   19197           0 :         return 0;
   19198             : }
   19199             : 
   19200          60 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_address(PyObject *obj, void *closure)
   19201             : {
   19202          60 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19203           0 :         PyObject *py_dc_address;
   19204          60 :         if (object->dc_address == NULL) {
   19205           0 :                 Py_RETURN_NONE;
   19206             :         }
   19207          60 :         if (object->dc_address == NULL) {
   19208           0 :                 py_dc_address = Py_None;
   19209           0 :                 Py_INCREF(py_dc_address);
   19210             :         } else {
   19211          60 :                 if (object->dc_address == NULL) {
   19212           0 :                         py_dc_address = Py_None;
   19213           0 :                         Py_INCREF(py_dc_address);
   19214             :                 } else {
   19215          60 :                         py_dc_address = PyUnicode_Decode(object->dc_address, strlen(object->dc_address), "utf-8", "ignore");
   19216             :                 }
   19217             :         }
   19218          60 :         return py_dc_address;
   19219             : }
   19220             : 
   19221           0 : static int py_netr_DsRGetDCNameInfo_set_dc_address(PyObject *py_obj, PyObject *value, void *closure)
   19222             : {
   19223           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19224           0 :         if (value == NULL) {
   19225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_address");
   19226           0 :                 return -1;
   19227             :         }
   19228           0 :         if (value == Py_None) {
   19229           0 :                 object->dc_address = NULL;
   19230             :         } else {
   19231           0 :                 object->dc_address = NULL;
   19232             :                 {
   19233           0 :                         const char *test_str;
   19234           0 :                         const char *talloc_str;
   19235           0 :                         PyObject *unicode = NULL;
   19236           0 :                         if (PyUnicode_Check(value)) {
   19237           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19238           0 :                                 if (unicode == NULL) {
   19239           0 :                                         PyErr_NoMemory();
   19240           0 :                                         return -1;
   19241             :                                 }
   19242           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19243           0 :                         } else if (PyBytes_Check(value)) {
   19244           0 :                                 test_str = PyBytes_AS_STRING(value);
   19245             :                         } else {
   19246           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19247           0 :                                 return -1;
   19248             :                         }
   19249           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19250           0 :                         if (unicode != NULL) {
   19251           0 :                                 Py_DECREF(unicode);
   19252             :                         }
   19253           0 :                         if (talloc_str == NULL) {
   19254           0 :                                 PyErr_NoMemory();
   19255           0 :                                 return -1;
   19256             :                         }
   19257           0 :                         object->dc_address = talloc_str;
   19258             :                 }
   19259             :         }
   19260           0 :         return 0;
   19261             : }
   19262             : 
   19263           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_address_type(PyObject *obj, void *closure)
   19264             : {
   19265           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19266           0 :         PyObject *py_dc_address_type;
   19267           0 :         py_dc_address_type = PyLong_FromUnsignedLongLong((uint32_t)object->dc_address_type);
   19268           0 :         return py_dc_address_type;
   19269             : }
   19270             : 
   19271           0 : static int py_netr_DsRGetDCNameInfo_set_dc_address_type(PyObject *py_obj, PyObject *value, void *closure)
   19272             : {
   19273           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19274           0 :         if (value == NULL) {
   19275           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_address_type");
   19276           0 :                 return -1;
   19277             :         }
   19278             :         {
   19279           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dc_address_type));
   19280           0 :                 if (PyLong_Check(value)) {
   19281           0 :                         unsigned long long test_var;
   19282           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19283           0 :                         if (PyErr_Occurred() != NULL) {
   19284           0 :                                 return -1;
   19285             :                         }
   19286           0 :                         if (test_var > uint_max) {
   19287           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19288             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19289           0 :                                 return -1;
   19290             :                         }
   19291           0 :                         object->dc_address_type = test_var;
   19292             :                 } else {
   19293           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19294             :                           PyLong_Type.tp_name);
   19295           0 :                         return -1;
   19296             :                 }
   19297             :         }
   19298           0 :         return 0;
   19299             : }
   19300             : 
   19301           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_domain_guid(PyObject *obj, void *closure)
   19302             : {
   19303           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19304           0 :         PyObject *py_domain_guid;
   19305           0 :         py_domain_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->domain_guid);
   19306           0 :         return py_domain_guid;
   19307             : }
   19308             : 
   19309           0 : static int py_netr_DsRGetDCNameInfo_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   19310             : {
   19311           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19312           0 :         if (value == NULL) {
   19313           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_guid");
   19314           0 :                 return -1;
   19315             :         }
   19316           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   19317           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   19318           0 :                 PyErr_NoMemory();
   19319           0 :                 return -1;
   19320             :         }
   19321           0 :         object->domain_guid = *(struct GUID *)pytalloc_get_ptr(value);
   19322           0 :         return 0;
   19323             : }
   19324             : 
   19325         123 : static PyObject *py_netr_DsRGetDCNameInfo_get_domain_name(PyObject *obj, void *closure)
   19326             : {
   19327         123 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19328           2 :         PyObject *py_domain_name;
   19329         123 :         if (object->domain_name == NULL) {
   19330           0 :                 Py_RETURN_NONE;
   19331             :         }
   19332         123 :         if (object->domain_name == NULL) {
   19333           0 :                 py_domain_name = Py_None;
   19334           0 :                 Py_INCREF(py_domain_name);
   19335             :         } else {
   19336         123 :                 if (object->domain_name == NULL) {
   19337           0 :                         py_domain_name = Py_None;
   19338           0 :                         Py_INCREF(py_domain_name);
   19339             :                 } else {
   19340         123 :                         py_domain_name = PyUnicode_Decode(object->domain_name, strlen(object->domain_name), "utf-8", "ignore");
   19341             :                 }
   19342             :         }
   19343         123 :         return py_domain_name;
   19344             : }
   19345             : 
   19346           0 : static int py_netr_DsRGetDCNameInfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   19347             : {
   19348           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19349           0 :         if (value == NULL) {
   19350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
   19351           0 :                 return -1;
   19352             :         }
   19353           0 :         if (value == Py_None) {
   19354           0 :                 object->domain_name = NULL;
   19355             :         } else {
   19356           0 :                 object->domain_name = NULL;
   19357             :                 {
   19358           0 :                         const char *test_str;
   19359           0 :                         const char *talloc_str;
   19360           0 :                         PyObject *unicode = NULL;
   19361           0 :                         if (PyUnicode_Check(value)) {
   19362           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19363           0 :                                 if (unicode == NULL) {
   19364           0 :                                         PyErr_NoMemory();
   19365           0 :                                         return -1;
   19366             :                                 }
   19367           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19368           0 :                         } else if (PyBytes_Check(value)) {
   19369           0 :                                 test_str = PyBytes_AS_STRING(value);
   19370             :                         } else {
   19371           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19372           0 :                                 return -1;
   19373             :                         }
   19374           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19375           0 :                         if (unicode != NULL) {
   19376           0 :                                 Py_DECREF(unicode);
   19377             :                         }
   19378           0 :                         if (talloc_str == NULL) {
   19379           0 :                                 PyErr_NoMemory();
   19380           0 :                                 return -1;
   19381             :                         }
   19382           0 :                         object->domain_name = talloc_str;
   19383             :                 }
   19384             :         }
   19385           0 :         return 0;
   19386             : }
   19387             : 
   19388          81 : static PyObject *py_netr_DsRGetDCNameInfo_get_forest_name(PyObject *obj, void *closure)
   19389             : {
   19390          81 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19391           2 :         PyObject *py_forest_name;
   19392          81 :         if (object->forest_name == NULL) {
   19393           0 :                 Py_RETURN_NONE;
   19394             :         }
   19395          81 :         if (object->forest_name == NULL) {
   19396           0 :                 py_forest_name = Py_None;
   19397           0 :                 Py_INCREF(py_forest_name);
   19398             :         } else {
   19399          81 :                 if (object->forest_name == NULL) {
   19400           0 :                         py_forest_name = Py_None;
   19401           0 :                         Py_INCREF(py_forest_name);
   19402             :                 } else {
   19403          81 :                         py_forest_name = PyUnicode_Decode(object->forest_name, strlen(object->forest_name), "utf-8", "ignore");
   19404             :                 }
   19405             :         }
   19406          81 :         return py_forest_name;
   19407             : }
   19408             : 
   19409           0 : static int py_netr_DsRGetDCNameInfo_set_forest_name(PyObject *py_obj, PyObject *value, void *closure)
   19410             : {
   19411           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19412           0 :         if (value == NULL) {
   19413           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->forest_name");
   19414           0 :                 return -1;
   19415             :         }
   19416           0 :         if (value == Py_None) {
   19417           0 :                 object->forest_name = NULL;
   19418             :         } else {
   19419           0 :                 object->forest_name = NULL;
   19420             :                 {
   19421           0 :                         const char *test_str;
   19422           0 :                         const char *talloc_str;
   19423           0 :                         PyObject *unicode = NULL;
   19424           0 :                         if (PyUnicode_Check(value)) {
   19425           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19426           0 :                                 if (unicode == NULL) {
   19427           0 :                                         PyErr_NoMemory();
   19428           0 :                                         return -1;
   19429             :                                 }
   19430           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19431           0 :                         } else if (PyBytes_Check(value)) {
   19432           0 :                                 test_str = PyBytes_AS_STRING(value);
   19433             :                         } else {
   19434           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19435           0 :                                 return -1;
   19436             :                         }
   19437           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19438           0 :                         if (unicode != NULL) {
   19439           0 :                                 Py_DECREF(unicode);
   19440             :                         }
   19441           0 :                         if (talloc_str == NULL) {
   19442           0 :                                 PyErr_NoMemory();
   19443           0 :                                 return -1;
   19444             :                         }
   19445           0 :                         object->forest_name = talloc_str;
   19446             :                 }
   19447             :         }
   19448           0 :         return 0;
   19449             : }
   19450             : 
   19451           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_flags(PyObject *obj, void *closure)
   19452             : {
   19453           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19454           0 :         PyObject *py_dc_flags;
   19455           0 :         py_dc_flags = PyLong_FromUnsignedLongLong((uint32_t)object->dc_flags);
   19456           0 :         return py_dc_flags;
   19457             : }
   19458             : 
   19459           0 : static int py_netr_DsRGetDCNameInfo_set_dc_flags(PyObject *py_obj, PyObject *value, void *closure)
   19460             : {
   19461           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19462           0 :         if (value == NULL) {
   19463           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_flags");
   19464           0 :                 return -1;
   19465             :         }
   19466             :         {
   19467           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dc_flags));
   19468           0 :                 if (PyLong_Check(value)) {
   19469           0 :                         unsigned long long test_var;
   19470           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19471           0 :                         if (PyErr_Occurred() != NULL) {
   19472           0 :                                 return -1;
   19473             :                         }
   19474           0 :                         if (test_var > uint_max) {
   19475           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19476             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19477           0 :                                 return -1;
   19478             :                         }
   19479           0 :                         object->dc_flags = test_var;
   19480             :                 } else {
   19481           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19482             :                           PyLong_Type.tp_name);
   19483           0 :                         return -1;
   19484             :                 }
   19485             :         }
   19486           0 :         return 0;
   19487             : }
   19488             : 
   19489          16 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_site_name(PyObject *obj, void *closure)
   19490             : {
   19491          16 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19492           0 :         PyObject *py_dc_site_name;
   19493          16 :         if (object->dc_site_name == NULL) {
   19494           0 :                 Py_RETURN_NONE;
   19495             :         }
   19496          16 :         if (object->dc_site_name == NULL) {
   19497           0 :                 py_dc_site_name = Py_None;
   19498           0 :                 Py_INCREF(py_dc_site_name);
   19499             :         } else {
   19500          16 :                 if (object->dc_site_name == NULL) {
   19501           0 :                         py_dc_site_name = Py_None;
   19502           0 :                         Py_INCREF(py_dc_site_name);
   19503             :                 } else {
   19504          16 :                         py_dc_site_name = PyUnicode_Decode(object->dc_site_name, strlen(object->dc_site_name), "utf-8", "ignore");
   19505             :                 }
   19506             :         }
   19507          16 :         return py_dc_site_name;
   19508             : }
   19509             : 
   19510           0 : static int py_netr_DsRGetDCNameInfo_set_dc_site_name(PyObject *py_obj, PyObject *value, void *closure)
   19511             : {
   19512           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19513           0 :         if (value == NULL) {
   19514           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_site_name");
   19515           0 :                 return -1;
   19516             :         }
   19517           0 :         if (value == Py_None) {
   19518           0 :                 object->dc_site_name = NULL;
   19519             :         } else {
   19520           0 :                 object->dc_site_name = NULL;
   19521             :                 {
   19522           0 :                         const char *test_str;
   19523           0 :                         const char *talloc_str;
   19524           0 :                         PyObject *unicode = NULL;
   19525           0 :                         if (PyUnicode_Check(value)) {
   19526           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19527           0 :                                 if (unicode == NULL) {
   19528           0 :                                         PyErr_NoMemory();
   19529           0 :                                         return -1;
   19530             :                                 }
   19531           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19532           0 :                         } else if (PyBytes_Check(value)) {
   19533           0 :                                 test_str = PyBytes_AS_STRING(value);
   19534             :                         } else {
   19535           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19536           0 :                                 return -1;
   19537             :                         }
   19538           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19539           0 :                         if (unicode != NULL) {
   19540           0 :                                 Py_DECREF(unicode);
   19541             :                         }
   19542           0 :                         if (talloc_str == NULL) {
   19543           0 :                                 PyErr_NoMemory();
   19544           0 :                                 return -1;
   19545             :                         }
   19546           0 :                         object->dc_site_name = talloc_str;
   19547             :                 }
   19548             :         }
   19549           0 :         return 0;
   19550             : }
   19551             : 
   19552           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_client_site_name(PyObject *obj, void *closure)
   19553             : {
   19554           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19555           0 :         PyObject *py_client_site_name;
   19556           0 :         if (object->client_site_name == NULL) {
   19557           0 :                 Py_RETURN_NONE;
   19558             :         }
   19559           0 :         if (object->client_site_name == NULL) {
   19560           0 :                 py_client_site_name = Py_None;
   19561           0 :                 Py_INCREF(py_client_site_name);
   19562             :         } else {
   19563           0 :                 if (object->client_site_name == NULL) {
   19564           0 :                         py_client_site_name = Py_None;
   19565           0 :                         Py_INCREF(py_client_site_name);
   19566             :                 } else {
   19567           0 :                         py_client_site_name = PyUnicode_Decode(object->client_site_name, strlen(object->client_site_name), "utf-8", "ignore");
   19568             :                 }
   19569             :         }
   19570           0 :         return py_client_site_name;
   19571             : }
   19572             : 
   19573           0 : static int py_netr_DsRGetDCNameInfo_set_client_site_name(PyObject *py_obj, PyObject *value, void *closure)
   19574             : {
   19575           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19576           0 :         if (value == NULL) {
   19577           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_site_name");
   19578           0 :                 return -1;
   19579             :         }
   19580           0 :         if (value == Py_None) {
   19581           0 :                 object->client_site_name = NULL;
   19582             :         } else {
   19583           0 :                 object->client_site_name = NULL;
   19584             :                 {
   19585           0 :                         const char *test_str;
   19586           0 :                         const char *talloc_str;
   19587           0 :                         PyObject *unicode = NULL;
   19588           0 :                         if (PyUnicode_Check(value)) {
   19589           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19590           0 :                                 if (unicode == NULL) {
   19591           0 :                                         PyErr_NoMemory();
   19592           0 :                                         return -1;
   19593             :                                 }
   19594           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19595           0 :                         } else if (PyBytes_Check(value)) {
   19596           0 :                                 test_str = PyBytes_AS_STRING(value);
   19597             :                         } else {
   19598           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19599           0 :                                 return -1;
   19600             :                         }
   19601           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19602           0 :                         if (unicode != NULL) {
   19603           0 :                                 Py_DECREF(unicode);
   19604             :                         }
   19605           0 :                         if (talloc_str == NULL) {
   19606           0 :                                 PyErr_NoMemory();
   19607           0 :                                 return -1;
   19608             :                         }
   19609           0 :                         object->client_site_name = talloc_str;
   19610             :                 }
   19611             :         }
   19612           0 :         return 0;
   19613             : }
   19614             : 
   19615             : static PyGetSetDef py_netr_DsRGetDCNameInfo_getsetters[] = {
   19616             :         {
   19617             :                 .name = discard_const_p(char, "dc_unc"),
   19618             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_unc,
   19619             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_unc,
   19620             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19621             :         },
   19622             :         {
   19623             :                 .name = discard_const_p(char, "dc_address"),
   19624             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_address,
   19625             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_address,
   19626             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19627             :         },
   19628             :         {
   19629             :                 .name = discard_const_p(char, "dc_address_type"),
   19630             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_address_type,
   19631             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_address_type,
   19632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo_AddressType")
   19633             :         },
   19634             :         {
   19635             :                 .name = discard_const_p(char, "domain_guid"),
   19636             :                 .get = py_netr_DsRGetDCNameInfo_get_domain_guid,
   19637             :                 .set = py_netr_DsRGetDCNameInfo_set_domain_guid,
   19638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   19639             :         },
   19640             :         {
   19641             :                 .name = discard_const_p(char, "domain_name"),
   19642             :                 .get = py_netr_DsRGetDCNameInfo_get_domain_name,
   19643             :                 .set = py_netr_DsRGetDCNameInfo_set_domain_name,
   19644             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19645             :         },
   19646             :         {
   19647             :                 .name = discard_const_p(char, "forest_name"),
   19648             :                 .get = py_netr_DsRGetDCNameInfo_get_forest_name,
   19649             :                 .set = py_netr_DsRGetDCNameInfo_set_forest_name,
   19650             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19651             :         },
   19652             :         {
   19653             :                 .name = discard_const_p(char, "dc_flags"),
   19654             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_flags,
   19655             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_flags,
   19656             :                 .doc = discard_const_p(char, "PIDL-generated element of base type nbt_server_type")
   19657             :         },
   19658             :         {
   19659             :                 .name = discard_const_p(char, "dc_site_name"),
   19660             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_site_name,
   19661             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_site_name,
   19662             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19663             :         },
   19664             :         {
   19665             :                 .name = discard_const_p(char, "client_site_name"),
   19666             :                 .get = py_netr_DsRGetDCNameInfo_get_client_site_name,
   19667             :                 .set = py_netr_DsRGetDCNameInfo_set_client_site_name,
   19668             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19669             :         },
   19670             :         { .name = NULL }
   19671             : };
   19672             : 
   19673           0 : static PyObject *py_netr_DsRGetDCNameInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19674             : {
   19675           0 :         return pytalloc_new(struct netr_DsRGetDCNameInfo, type);
   19676             : }
   19677             : 
   19678           0 : static PyObject *py_netr_DsRGetDCNameInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   19679             : {
   19680           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19681           0 :         PyObject *ret = NULL;
   19682           0 :         DATA_BLOB blob;
   19683           0 :         enum ndr_err_code err;
   19684           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   19685           0 :         if (tmp_ctx == NULL) {
   19686           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19687           0 :                 return NULL;
   19688             :         }
   19689           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCNameInfo);
   19690           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19691           0 :                 TALLOC_FREE(tmp_ctx);
   19692           0 :                 PyErr_SetNdrError(err);
   19693           0 :                 return NULL;
   19694             :         }
   19695             : 
   19696           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   19697           0 :         TALLOC_FREE(tmp_ctx);
   19698           0 :         return ret;
   19699             : }
   19700             : 
   19701           0 : static PyObject *py_netr_DsRGetDCNameInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19702             : {
   19703           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19704           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   19705           0 :         Py_ssize_t blob_length = 0;
   19706           0 :         enum ndr_err_code err;
   19707           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   19708           0 :         PyObject *allow_remaining_obj = NULL;
   19709           0 :         bool allow_remaining = false;
   19710             : 
   19711           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   19712             :                 discard_const_p(char *, kwnames),
   19713             :                 &blob.data, &blob_length,
   19714             :                 &allow_remaining_obj)) {
   19715           0 :                 return NULL;
   19716             :         }
   19717           0 :         blob.length = blob_length;
   19718             : 
   19719           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19720           0 :                 allow_remaining = true;
   19721             :         }
   19722             : 
   19723           0 :         if (allow_remaining) {
   19724           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameInfo);
   19725             :         } else {
   19726           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameInfo);
   19727             :         }
   19728           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19729           0 :                 PyErr_SetNdrError(err);
   19730           0 :                 return NULL;
   19731             :         }
   19732             : 
   19733           0 :         Py_RETURN_NONE;
   19734             : }
   19735             : 
   19736           0 : static PyObject *py_netr_DsRGetDCNameInfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19737             : {
   19738           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19739           0 :         PyObject *ret;
   19740           0 :         char *retstr;
   19741             : 
   19742           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DsRGetDCNameInfo, "netr_DsRGetDCNameInfo", object);
   19743           0 :         ret = PyUnicode_FromString(retstr);
   19744           0 :         talloc_free(retstr);
   19745             : 
   19746           0 :         return ret;
   19747             : }
   19748             : 
   19749             : static PyMethodDef py_netr_DsRGetDCNameInfo_methods[] = {
   19750             :         { "__ndr_pack__", (PyCFunction)py_netr_DsRGetDCNameInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   19751             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   19752             :         { "__ndr_print__", (PyCFunction)py_netr_DsRGetDCNameInfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   19753             :         { NULL, NULL, 0, NULL }
   19754             : };
   19755             : 
   19756             : 
   19757             : static PyTypeObject netr_DsRGetDCNameInfo_Type = {
   19758             :         PyVarObject_HEAD_INIT(NULL, 0)
   19759             :         .tp_name = "netlogon.netr_DsRGetDCNameInfo",
   19760             :         .tp_getset = py_netr_DsRGetDCNameInfo_getsetters,
   19761             :         .tp_methods = py_netr_DsRGetDCNameInfo_methods,
   19762             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19763             :         .tp_new = py_netr_DsRGetDCNameInfo_new,
   19764             : };
   19765             : 
   19766           0 : static PyObject *py_import_netr_Capabilities(TALLOC_CTX *mem_ctx, int level, union netr_Capabilities *in)
   19767             : {
   19768           0 :         PyObject *ret;
   19769             : 
   19770           0 :         switch (level) {
   19771           0 :                 case 1:
   19772           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->server_capabilities);
   19773           0 :                         return ret;
   19774             : 
   19775           0 :                 case 2:
   19776           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->server_capabilities);
   19777           0 :                         return ret;
   19778             : 
   19779             :         }
   19780           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   19781           0 :         return NULL;
   19782             : }
   19783             : 
   19784           0 : static union netr_Capabilities *py_export_netr_Capabilities(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   19785             : {
   19786           0 :         union netr_Capabilities *ret = talloc_zero(mem_ctx, union netr_Capabilities);
   19787           0 :         switch (level) {
   19788           0 :                 case 1:
   19789           0 :                         if (in == NULL) {
   19790           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->server_capabilities");
   19791           0 :                                 talloc_free(ret); return NULL;
   19792             :                         }
   19793             :                         {
   19794           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->server_capabilities));
   19795           0 :                                 if (PyLong_Check(in)) {
   19796           0 :                                         unsigned long long test_var;
   19797           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   19798           0 :                                         if (PyErr_Occurred() != NULL) {
   19799           0 :                                                 talloc_free(ret); return NULL;
   19800             :                                         }
   19801           0 :                                         if (test_var > uint_max) {
   19802           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19803             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   19804           0 :                                                 talloc_free(ret); return NULL;
   19805             :                                         }
   19806           0 :                                         ret->server_capabilities = test_var;
   19807             :                                 } else {
   19808           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19809             :                                           PyLong_Type.tp_name);
   19810           0 :                                         talloc_free(ret); return NULL;
   19811             :                                 }
   19812             :                         }
   19813           0 :                         break;
   19814             : 
   19815           0 :                 case 2:
   19816           0 :                         if (in == NULL) {
   19817           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->server_capabilities");
   19818           0 :                                 talloc_free(ret); return NULL;
   19819             :                         }
   19820             :                         {
   19821           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->server_capabilities));
   19822           0 :                                 if (PyLong_Check(in)) {
   19823           0 :                                         unsigned long long test_var;
   19824           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   19825           0 :                                         if (PyErr_Occurred() != NULL) {
   19826           0 :                                                 talloc_free(ret); return NULL;
   19827             :                                         }
   19828           0 :                                         if (test_var > uint_max) {
   19829           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19830             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   19831           0 :                                                 talloc_free(ret); return NULL;
   19832             :                                         }
   19833           0 :                                         ret->server_capabilities = test_var;
   19834             :                                 } else {
   19835           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19836             :                                           PyLong_Type.tp_name);
   19837           0 :                                         talloc_free(ret); return NULL;
   19838             :                                 }
   19839             :                         }
   19840           0 :                         break;
   19841             : 
   19842           0 :                 default:
   19843           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   19844           0 :                         talloc_free(ret);
   19845           0 :                         ret = NULL;
   19846             :         }
   19847             : 
   19848           0 :         return ret;
   19849             : }
   19850             : 
   19851           0 : static PyObject *py_netr_Capabilities_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19852             : {
   19853           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   19854           0 :         PyObject *mem_ctx_obj = NULL;
   19855           0 :         TALLOC_CTX *mem_ctx = NULL;
   19856           0 :         int level = 0;
   19857           0 :         PyObject *in_obj = NULL;
   19858           0 :         union netr_Capabilities *in = NULL;
   19859             : 
   19860           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   19861             :                 discard_const_p(char *, kwnames),
   19862             :                 &mem_ctx_obj,
   19863             :                 &level,
   19864             :                 &in_obj)) {
   19865           0 :                 return NULL;
   19866             :         }
   19867           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   19868           0 :         if (mem_ctx == NULL) {
   19869           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   19870           0 :                 return NULL;
   19871             :         }
   19872           0 :         in = (union netr_Capabilities *)pytalloc_get_ptr(in_obj);
   19873           0 :         if (in == NULL) {
   19874           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_Capabilities!");
   19875           0 :                 return NULL;
   19876             :         }
   19877             : 
   19878           0 :         return py_import_netr_Capabilities(mem_ctx, level, in);
   19879             : }
   19880             : 
   19881           0 : static PyObject *py_netr_Capabilities_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19882             : {
   19883           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   19884           0 :         PyObject *mem_ctx_obj = NULL;
   19885           0 :         TALLOC_CTX *mem_ctx = NULL;
   19886           0 :         int level = 0;
   19887           0 :         PyObject *in = NULL;
   19888           0 :         union netr_Capabilities *out = NULL;
   19889             : 
   19890           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   19891             :                 discard_const_p(char *, kwnames),
   19892             :                 &mem_ctx_obj,
   19893             :                 &level,
   19894             :                 &in)) {
   19895           0 :                 return NULL;
   19896             :         }
   19897           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   19898           0 :         if (mem_ctx == NULL) {
   19899           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   19900           0 :                 return NULL;
   19901             :         }
   19902             : 
   19903           0 :         out = py_export_netr_Capabilities(mem_ctx, level, in);
   19904           0 :         if (out == NULL) {
   19905           0 :                 return NULL;
   19906             :         }
   19907             : 
   19908           0 :         return pytalloc_GenericObject_reference(out);
   19909             : }
   19910             : 
   19911             : static PyMethodDef py_netr_Capabilities_methods[] = {
   19912             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Capabilities_import),
   19913             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   19914             :                 "T.__import__(mem_ctx, level, in) => ret." },
   19915             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Capabilities_export),
   19916             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   19917             :                 "T.__export__(mem_ctx, level, in) => ret." },
   19918             :         { NULL, NULL, 0, NULL }
   19919             : };
   19920             : 
   19921           0 : static PyObject *py_netr_Capabilities_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19922             : {
   19923           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   19924           0 :         return NULL;
   19925             : }
   19926             : 
   19927             : 
   19928             : static PyTypeObject netr_Capabilities_Type = {
   19929             :         PyVarObject_HEAD_INIT(NULL, 0)
   19930             :         .tp_name = "netlogon.netr_Capabilities",
   19931             :         .tp_getset = NULL,
   19932             :         .tp_methods = py_netr_Capabilities_methods,
   19933             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19934             :         .tp_new = py_netr_Capabilities_new,
   19935             : };
   19936             : 
   19937             : 
   19938           0 : static PyObject *py_netr_LsaPolicyInformation_get_policy_size(PyObject *obj, void *closure)
   19939             : {
   19940           0 :         struct netr_LsaPolicyInformation *object = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(obj);
   19941           0 :         PyObject *py_policy_size;
   19942           0 :         py_policy_size = PyLong_FromUnsignedLongLong((uint32_t)object->policy_size);
   19943           0 :         return py_policy_size;
   19944             : }
   19945             : 
   19946           0 : static int py_netr_LsaPolicyInformation_set_policy_size(PyObject *py_obj, PyObject *value, void *closure)
   19947             : {
   19948           0 :         struct netr_LsaPolicyInformation *object = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(py_obj);
   19949           0 :         if (value == NULL) {
   19950           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->policy_size");
   19951           0 :                 return -1;
   19952             :         }
   19953             :         {
   19954           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->policy_size));
   19955           0 :                 if (PyLong_Check(value)) {
   19956           0 :                         unsigned long long test_var;
   19957           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19958           0 :                         if (PyErr_Occurred() != NULL) {
   19959           0 :                                 return -1;
   19960             :                         }
   19961           0 :                         if (test_var > uint_max) {
   19962           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19963             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19964           0 :                                 return -1;
   19965             :                         }
   19966           0 :                         object->policy_size = test_var;
   19967             :                 } else {
   19968           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19969             :                           PyLong_Type.tp_name);
   19970           0 :                         return -1;
   19971             :                 }
   19972             :         }
   19973           0 :         return 0;
   19974             : }
   19975             : 
   19976           0 : static PyObject *py_netr_LsaPolicyInformation_get_policy(PyObject *obj, void *closure)
   19977             : {
   19978           0 :         struct netr_LsaPolicyInformation *object = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(obj);
   19979           0 :         PyObject *py_policy;
   19980           0 :         if (object->policy == NULL) {
   19981           0 :                 Py_RETURN_NONE;
   19982             :         }
   19983           0 :         if (object->policy == NULL) {
   19984           0 :                 py_policy = Py_None;
   19985           0 :                 Py_INCREF(py_policy);
   19986             :         } else {
   19987           0 :                 py_policy = PyList_New(object->policy_size);
   19988           0 :                 if (py_policy == NULL) {
   19989           0 :                         return NULL;
   19990             :                 }
   19991             :                 {
   19992             :                         int policy_cntr_1;
   19993           0 :                         for (policy_cntr_1 = 0; policy_cntr_1 < (object->policy_size); policy_cntr_1++) {
   19994           0 :                                 PyObject *py_policy_1;
   19995           0 :                                 py_policy_1 = PyLong_FromLong((uint16_t)object->policy[policy_cntr_1]);
   19996           0 :                                 PyList_SetItem(py_policy, policy_cntr_1, py_policy_1);
   19997             :                         }
   19998             :                 }
   19999             :         }
   20000           0 :         return py_policy;
   20001             : }
   20002             : 
   20003           0 : static int py_netr_LsaPolicyInformation_set_policy(PyObject *py_obj, PyObject *value, void *closure)
   20004             : {
   20005           0 :         struct netr_LsaPolicyInformation *object = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(py_obj);
   20006           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->policy));
   20007           0 :         if (value == NULL) {
   20008           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->policy");
   20009           0 :                 return -1;
   20010             :         }
   20011           0 :         if (value == Py_None) {
   20012           0 :                 object->policy = NULL;
   20013             :         } else {
   20014           0 :                 object->policy = NULL;
   20015           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   20016             :                 {
   20017           0 :                         int policy_cntr_1;
   20018           0 :                         object->policy = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->policy, PyList_GET_SIZE(value));
   20019           0 :                         if (!object->policy) { return -1; }
   20020           0 :                         talloc_set_name_const(object->policy, "ARRAY: object->policy");
   20021           0 :                         for (policy_cntr_1 = 0; policy_cntr_1 < PyList_GET_SIZE(value); policy_cntr_1++) {
   20022           0 :                                 if (PyList_GET_ITEM(value, policy_cntr_1) == NULL) {
   20023           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->policy[policy_cntr_1]");
   20024           0 :                                         return -1;
   20025             :                                 }
   20026             :                                 {
   20027           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->policy[policy_cntr_1]));
   20028           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, policy_cntr_1))) {
   20029           0 :                                                 unsigned long long test_var;
   20030           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, policy_cntr_1));
   20031           0 :                                                 if (PyErr_Occurred() != NULL) {
   20032           0 :                                                         return -1;
   20033             :                                                 }
   20034           0 :                                                 if (test_var > uint_max) {
   20035           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20036             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   20037           0 :                                                         return -1;
   20038             :                                                 }
   20039           0 :                                                 object->policy[policy_cntr_1] = test_var;
   20040             :                                         } else {
   20041           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   20042             :                                                   PyLong_Type.tp_name);
   20043           0 :                                                 return -1;
   20044             :                                         }
   20045             :                                 }
   20046             :                         }
   20047             :                 }
   20048             :         }
   20049           0 :         return 0;
   20050             : }
   20051             : 
   20052             : static PyGetSetDef py_netr_LsaPolicyInformation_getsetters[] = {
   20053             :         {
   20054             :                 .name = discard_const_p(char, "policy_size"),
   20055             :                 .get = py_netr_LsaPolicyInformation_get_policy_size,
   20056             :                 .set = py_netr_LsaPolicyInformation_set_policy_size,
   20057             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20058             :         },
   20059             :         {
   20060             :                 .name = discard_const_p(char, "policy"),
   20061             :                 .get = py_netr_LsaPolicyInformation_get_policy,
   20062             :                 .set = py_netr_LsaPolicyInformation_set_policy,
   20063             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   20064             :         },
   20065             :         { .name = NULL }
   20066             : };
   20067             : 
   20068           0 : static PyObject *py_netr_LsaPolicyInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20069             : {
   20070           0 :         return pytalloc_new(struct netr_LsaPolicyInformation, type);
   20071             : }
   20072             : 
   20073             : 
   20074             : static PyTypeObject netr_LsaPolicyInformation_Type = {
   20075             :         PyVarObject_HEAD_INIT(NULL, 0)
   20076             :         .tp_name = "netlogon.netr_LsaPolicyInformation",
   20077             :         .tp_getset = py_netr_LsaPolicyInformation_getsetters,
   20078             :         .tp_methods = NULL,
   20079             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20080             :         .tp_new = py_netr_LsaPolicyInformation_new,
   20081             : };
   20082             : 
   20083             : 
   20084           0 : static PyObject *py_netr_OsVersionInfoEx_get_OSVersionInfoSize(PyObject *obj, void *closure)
   20085             : {
   20086           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20087           0 :         PyObject *py_OSVersionInfoSize;
   20088           0 :         py_OSVersionInfoSize = PyLong_FromUnsignedLongLong((uint32_t)object->OSVersionInfoSize);
   20089           0 :         return py_OSVersionInfoSize;
   20090             : }
   20091             : 
   20092           0 : static int py_netr_OsVersionInfoEx_set_OSVersionInfoSize(PyObject *py_obj, PyObject *value, void *closure)
   20093             : {
   20094           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20095           0 :         if (value == NULL) {
   20096           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->OSVersionInfoSize");
   20097           0 :                 return -1;
   20098             :         }
   20099             :         {
   20100           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->OSVersionInfoSize));
   20101           0 :                 if (PyLong_Check(value)) {
   20102           0 :                         unsigned long long test_var;
   20103           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20104           0 :                         if (PyErr_Occurred() != NULL) {
   20105           0 :                                 return -1;
   20106             :                         }
   20107           0 :                         if (test_var > uint_max) {
   20108           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20109             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20110           0 :                                 return -1;
   20111             :                         }
   20112           0 :                         object->OSVersionInfoSize = test_var;
   20113             :                 } else {
   20114           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20115             :                           PyLong_Type.tp_name);
   20116           0 :                         return -1;
   20117             :                 }
   20118             :         }
   20119           0 :         return 0;
   20120             : }
   20121             : 
   20122           0 : static PyObject *py_netr_OsVersionInfoEx_get_MajorVersion(PyObject *obj, void *closure)
   20123             : {
   20124           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20125           0 :         PyObject *py_MajorVersion;
   20126           0 :         py_MajorVersion = PyLong_FromUnsignedLongLong((uint32_t)object->MajorVersion);
   20127           0 :         return py_MajorVersion;
   20128             : }
   20129             : 
   20130           0 : static int py_netr_OsVersionInfoEx_set_MajorVersion(PyObject *py_obj, PyObject *value, void *closure)
   20131             : {
   20132           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20133           0 :         if (value == NULL) {
   20134           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->MajorVersion");
   20135           0 :                 return -1;
   20136             :         }
   20137             :         {
   20138           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MajorVersion));
   20139           0 :                 if (PyLong_Check(value)) {
   20140           0 :                         unsigned long long test_var;
   20141           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20142           0 :                         if (PyErr_Occurred() != NULL) {
   20143           0 :                                 return -1;
   20144             :                         }
   20145           0 :                         if (test_var > uint_max) {
   20146           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20147             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20148           0 :                                 return -1;
   20149             :                         }
   20150           0 :                         object->MajorVersion = test_var;
   20151             :                 } else {
   20152           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20153             :                           PyLong_Type.tp_name);
   20154           0 :                         return -1;
   20155             :                 }
   20156             :         }
   20157           0 :         return 0;
   20158             : }
   20159             : 
   20160           0 : static PyObject *py_netr_OsVersionInfoEx_get_MinorVersion(PyObject *obj, void *closure)
   20161             : {
   20162           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20163           0 :         PyObject *py_MinorVersion;
   20164           0 :         py_MinorVersion = PyLong_FromUnsignedLongLong((uint32_t)object->MinorVersion);
   20165           0 :         return py_MinorVersion;
   20166             : }
   20167             : 
   20168           0 : static int py_netr_OsVersionInfoEx_set_MinorVersion(PyObject *py_obj, PyObject *value, void *closure)
   20169             : {
   20170           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20171           0 :         if (value == NULL) {
   20172           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->MinorVersion");
   20173           0 :                 return -1;
   20174             :         }
   20175             :         {
   20176           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MinorVersion));
   20177           0 :                 if (PyLong_Check(value)) {
   20178           0 :                         unsigned long long test_var;
   20179           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20180           0 :                         if (PyErr_Occurred() != NULL) {
   20181           0 :                                 return -1;
   20182             :                         }
   20183           0 :                         if (test_var > uint_max) {
   20184           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20185             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20186           0 :                                 return -1;
   20187             :                         }
   20188           0 :                         object->MinorVersion = test_var;
   20189             :                 } else {
   20190           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20191             :                           PyLong_Type.tp_name);
   20192           0 :                         return -1;
   20193             :                 }
   20194             :         }
   20195           0 :         return 0;
   20196             : }
   20197             : 
   20198           0 : static PyObject *py_netr_OsVersionInfoEx_get_BuildNumber(PyObject *obj, void *closure)
   20199             : {
   20200           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20201           0 :         PyObject *py_BuildNumber;
   20202           0 :         py_BuildNumber = PyLong_FromUnsignedLongLong((uint32_t)object->BuildNumber);
   20203           0 :         return py_BuildNumber;
   20204             : }
   20205             : 
   20206           0 : static int py_netr_OsVersionInfoEx_set_BuildNumber(PyObject *py_obj, PyObject *value, void *closure)
   20207             : {
   20208           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20209           0 :         if (value == NULL) {
   20210           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->BuildNumber");
   20211           0 :                 return -1;
   20212             :         }
   20213             :         {
   20214           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->BuildNumber));
   20215           0 :                 if (PyLong_Check(value)) {
   20216           0 :                         unsigned long long test_var;
   20217           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20218           0 :                         if (PyErr_Occurred() != NULL) {
   20219           0 :                                 return -1;
   20220             :                         }
   20221           0 :                         if (test_var > uint_max) {
   20222           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20223             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20224           0 :                                 return -1;
   20225             :                         }
   20226           0 :                         object->BuildNumber = test_var;
   20227             :                 } else {
   20228           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20229             :                           PyLong_Type.tp_name);
   20230           0 :                         return -1;
   20231             :                 }
   20232             :         }
   20233           0 :         return 0;
   20234             : }
   20235             : 
   20236           0 : static PyObject *py_netr_OsVersionInfoEx_get_PlatformId(PyObject *obj, void *closure)
   20237             : {
   20238           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20239           0 :         PyObject *py_PlatformId;
   20240           0 :         py_PlatformId = PyLong_FromUnsignedLongLong((uint32_t)object->PlatformId);
   20241           0 :         return py_PlatformId;
   20242             : }
   20243             : 
   20244           0 : static int py_netr_OsVersionInfoEx_set_PlatformId(PyObject *py_obj, PyObject *value, void *closure)
   20245             : {
   20246           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20247           0 :         if (value == NULL) {
   20248           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->PlatformId");
   20249           0 :                 return -1;
   20250             :         }
   20251             :         {
   20252           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PlatformId));
   20253           0 :                 if (PyLong_Check(value)) {
   20254           0 :                         unsigned long long test_var;
   20255           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20256           0 :                         if (PyErr_Occurred() != NULL) {
   20257           0 :                                 return -1;
   20258             :                         }
   20259           0 :                         if (test_var > uint_max) {
   20260           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20261             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20262           0 :                                 return -1;
   20263             :                         }
   20264           0 :                         object->PlatformId = test_var;
   20265             :                 } else {
   20266           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20267             :                           PyLong_Type.tp_name);
   20268           0 :                         return -1;
   20269             :                 }
   20270             :         }
   20271           0 :         return 0;
   20272             : }
   20273             : 
   20274           0 : static PyObject *py_netr_OsVersionInfoEx_get_CSDVersion(PyObject *obj, void *closure)
   20275             : {
   20276           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20277           0 :         PyObject *py_CSDVersion;
   20278           0 :         py_CSDVersion = PyString_FromStringOrNULL(object->CSDVersion);
   20279           0 :         return py_CSDVersion;
   20280             : }
   20281             : 
   20282           0 : static int py_netr_OsVersionInfoEx_set_CSDVersion(PyObject *py_obj, PyObject *value, void *closure)
   20283             : {
   20284           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20285           0 :         if (value == NULL) {
   20286           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->CSDVersion");
   20287           0 :                 return -1;
   20288             :         }
   20289             :         {
   20290           0 :                 const char *test_str;
   20291           0 :                 const char *talloc_str;
   20292           0 :                 PyObject *unicode = NULL;
   20293           0 :                 if (PyUnicode_Check(value)) {
   20294           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20295           0 :                         if (unicode == NULL) {
   20296           0 :                                 PyErr_NoMemory();
   20297           0 :                                 return -1;
   20298             :                         }
   20299           0 :                         test_str = PyBytes_AS_STRING(unicode);
   20300           0 :                 } else if (PyBytes_Check(value)) {
   20301           0 :                         test_str = PyBytes_AS_STRING(value);
   20302             :                 } else {
   20303           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20304           0 :                         return -1;
   20305             :                 }
   20306           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20307           0 :                 if (unicode != NULL) {
   20308           0 :                         Py_DECREF(unicode);
   20309             :                 }
   20310           0 :                 if (talloc_str == NULL) {
   20311           0 :                         PyErr_NoMemory();
   20312           0 :                         return -1;
   20313             :                 }
   20314           0 :                 object->CSDVersion = talloc_str;
   20315             :         }
   20316           0 :         return 0;
   20317             : }
   20318             : 
   20319           0 : static PyObject *py_netr_OsVersionInfoEx_get_ServicePackMajor(PyObject *obj, void *closure)
   20320             : {
   20321           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20322           0 :         PyObject *py_ServicePackMajor;
   20323           0 :         py_ServicePackMajor = PyLong_FromLong((uint16_t)object->ServicePackMajor);
   20324           0 :         return py_ServicePackMajor;
   20325             : }
   20326             : 
   20327           0 : static int py_netr_OsVersionInfoEx_set_ServicePackMajor(PyObject *py_obj, PyObject *value, void *closure)
   20328             : {
   20329           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20330           0 :         if (value == NULL) {
   20331           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ServicePackMajor");
   20332           0 :                 return -1;
   20333             :         }
   20334             :         {
   20335           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ServicePackMajor));
   20336           0 :                 if (PyLong_Check(value)) {
   20337           0 :                         unsigned long long test_var;
   20338           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20339           0 :                         if (PyErr_Occurred() != NULL) {
   20340           0 :                                 return -1;
   20341             :                         }
   20342           0 :                         if (test_var > uint_max) {
   20343           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20344             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20345           0 :                                 return -1;
   20346             :                         }
   20347           0 :                         object->ServicePackMajor = test_var;
   20348             :                 } else {
   20349           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20350             :                           PyLong_Type.tp_name);
   20351           0 :                         return -1;
   20352             :                 }
   20353             :         }
   20354           0 :         return 0;
   20355             : }
   20356             : 
   20357           0 : static PyObject *py_netr_OsVersionInfoEx_get_ServicePackMinor(PyObject *obj, void *closure)
   20358             : {
   20359           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20360           0 :         PyObject *py_ServicePackMinor;
   20361           0 :         py_ServicePackMinor = PyLong_FromLong((uint16_t)object->ServicePackMinor);
   20362           0 :         return py_ServicePackMinor;
   20363             : }
   20364             : 
   20365           0 : static int py_netr_OsVersionInfoEx_set_ServicePackMinor(PyObject *py_obj, PyObject *value, void *closure)
   20366             : {
   20367           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20368           0 :         if (value == NULL) {
   20369           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ServicePackMinor");
   20370           0 :                 return -1;
   20371             :         }
   20372             :         {
   20373           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ServicePackMinor));
   20374           0 :                 if (PyLong_Check(value)) {
   20375           0 :                         unsigned long long test_var;
   20376           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20377           0 :                         if (PyErr_Occurred() != NULL) {
   20378           0 :                                 return -1;
   20379             :                         }
   20380           0 :                         if (test_var > uint_max) {
   20381           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20382             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20383           0 :                                 return -1;
   20384             :                         }
   20385           0 :                         object->ServicePackMinor = test_var;
   20386             :                 } else {
   20387           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20388             :                           PyLong_Type.tp_name);
   20389           0 :                         return -1;
   20390             :                 }
   20391             :         }
   20392           0 :         return 0;
   20393             : }
   20394             : 
   20395           0 : static PyObject *py_netr_OsVersionInfoEx_get_SuiteMask(PyObject *obj, void *closure)
   20396             : {
   20397           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20398           0 :         PyObject *py_SuiteMask;
   20399           0 :         py_SuiteMask = PyLong_FromLong((uint16_t)object->SuiteMask);
   20400           0 :         return py_SuiteMask;
   20401             : }
   20402             : 
   20403           0 : static int py_netr_OsVersionInfoEx_set_SuiteMask(PyObject *py_obj, PyObject *value, void *closure)
   20404             : {
   20405           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20406           0 :         if (value == NULL) {
   20407           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SuiteMask");
   20408           0 :                 return -1;
   20409             :         }
   20410             :         {
   20411           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SuiteMask));
   20412           0 :                 if (PyLong_Check(value)) {
   20413           0 :                         unsigned long long test_var;
   20414           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20415           0 :                         if (PyErr_Occurred() != NULL) {
   20416           0 :                                 return -1;
   20417             :                         }
   20418           0 :                         if (test_var > uint_max) {
   20419           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20420             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20421           0 :                                 return -1;
   20422             :                         }
   20423           0 :                         object->SuiteMask = test_var;
   20424             :                 } else {
   20425           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20426             :                           PyLong_Type.tp_name);
   20427           0 :                         return -1;
   20428             :                 }
   20429             :         }
   20430           0 :         return 0;
   20431             : }
   20432             : 
   20433           0 : static PyObject *py_netr_OsVersionInfoEx_get_ProductType(PyObject *obj, void *closure)
   20434             : {
   20435           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20436           0 :         PyObject *py_ProductType;
   20437           0 :         py_ProductType = PyLong_FromLong((uint16_t)object->ProductType);
   20438           0 :         return py_ProductType;
   20439             : }
   20440             : 
   20441           0 : static int py_netr_OsVersionInfoEx_set_ProductType(PyObject *py_obj, PyObject *value, void *closure)
   20442             : {
   20443           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20444           0 :         if (value == NULL) {
   20445           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ProductType");
   20446           0 :                 return -1;
   20447             :         }
   20448             :         {
   20449           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ProductType));
   20450           0 :                 if (PyLong_Check(value)) {
   20451           0 :                         unsigned long long test_var;
   20452           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20453           0 :                         if (PyErr_Occurred() != NULL) {
   20454           0 :                                 return -1;
   20455             :                         }
   20456           0 :                         if (test_var > uint_max) {
   20457           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20458             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20459           0 :                                 return -1;
   20460             :                         }
   20461           0 :                         object->ProductType = test_var;
   20462             :                 } else {
   20463           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20464             :                           PyLong_Type.tp_name);
   20465           0 :                         return -1;
   20466             :                 }
   20467             :         }
   20468           0 :         return 0;
   20469             : }
   20470             : 
   20471           0 : static PyObject *py_netr_OsVersionInfoEx_get_Reserved(PyObject *obj, void *closure)
   20472             : {
   20473           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20474           0 :         PyObject *py_Reserved;
   20475           0 :         py_Reserved = PyLong_FromLong((uint16_t)object->Reserved);
   20476           0 :         return py_Reserved;
   20477             : }
   20478             : 
   20479           0 : static int py_netr_OsVersionInfoEx_set_Reserved(PyObject *py_obj, PyObject *value, void *closure)
   20480             : {
   20481           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20482           0 :         if (value == NULL) {
   20483           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Reserved");
   20484           0 :                 return -1;
   20485             :         }
   20486             :         {
   20487           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Reserved));
   20488           0 :                 if (PyLong_Check(value)) {
   20489           0 :                         unsigned long long test_var;
   20490           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20491           0 :                         if (PyErr_Occurred() != NULL) {
   20492           0 :                                 return -1;
   20493             :                         }
   20494           0 :                         if (test_var > uint_max) {
   20495           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20496             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20497           0 :                                 return -1;
   20498             :                         }
   20499           0 :                         object->Reserved = test_var;
   20500             :                 } else {
   20501           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20502             :                           PyLong_Type.tp_name);
   20503           0 :                         return -1;
   20504             :                 }
   20505             :         }
   20506           0 :         return 0;
   20507             : }
   20508             : 
   20509             : static PyGetSetDef py_netr_OsVersionInfoEx_getsetters[] = {
   20510             :         {
   20511             :                 .name = discard_const_p(char, "OSVersionInfoSize"),
   20512             :                 .get = py_netr_OsVersionInfoEx_get_OSVersionInfoSize,
   20513             :                 .set = py_netr_OsVersionInfoEx_set_OSVersionInfoSize,
   20514             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20515             :         },
   20516             :         {
   20517             :                 .name = discard_const_p(char, "MajorVersion"),
   20518             :                 .get = py_netr_OsVersionInfoEx_get_MajorVersion,
   20519             :                 .set = py_netr_OsVersionInfoEx_set_MajorVersion,
   20520             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20521             :         },
   20522             :         {
   20523             :                 .name = discard_const_p(char, "MinorVersion"),
   20524             :                 .get = py_netr_OsVersionInfoEx_get_MinorVersion,
   20525             :                 .set = py_netr_OsVersionInfoEx_set_MinorVersion,
   20526             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20527             :         },
   20528             :         {
   20529             :                 .name = discard_const_p(char, "BuildNumber"),
   20530             :                 .get = py_netr_OsVersionInfoEx_get_BuildNumber,
   20531             :                 .set = py_netr_OsVersionInfoEx_set_BuildNumber,
   20532             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20533             :         },
   20534             :         {
   20535             :                 .name = discard_const_p(char, "PlatformId"),
   20536             :                 .get = py_netr_OsVersionInfoEx_get_PlatformId,
   20537             :                 .set = py_netr_OsVersionInfoEx_set_PlatformId,
   20538             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20539             :         },
   20540             :         {
   20541             :                 .name = discard_const_p(char, "CSDVersion"),
   20542             :                 .get = py_netr_OsVersionInfoEx_get_CSDVersion,
   20543             :                 .set = py_netr_OsVersionInfoEx_set_CSDVersion,
   20544             :                 .doc = discard_const_p(char, "PIDL-generated element of base type string")
   20545             :         },
   20546             :         {
   20547             :                 .name = discard_const_p(char, "ServicePackMajor"),
   20548             :                 .get = py_netr_OsVersionInfoEx_get_ServicePackMajor,
   20549             :                 .set = py_netr_OsVersionInfoEx_set_ServicePackMajor,
   20550             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20551             :         },
   20552             :         {
   20553             :                 .name = discard_const_p(char, "ServicePackMinor"),
   20554             :                 .get = py_netr_OsVersionInfoEx_get_ServicePackMinor,
   20555             :                 .set = py_netr_OsVersionInfoEx_set_ServicePackMinor,
   20556             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20557             :         },
   20558             :         {
   20559             :                 .name = discard_const_p(char, "SuiteMask"),
   20560             :                 .get = py_netr_OsVersionInfoEx_get_SuiteMask,
   20561             :                 .set = py_netr_OsVersionInfoEx_set_SuiteMask,
   20562             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SuiteMask")
   20563             :         },
   20564             :         {
   20565             :                 .name = discard_const_p(char, "ProductType"),
   20566             :                 .get = py_netr_OsVersionInfoEx_get_ProductType,
   20567             :                 .set = py_netr_OsVersionInfoEx_set_ProductType,
   20568             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ProductType")
   20569             :         },
   20570             :         {
   20571             :                 .name = discard_const_p(char, "Reserved"),
   20572             :                 .get = py_netr_OsVersionInfoEx_get_Reserved,
   20573             :                 .set = py_netr_OsVersionInfoEx_set_Reserved,
   20574             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   20575             :         },
   20576             :         { .name = NULL }
   20577             : };
   20578             : 
   20579           0 : static PyObject *py_netr_OsVersionInfoEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20580             : {
   20581           0 :         return pytalloc_new(struct netr_OsVersionInfoEx, type);
   20582             : }
   20583             : 
   20584             : 
   20585             : static PyTypeObject netr_OsVersionInfoEx_Type = {
   20586             :         PyVarObject_HEAD_INIT(NULL, 0)
   20587             :         .tp_name = "netlogon.netr_OsVersionInfoEx",
   20588             :         .tp_getset = py_netr_OsVersionInfoEx_getsetters,
   20589             :         .tp_methods = NULL,
   20590             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20591             :         .tp_new = py_netr_OsVersionInfoEx_new,
   20592             : };
   20593             : 
   20594             : 
   20595           0 : static PyObject *py_netr_OsVersion_get_length(PyObject *obj, void *closure)
   20596             : {
   20597           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(obj);
   20598           0 :         PyObject *py_length;
   20599           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
   20600           0 :         return py_length;
   20601             : }
   20602             : 
   20603           0 : static int py_netr_OsVersion_set_length(PyObject *py_obj, PyObject *value, void *closure)
   20604             : {
   20605           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(py_obj);
   20606           0 :         if (value == NULL) {
   20607           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   20608           0 :                 return -1;
   20609             :         }
   20610             :         {
   20611           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   20612           0 :                 if (PyLong_Check(value)) {
   20613           0 :                         unsigned long long test_var;
   20614           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20615           0 :                         if (PyErr_Occurred() != NULL) {
   20616           0 :                                 return -1;
   20617             :                         }
   20618           0 :                         if (test_var > uint_max) {
   20619           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20620             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20621           0 :                                 return -1;
   20622             :                         }
   20623           0 :                         object->length = test_var;
   20624             :                 } else {
   20625           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20626             :                           PyLong_Type.tp_name);
   20627           0 :                         return -1;
   20628             :                 }
   20629             :         }
   20630           0 :         return 0;
   20631             : }
   20632             : 
   20633           0 : static PyObject *py_netr_OsVersion_get_dummy(PyObject *obj, void *closure)
   20634             : {
   20635           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(obj);
   20636           0 :         PyObject *py_dummy;
   20637           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)object->dummy);
   20638           0 :         return py_dummy;
   20639             : }
   20640             : 
   20641           0 : static int py_netr_OsVersion_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
   20642             : {
   20643           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(py_obj);
   20644           0 :         if (value == NULL) {
   20645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy");
   20646           0 :                 return -1;
   20647             :         }
   20648             :         {
   20649           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
   20650           0 :                 if (PyLong_Check(value)) {
   20651           0 :                         unsigned long long test_var;
   20652           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20653           0 :                         if (PyErr_Occurred() != NULL) {
   20654           0 :                                 return -1;
   20655             :                         }
   20656           0 :                         if (test_var > uint_max) {
   20657           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20658             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20659           0 :                                 return -1;
   20660             :                         }
   20661           0 :                         object->dummy = test_var;
   20662             :                 } else {
   20663           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20664             :                           PyLong_Type.tp_name);
   20665           0 :                         return -1;
   20666             :                 }
   20667             :         }
   20668           0 :         return 0;
   20669             : }
   20670             : 
   20671           0 : static PyObject *py_netr_OsVersion_get_size(PyObject *obj, void *closure)
   20672             : {
   20673           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(obj);
   20674           0 :         PyObject *py_size;
   20675           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)object->size);
   20676           0 :         return py_size;
   20677             : }
   20678             : 
   20679           0 : static int py_netr_OsVersion_set_size(PyObject *py_obj, PyObject *value, void *closure)
   20680             : {
   20681           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(py_obj);
   20682           0 :         if (value == NULL) {
   20683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   20684           0 :                 return -1;
   20685             :         }
   20686             :         {
   20687           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   20688           0 :                 if (PyLong_Check(value)) {
   20689           0 :                         unsigned long long test_var;
   20690           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20691           0 :                         if (PyErr_Occurred() != NULL) {
   20692           0 :                                 return -1;
   20693             :                         }
   20694           0 :                         if (test_var > uint_max) {
   20695           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20696             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20697           0 :                                 return -1;
   20698             :                         }
   20699           0 :                         object->size = test_var;
   20700             :                 } else {
   20701           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20702             :                           PyLong_Type.tp_name);
   20703           0 :                         return -1;
   20704             :                 }
   20705             :         }
   20706           0 :         return 0;
   20707             : }
   20708             : 
   20709           0 : static PyObject *py_netr_OsVersion_get_os(PyObject *obj, void *closure)
   20710             : {
   20711           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(obj);
   20712           0 :         PyObject *py_os;
   20713           0 :         py_os = pytalloc_reference_ex(&netr_OsVersionInfoEx_Type, pytalloc_get_mem_ctx(obj), &object->os);
   20714           0 :         return py_os;
   20715             : }
   20716             : 
   20717           0 : static int py_netr_OsVersion_set_os(PyObject *py_obj, PyObject *value, void *closure)
   20718             : {
   20719           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(py_obj);
   20720           0 :         if (value == NULL) {
   20721           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->os");
   20722           0 :                 return -1;
   20723             :         }
   20724           0 :         PY_CHECK_TYPE(&netr_OsVersionInfoEx_Type, value, return -1;);
   20725           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20726           0 :                 PyErr_NoMemory();
   20727           0 :                 return -1;
   20728             :         }
   20729           0 :         object->os = *(struct netr_OsVersionInfoEx *)pytalloc_get_ptr(value);
   20730           0 :         return 0;
   20731             : }
   20732             : 
   20733             : static PyGetSetDef py_netr_OsVersion_getsetters[] = {
   20734             :         {
   20735             :                 .name = discard_const_p(char, "length"),
   20736             :                 .get = py_netr_OsVersion_get_length,
   20737             :                 .set = py_netr_OsVersion_set_length,
   20738             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   20739             :         },
   20740             :         {
   20741             :                 .name = discard_const_p(char, "dummy"),
   20742             :                 .get = py_netr_OsVersion_get_dummy,
   20743             :                 .set = py_netr_OsVersion_set_dummy,
   20744             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   20745             :         },
   20746             :         {
   20747             :                 .name = discard_const_p(char, "size"),
   20748             :                 .get = py_netr_OsVersion_get_size,
   20749             :                 .set = py_netr_OsVersion_set_size,
   20750             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   20751             :         },
   20752             :         {
   20753             :                 .name = discard_const_p(char, "os"),
   20754             :                 .get = py_netr_OsVersion_get_os,
   20755             :                 .set = py_netr_OsVersion_set_os,
   20756             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersionInfoEx")
   20757             :         },
   20758             :         { .name = NULL }
   20759             : };
   20760             : 
   20761           0 : static PyObject *py_netr_OsVersion_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20762             : {
   20763           0 :         return pytalloc_new(struct netr_OsVersion, type);
   20764             : }
   20765             : 
   20766             : 
   20767             : static PyTypeObject netr_OsVersion_Type = {
   20768             :         PyVarObject_HEAD_INIT(NULL, 0)
   20769             :         .tp_name = "netlogon.netr_OsVersion",
   20770             :         .tp_getset = py_netr_OsVersion_getsetters,
   20771             :         .tp_methods = NULL,
   20772             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20773             :         .tp_new = py_netr_OsVersion_new,
   20774             : };
   20775             : 
   20776             : 
   20777           0 : static PyObject *py_netr_OsVersionContainer_get_length(PyObject *obj, void *closure)
   20778             : {
   20779           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(obj);
   20780           0 :         PyObject *py_length;
   20781           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
   20782           0 :         return py_length;
   20783             : }
   20784             : 
   20785           0 : static int py_netr_OsVersionContainer_set_length(PyObject *py_obj, PyObject *value, void *closure)
   20786             : {
   20787           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(py_obj);
   20788           0 :         if (value == NULL) {
   20789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   20790           0 :                 return -1;
   20791             :         }
   20792             :         {
   20793           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   20794           0 :                 if (PyLong_Check(value)) {
   20795           0 :                         unsigned long long test_var;
   20796           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20797           0 :                         if (PyErr_Occurred() != NULL) {
   20798           0 :                                 return -1;
   20799             :                         }
   20800           0 :                         if (test_var > uint_max) {
   20801           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20802             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20803           0 :                                 return -1;
   20804             :                         }
   20805           0 :                         object->length = test_var;
   20806             :                 } else {
   20807           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20808             :                           PyLong_Type.tp_name);
   20809           0 :                         return -1;
   20810             :                 }
   20811             :         }
   20812           0 :         return 0;
   20813             : }
   20814             : 
   20815           0 : static PyObject *py_netr_OsVersionContainer_get_size(PyObject *obj, void *closure)
   20816             : {
   20817           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(obj);
   20818           0 :         PyObject *py_size;
   20819           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
   20820           0 :         return py_size;
   20821             : }
   20822             : 
   20823           0 : static int py_netr_OsVersionContainer_set_size(PyObject *py_obj, PyObject *value, void *closure)
   20824             : {
   20825           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(py_obj);
   20826           0 :         if (value == NULL) {
   20827           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   20828           0 :                 return -1;
   20829             :         }
   20830             :         {
   20831           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   20832           0 :                 if (PyLong_Check(value)) {
   20833           0 :                         unsigned long long test_var;
   20834           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20835           0 :                         if (PyErr_Occurred() != NULL) {
   20836           0 :                                 return -1;
   20837             :                         }
   20838           0 :                         if (test_var > uint_max) {
   20839           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20840             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20841           0 :                                 return -1;
   20842             :                         }
   20843           0 :                         object->size = test_var;
   20844             :                 } else {
   20845           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20846             :                           PyLong_Type.tp_name);
   20847           0 :                         return -1;
   20848             :                 }
   20849             :         }
   20850           0 :         return 0;
   20851             : }
   20852             : 
   20853           0 : static PyObject *py_netr_OsVersionContainer_get_os(PyObject *obj, void *closure)
   20854             : {
   20855           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(obj);
   20856           0 :         PyObject *py_os;
   20857           0 :         if (object->os == NULL) {
   20858           0 :                 Py_RETURN_NONE;
   20859             :         }
   20860           0 :         if (object->os == NULL) {
   20861           0 :                 py_os = Py_None;
   20862           0 :                 Py_INCREF(py_os);
   20863             :         } else {
   20864           0 :                 py_os = pytalloc_reference_ex(&netr_OsVersion_Type, object->os, object->os);
   20865             :         }
   20866           0 :         return py_os;
   20867             : }
   20868             : 
   20869           0 : static int py_netr_OsVersionContainer_set_os(PyObject *py_obj, PyObject *value, void *closure)
   20870             : {
   20871           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(py_obj);
   20872           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->os));
   20873           0 :         if (value == NULL) {
   20874           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->os");
   20875           0 :                 return -1;
   20876             :         }
   20877           0 :         if (value == Py_None) {
   20878           0 :                 object->os = NULL;
   20879             :         } else {
   20880           0 :                 object->os = NULL;
   20881           0 :                 PY_CHECK_TYPE(&netr_OsVersion_Type, value, return -1;);
   20882           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20883           0 :                         PyErr_NoMemory();
   20884           0 :                         return -1;
   20885             :                 }
   20886           0 :                 object->os = (struct netr_OsVersion *)pytalloc_get_ptr(value);
   20887             :         }
   20888           0 :         return 0;
   20889             : }
   20890             : 
   20891             : static PyGetSetDef py_netr_OsVersionContainer_getsetters[] = {
   20892             :         {
   20893             :                 .name = discard_const_p(char, "length"),
   20894             :                 .get = py_netr_OsVersionContainer_get_length,
   20895             :                 .set = py_netr_OsVersionContainer_set_length,
   20896             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20897             :         },
   20898             :         {
   20899             :                 .name = discard_const_p(char, "size"),
   20900             :                 .get = py_netr_OsVersionContainer_get_size,
   20901             :                 .set = py_netr_OsVersionContainer_set_size,
   20902             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20903             :         },
   20904             :         {
   20905             :                 .name = discard_const_p(char, "os"),
   20906             :                 .get = py_netr_OsVersionContainer_get_os,
   20907             :                 .set = py_netr_OsVersionContainer_set_os,
   20908             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersion")
   20909             :         },
   20910             :         { .name = NULL }
   20911             : };
   20912             : 
   20913           0 : static PyObject *py_netr_OsVersionContainer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20914             : {
   20915           0 :         return pytalloc_new(struct netr_OsVersionContainer, type);
   20916             : }
   20917             : 
   20918             : 
   20919             : static PyTypeObject netr_OsVersionContainer_Type = {
   20920             :         PyVarObject_HEAD_INIT(NULL, 0)
   20921             :         .tp_name = "netlogon.netr_OsVersionContainer",
   20922             :         .tp_getset = py_netr_OsVersionContainer_getsetters,
   20923             :         .tp_methods = NULL,
   20924             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20925             :         .tp_new = py_netr_OsVersionContainer_new,
   20926             : };
   20927             : 
   20928             : 
   20929           0 : static PyObject *py_netr_WorkstationInformation_get_lsa_policy(PyObject *obj, void *closure)
   20930             : {
   20931           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   20932           0 :         PyObject *py_lsa_policy;
   20933           0 :         py_lsa_policy = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, pytalloc_get_mem_ctx(obj), &object->lsa_policy);
   20934           0 :         return py_lsa_policy;
   20935             : }
   20936             : 
   20937           0 : static int py_netr_WorkstationInformation_set_lsa_policy(PyObject *py_obj, PyObject *value, void *closure)
   20938             : {
   20939           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   20940           0 :         if (value == NULL) {
   20941           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lsa_policy");
   20942           0 :                 return -1;
   20943             :         }
   20944           0 :         PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, value, return -1;);
   20945           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20946           0 :                 PyErr_NoMemory();
   20947           0 :                 return -1;
   20948             :         }
   20949           0 :         object->lsa_policy = *(struct netr_LsaPolicyInformation *)pytalloc_get_ptr(value);
   20950           0 :         return 0;
   20951             : }
   20952             : 
   20953           0 : static PyObject *py_netr_WorkstationInformation_get_dns_hostname(PyObject *obj, void *closure)
   20954             : {
   20955           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   20956           0 :         PyObject *py_dns_hostname;
   20957           0 :         if (object->dns_hostname == NULL) {
   20958           0 :                 Py_RETURN_NONE;
   20959             :         }
   20960           0 :         if (object->dns_hostname == NULL) {
   20961           0 :                 py_dns_hostname = Py_None;
   20962           0 :                 Py_INCREF(py_dns_hostname);
   20963             :         } else {
   20964           0 :                 if (object->dns_hostname == NULL) {
   20965           0 :                         py_dns_hostname = Py_None;
   20966           0 :                         Py_INCREF(py_dns_hostname);
   20967             :                 } else {
   20968           0 :                         py_dns_hostname = PyUnicode_Decode(object->dns_hostname, strlen(object->dns_hostname), "utf-8", "ignore");
   20969             :                 }
   20970             :         }
   20971           0 :         return py_dns_hostname;
   20972             : }
   20973             : 
   20974          21 : static int py_netr_WorkstationInformation_set_dns_hostname(PyObject *py_obj, PyObject *value, void *closure)
   20975             : {
   20976          21 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   20977          21 :         if (value == NULL) {
   20978           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_hostname");
   20979           0 :                 return -1;
   20980             :         }
   20981          21 :         if (value == Py_None) {
   20982           0 :                 object->dns_hostname = NULL;
   20983             :         } else {
   20984          21 :                 object->dns_hostname = NULL;
   20985             :                 {
   20986           0 :                         const char *test_str;
   20987           0 :                         const char *talloc_str;
   20988          21 :                         PyObject *unicode = NULL;
   20989          21 :                         if (PyUnicode_Check(value)) {
   20990           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20991           0 :                                 if (unicode == NULL) {
   20992           0 :                                         PyErr_NoMemory();
   20993           0 :                                         return -1;
   20994             :                                 }
   20995           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20996          21 :                         } else if (PyBytes_Check(value)) {
   20997          21 :                                 test_str = PyBytes_AS_STRING(value);
   20998             :                         } else {
   20999           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21000           0 :                                 return -1;
   21001             :                         }
   21002          21 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21003          21 :                         if (unicode != NULL) {
   21004           0 :                                 Py_DECREF(unicode);
   21005             :                         }
   21006          21 :                         if (talloc_str == NULL) {
   21007           0 :                                 PyErr_NoMemory();
   21008           0 :                                 return -1;
   21009             :                         }
   21010          21 :                         object->dns_hostname = talloc_str;
   21011             :                 }
   21012             :         }
   21013          21 :         return 0;
   21014             : }
   21015             : 
   21016           0 : static PyObject *py_netr_WorkstationInformation_get_sitename(PyObject *obj, void *closure)
   21017             : {
   21018           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21019           0 :         PyObject *py_sitename;
   21020           0 :         if (object->sitename == NULL) {
   21021           0 :                 Py_RETURN_NONE;
   21022             :         }
   21023           0 :         if (object->sitename == NULL) {
   21024           0 :                 py_sitename = Py_None;
   21025           0 :                 Py_INCREF(py_sitename);
   21026             :         } else {
   21027           0 :                 if (object->sitename == NULL) {
   21028           0 :                         py_sitename = Py_None;
   21029           0 :                         Py_INCREF(py_sitename);
   21030             :                 } else {
   21031           0 :                         py_sitename = PyUnicode_Decode(object->sitename, strlen(object->sitename), "utf-8", "ignore");
   21032             :                 }
   21033             :         }
   21034           0 :         return py_sitename;
   21035             : }
   21036             : 
   21037           0 : static int py_netr_WorkstationInformation_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
   21038             : {
   21039           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21040           0 :         if (value == NULL) {
   21041           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename");
   21042           0 :                 return -1;
   21043             :         }
   21044           0 :         if (value == Py_None) {
   21045           0 :                 object->sitename = NULL;
   21046             :         } else {
   21047           0 :                 object->sitename = NULL;
   21048             :                 {
   21049           0 :                         const char *test_str;
   21050           0 :                         const char *talloc_str;
   21051           0 :                         PyObject *unicode = NULL;
   21052           0 :                         if (PyUnicode_Check(value)) {
   21053           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21054           0 :                                 if (unicode == NULL) {
   21055           0 :                                         PyErr_NoMemory();
   21056           0 :                                         return -1;
   21057             :                                 }
   21058           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21059           0 :                         } else if (PyBytes_Check(value)) {
   21060           0 :                                 test_str = PyBytes_AS_STRING(value);
   21061             :                         } else {
   21062           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21063           0 :                                 return -1;
   21064             :                         }
   21065           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21066           0 :                         if (unicode != NULL) {
   21067           0 :                                 Py_DECREF(unicode);
   21068             :                         }
   21069           0 :                         if (talloc_str == NULL) {
   21070           0 :                                 PyErr_NoMemory();
   21071           0 :                                 return -1;
   21072             :                         }
   21073           0 :                         object->sitename = talloc_str;
   21074             :                 }
   21075             :         }
   21076           0 :         return 0;
   21077             : }
   21078             : 
   21079           0 : static PyObject *py_netr_WorkstationInformation_get_dummy1(PyObject *obj, void *closure)
   21080             : {
   21081           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21082           0 :         PyObject *py_dummy1;
   21083           0 :         if (object->dummy1 == NULL) {
   21084           0 :                 Py_RETURN_NONE;
   21085             :         }
   21086           0 :         if (object->dummy1 == NULL) {
   21087           0 :                 py_dummy1 = Py_None;
   21088           0 :                 Py_INCREF(py_dummy1);
   21089             :         } else {
   21090           0 :                 if (object->dummy1 == NULL) {
   21091           0 :                         py_dummy1 = Py_None;
   21092           0 :                         Py_INCREF(py_dummy1);
   21093             :                 } else {
   21094           0 :                         py_dummy1 = PyUnicode_Decode(object->dummy1, strlen(object->dummy1), "utf-8", "ignore");
   21095             :                 }
   21096             :         }
   21097           0 :         return py_dummy1;
   21098             : }
   21099             : 
   21100           0 : static int py_netr_WorkstationInformation_set_dummy1(PyObject *py_obj, PyObject *value, void *closure)
   21101             : {
   21102           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21103           0 :         if (value == NULL) {
   21104           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy1");
   21105           0 :                 return -1;
   21106             :         }
   21107           0 :         if (value == Py_None) {
   21108           0 :                 object->dummy1 = NULL;
   21109             :         } else {
   21110           0 :                 object->dummy1 = NULL;
   21111             :                 {
   21112           0 :                         const char *test_str;
   21113           0 :                         const char *talloc_str;
   21114           0 :                         PyObject *unicode = NULL;
   21115           0 :                         if (PyUnicode_Check(value)) {
   21116           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21117           0 :                                 if (unicode == NULL) {
   21118           0 :                                         PyErr_NoMemory();
   21119           0 :                                         return -1;
   21120             :                                 }
   21121           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21122           0 :                         } else if (PyBytes_Check(value)) {
   21123           0 :                                 test_str = PyBytes_AS_STRING(value);
   21124             :                         } else {
   21125           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21126           0 :                                 return -1;
   21127             :                         }
   21128           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21129           0 :                         if (unicode != NULL) {
   21130           0 :                                 Py_DECREF(unicode);
   21131             :                         }
   21132           0 :                         if (talloc_str == NULL) {
   21133           0 :                                 PyErr_NoMemory();
   21134           0 :                                 return -1;
   21135             :                         }
   21136           0 :                         object->dummy1 = talloc_str;
   21137             :                 }
   21138             :         }
   21139           0 :         return 0;
   21140             : }
   21141             : 
   21142           0 : static PyObject *py_netr_WorkstationInformation_get_dummy2(PyObject *obj, void *closure)
   21143             : {
   21144           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21145           0 :         PyObject *py_dummy2;
   21146           0 :         if (object->dummy2 == NULL) {
   21147           0 :                 Py_RETURN_NONE;
   21148             :         }
   21149           0 :         if (object->dummy2 == NULL) {
   21150           0 :                 py_dummy2 = Py_None;
   21151           0 :                 Py_INCREF(py_dummy2);
   21152             :         } else {
   21153           0 :                 if (object->dummy2 == NULL) {
   21154           0 :                         py_dummy2 = Py_None;
   21155           0 :                         Py_INCREF(py_dummy2);
   21156             :                 } else {
   21157           0 :                         py_dummy2 = PyUnicode_Decode(object->dummy2, strlen(object->dummy2), "utf-8", "ignore");
   21158             :                 }
   21159             :         }
   21160           0 :         return py_dummy2;
   21161             : }
   21162             : 
   21163           0 : static int py_netr_WorkstationInformation_set_dummy2(PyObject *py_obj, PyObject *value, void *closure)
   21164             : {
   21165           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21166           0 :         if (value == NULL) {
   21167           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy2");
   21168           0 :                 return -1;
   21169             :         }
   21170           0 :         if (value == Py_None) {
   21171           0 :                 object->dummy2 = NULL;
   21172             :         } else {
   21173           0 :                 object->dummy2 = NULL;
   21174             :                 {
   21175           0 :                         const char *test_str;
   21176           0 :                         const char *talloc_str;
   21177           0 :                         PyObject *unicode = NULL;
   21178           0 :                         if (PyUnicode_Check(value)) {
   21179           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21180           0 :                                 if (unicode == NULL) {
   21181           0 :                                         PyErr_NoMemory();
   21182           0 :                                         return -1;
   21183             :                                 }
   21184           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21185           0 :                         } else if (PyBytes_Check(value)) {
   21186           0 :                                 test_str = PyBytes_AS_STRING(value);
   21187             :                         } else {
   21188           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21189           0 :                                 return -1;
   21190             :                         }
   21191           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21192           0 :                         if (unicode != NULL) {
   21193           0 :                                 Py_DECREF(unicode);
   21194             :                         }
   21195           0 :                         if (talloc_str == NULL) {
   21196           0 :                                 PyErr_NoMemory();
   21197           0 :                                 return -1;
   21198             :                         }
   21199           0 :                         object->dummy2 = talloc_str;
   21200             :                 }
   21201             :         }
   21202           0 :         return 0;
   21203             : }
   21204             : 
   21205           0 : static PyObject *py_netr_WorkstationInformation_get_dummy3(PyObject *obj, void *closure)
   21206             : {
   21207           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21208           0 :         PyObject *py_dummy3;
   21209           0 :         if (object->dummy3 == NULL) {
   21210           0 :                 Py_RETURN_NONE;
   21211             :         }
   21212           0 :         if (object->dummy3 == NULL) {
   21213           0 :                 py_dummy3 = Py_None;
   21214           0 :                 Py_INCREF(py_dummy3);
   21215             :         } else {
   21216           0 :                 if (object->dummy3 == NULL) {
   21217           0 :                         py_dummy3 = Py_None;
   21218           0 :                         Py_INCREF(py_dummy3);
   21219             :                 } else {
   21220           0 :                         py_dummy3 = PyUnicode_Decode(object->dummy3, strlen(object->dummy3), "utf-8", "ignore");
   21221             :                 }
   21222             :         }
   21223           0 :         return py_dummy3;
   21224             : }
   21225             : 
   21226           0 : static int py_netr_WorkstationInformation_set_dummy3(PyObject *py_obj, PyObject *value, void *closure)
   21227             : {
   21228           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21229           0 :         if (value == NULL) {
   21230           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy3");
   21231           0 :                 return -1;
   21232             :         }
   21233           0 :         if (value == Py_None) {
   21234           0 :                 object->dummy3 = NULL;
   21235             :         } else {
   21236           0 :                 object->dummy3 = NULL;
   21237             :                 {
   21238           0 :                         const char *test_str;
   21239           0 :                         const char *talloc_str;
   21240           0 :                         PyObject *unicode = NULL;
   21241           0 :                         if (PyUnicode_Check(value)) {
   21242           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21243           0 :                                 if (unicode == NULL) {
   21244           0 :                                         PyErr_NoMemory();
   21245           0 :                                         return -1;
   21246             :                                 }
   21247           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21248           0 :                         } else if (PyBytes_Check(value)) {
   21249           0 :                                 test_str = PyBytes_AS_STRING(value);
   21250             :                         } else {
   21251           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21252           0 :                                 return -1;
   21253             :                         }
   21254           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21255           0 :                         if (unicode != NULL) {
   21256           0 :                                 Py_DECREF(unicode);
   21257             :                         }
   21258           0 :                         if (talloc_str == NULL) {
   21259           0 :                                 PyErr_NoMemory();
   21260           0 :                                 return -1;
   21261             :                         }
   21262           0 :                         object->dummy3 = talloc_str;
   21263             :                 }
   21264             :         }
   21265           0 :         return 0;
   21266             : }
   21267             : 
   21268           0 : static PyObject *py_netr_WorkstationInformation_get_dummy4(PyObject *obj, void *closure)
   21269             : {
   21270           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21271           0 :         PyObject *py_dummy4;
   21272           0 :         if (object->dummy4 == NULL) {
   21273           0 :                 Py_RETURN_NONE;
   21274             :         }
   21275           0 :         if (object->dummy4 == NULL) {
   21276           0 :                 py_dummy4 = Py_None;
   21277           0 :                 Py_INCREF(py_dummy4);
   21278             :         } else {
   21279           0 :                 if (object->dummy4 == NULL) {
   21280           0 :                         py_dummy4 = Py_None;
   21281           0 :                         Py_INCREF(py_dummy4);
   21282             :                 } else {
   21283           0 :                         py_dummy4 = PyUnicode_Decode(object->dummy4, strlen(object->dummy4), "utf-8", "ignore");
   21284             :                 }
   21285             :         }
   21286           0 :         return py_dummy4;
   21287             : }
   21288             : 
   21289           0 : static int py_netr_WorkstationInformation_set_dummy4(PyObject *py_obj, PyObject *value, void *closure)
   21290             : {
   21291           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21292           0 :         if (value == NULL) {
   21293           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy4");
   21294           0 :                 return -1;
   21295             :         }
   21296           0 :         if (value == Py_None) {
   21297           0 :                 object->dummy4 = NULL;
   21298             :         } else {
   21299           0 :                 object->dummy4 = NULL;
   21300             :                 {
   21301           0 :                         const char *test_str;
   21302           0 :                         const char *talloc_str;
   21303           0 :                         PyObject *unicode = NULL;
   21304           0 :                         if (PyUnicode_Check(value)) {
   21305           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21306           0 :                                 if (unicode == NULL) {
   21307           0 :                                         PyErr_NoMemory();
   21308           0 :                                         return -1;
   21309             :                                 }
   21310           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21311           0 :                         } else if (PyBytes_Check(value)) {
   21312           0 :                                 test_str = PyBytes_AS_STRING(value);
   21313             :                         } else {
   21314           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21315           0 :                                 return -1;
   21316             :                         }
   21317           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21318           0 :                         if (unicode != NULL) {
   21319           0 :                                 Py_DECREF(unicode);
   21320             :                         }
   21321           0 :                         if (talloc_str == NULL) {
   21322           0 :                                 PyErr_NoMemory();
   21323           0 :                                 return -1;
   21324             :                         }
   21325           0 :                         object->dummy4 = talloc_str;
   21326             :                 }
   21327             :         }
   21328           0 :         return 0;
   21329             : }
   21330             : 
   21331           0 : static PyObject *py_netr_WorkstationInformation_get_os_version(PyObject *obj, void *closure)
   21332             : {
   21333           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21334           0 :         PyObject *py_os_version;
   21335           0 :         py_os_version = pytalloc_reference_ex(&netr_OsVersionContainer_Type, pytalloc_get_mem_ctx(obj), &object->os_version);
   21336           0 :         return py_os_version;
   21337             : }
   21338             : 
   21339           0 : static int py_netr_WorkstationInformation_set_os_version(PyObject *py_obj, PyObject *value, void *closure)
   21340             : {
   21341           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21342           0 :         if (value == NULL) {
   21343           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->os_version");
   21344           0 :                 return -1;
   21345             :         }
   21346           0 :         PY_CHECK_TYPE(&netr_OsVersionContainer_Type, value, return -1;);
   21347           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21348           0 :                 PyErr_NoMemory();
   21349           0 :                 return -1;
   21350             :         }
   21351           0 :         object->os_version = *(struct netr_OsVersionContainer *)pytalloc_get_ptr(value);
   21352           0 :         return 0;
   21353             : }
   21354             : 
   21355           0 : static PyObject *py_netr_WorkstationInformation_get_os_name(PyObject *obj, void *closure)
   21356             : {
   21357           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21358           0 :         PyObject *py_os_name;
   21359           0 :         py_os_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->os_name);
   21360           0 :         return py_os_name;
   21361             : }
   21362             : 
   21363          21 : static int py_netr_WorkstationInformation_set_os_name(PyObject *py_obj, PyObject *value, void *closure)
   21364             : {
   21365          21 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21366          21 :         if (value == NULL) {
   21367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->os_name");
   21368           0 :                 return -1;
   21369             :         }
   21370          21 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   21371          21 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21372           0 :                 PyErr_NoMemory();
   21373           0 :                 return -1;
   21374             :         }
   21375          21 :         object->os_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   21376          21 :         return 0;
   21377             : }
   21378             : 
   21379           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_string3(PyObject *obj, void *closure)
   21380             : {
   21381           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21382           0 :         PyObject *py_dummy_string3;
   21383           0 :         py_dummy_string3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
   21384           0 :         return py_dummy_string3;
   21385             : }
   21386             : 
   21387           0 : static int py_netr_WorkstationInformation_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
   21388             : {
   21389           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21390           0 :         if (value == NULL) {
   21391           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string3");
   21392           0 :                 return -1;
   21393             :         }
   21394           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   21395           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21396           0 :                 PyErr_NoMemory();
   21397           0 :                 return -1;
   21398             :         }
   21399           0 :         object->dummy_string3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   21400           0 :         return 0;
   21401             : }
   21402             : 
   21403           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_string4(PyObject *obj, void *closure)
   21404             : {
   21405           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21406           0 :         PyObject *py_dummy_string4;
   21407           0 :         py_dummy_string4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
   21408           0 :         return py_dummy_string4;
   21409             : }
   21410             : 
   21411           0 : static int py_netr_WorkstationInformation_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
   21412             : {
   21413           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21414           0 :         if (value == NULL) {
   21415           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string4");
   21416           0 :                 return -1;
   21417             :         }
   21418           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   21419           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21420           0 :                 PyErr_NoMemory();
   21421           0 :                 return -1;
   21422             :         }
   21423           0 :         object->dummy_string4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   21424           0 :         return 0;
   21425             : }
   21426             : 
   21427           0 : static PyObject *py_netr_WorkstationInformation_get_workstation_flags(PyObject *obj, void *closure)
   21428             : {
   21429           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21430           0 :         PyObject *py_workstation_flags;
   21431           0 :         py_workstation_flags = PyLong_FromUnsignedLongLong((uint32_t)object->workstation_flags);
   21432           0 :         return py_workstation_flags;
   21433             : }
   21434             : 
   21435           3 : static int py_netr_WorkstationInformation_set_workstation_flags(PyObject *py_obj, PyObject *value, void *closure)
   21436             : {
   21437           3 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21438           3 :         if (value == NULL) {
   21439           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstation_flags");
   21440           0 :                 return -1;
   21441             :         }
   21442             :         {
   21443           3 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->workstation_flags));
   21444           3 :                 if (PyLong_Check(value)) {
   21445           0 :                         unsigned long long test_var;
   21446           3 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21447           3 :                         if (PyErr_Occurred() != NULL) {
   21448           0 :                                 return -1;
   21449             :                         }
   21450           3 :                         if (test_var > uint_max) {
   21451           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21452             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21453           0 :                                 return -1;
   21454             :                         }
   21455           3 :                         object->workstation_flags = test_var;
   21456             :                 } else {
   21457           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21458             :                           PyLong_Type.tp_name);
   21459           0 :                         return -1;
   21460             :                 }
   21461             :         }
   21462           3 :         return 0;
   21463             : }
   21464             : 
   21465           0 : static PyObject *py_netr_WorkstationInformation_get_supported_enc_types(PyObject *obj, void *closure)
   21466             : {
   21467           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21468           0 :         PyObject *py_supported_enc_types;
   21469           0 :         py_supported_enc_types = PyLong_FromUnsignedLongLong((uint32_t)object->supported_enc_types);
   21470           0 :         return py_supported_enc_types;
   21471             : }
   21472             : 
   21473           0 : static int py_netr_WorkstationInformation_set_supported_enc_types(PyObject *py_obj, PyObject *value, void *closure)
   21474             : {
   21475           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21476           0 :         if (value == NULL) {
   21477           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_enc_types");
   21478           0 :                 return -1;
   21479             :         }
   21480             :         {
   21481           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_enc_types));
   21482           0 :                 if (PyLong_Check(value)) {
   21483           0 :                         unsigned long long test_var;
   21484           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21485           0 :                         if (PyErr_Occurred() != NULL) {
   21486           0 :                                 return -1;
   21487             :                         }
   21488           0 :                         if (test_var > uint_max) {
   21489           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21490             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21491           0 :                                 return -1;
   21492             :                         }
   21493           0 :                         object->supported_enc_types = test_var;
   21494             :                 } else {
   21495           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21496             :                           PyLong_Type.tp_name);
   21497           0 :                         return -1;
   21498             :                 }
   21499             :         }
   21500           0 :         return 0;
   21501             : }
   21502             : 
   21503           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_long3(PyObject *obj, void *closure)
   21504             : {
   21505           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21506           0 :         PyObject *py_dummy_long3;
   21507           0 :         py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long3);
   21508           0 :         return py_dummy_long3;
   21509             : }
   21510             : 
   21511           0 : static int py_netr_WorkstationInformation_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
   21512             : {
   21513           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21514           0 :         if (value == NULL) {
   21515           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long3");
   21516           0 :                 return -1;
   21517             :         }
   21518             :         {
   21519           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
   21520           0 :                 if (PyLong_Check(value)) {
   21521           0 :                         unsigned long long test_var;
   21522           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21523           0 :                         if (PyErr_Occurred() != NULL) {
   21524           0 :                                 return -1;
   21525             :                         }
   21526           0 :                         if (test_var > uint_max) {
   21527           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21528             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21529           0 :                                 return -1;
   21530             :                         }
   21531           0 :                         object->dummy_long3 = test_var;
   21532             :                 } else {
   21533           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21534             :                           PyLong_Type.tp_name);
   21535           0 :                         return -1;
   21536             :                 }
   21537             :         }
   21538           0 :         return 0;
   21539             : }
   21540             : 
   21541           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_long4(PyObject *obj, void *closure)
   21542             : {
   21543           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21544           0 :         PyObject *py_dummy_long4;
   21545           0 :         py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long4);
   21546           0 :         return py_dummy_long4;
   21547             : }
   21548             : 
   21549           0 : static int py_netr_WorkstationInformation_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
   21550             : {
   21551           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21552           0 :         if (value == NULL) {
   21553           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long4");
   21554           0 :                 return -1;
   21555             :         }
   21556             :         {
   21557           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
   21558           0 :                 if (PyLong_Check(value)) {
   21559           0 :                         unsigned long long test_var;
   21560           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21561           0 :                         if (PyErr_Occurred() != NULL) {
   21562           0 :                                 return -1;
   21563             :                         }
   21564           0 :                         if (test_var > uint_max) {
   21565           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21566             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21567           0 :                                 return -1;
   21568             :                         }
   21569           0 :                         object->dummy_long4 = test_var;
   21570             :                 } else {
   21571           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21572             :                           PyLong_Type.tp_name);
   21573           0 :                         return -1;
   21574             :                 }
   21575             :         }
   21576           0 :         return 0;
   21577             : }
   21578             : 
   21579             : static PyGetSetDef py_netr_WorkstationInformation_getsetters[] = {
   21580             :         {
   21581             :                 .name = discard_const_p(char, "lsa_policy"),
   21582             :                 .get = py_netr_WorkstationInformation_get_lsa_policy,
   21583             :                 .set = py_netr_WorkstationInformation_set_lsa_policy,
   21584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LsaPolicyInformation")
   21585             :         },
   21586             :         {
   21587             :                 .name = discard_const_p(char, "dns_hostname"),
   21588             :                 .get = py_netr_WorkstationInformation_get_dns_hostname,
   21589             :                 .set = py_netr_WorkstationInformation_set_dns_hostname,
   21590             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21591             :         },
   21592             :         {
   21593             :                 .name = discard_const_p(char, "sitename"),
   21594             :                 .get = py_netr_WorkstationInformation_get_sitename,
   21595             :                 .set = py_netr_WorkstationInformation_set_sitename,
   21596             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21597             :         },
   21598             :         {
   21599             :                 .name = discard_const_p(char, "dummy1"),
   21600             :                 .get = py_netr_WorkstationInformation_get_dummy1,
   21601             :                 .set = py_netr_WorkstationInformation_set_dummy1,
   21602             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21603             :         },
   21604             :         {
   21605             :                 .name = discard_const_p(char, "dummy2"),
   21606             :                 .get = py_netr_WorkstationInformation_get_dummy2,
   21607             :                 .set = py_netr_WorkstationInformation_set_dummy2,
   21608             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21609             :         },
   21610             :         {
   21611             :                 .name = discard_const_p(char, "dummy3"),
   21612             :                 .get = py_netr_WorkstationInformation_get_dummy3,
   21613             :                 .set = py_netr_WorkstationInformation_set_dummy3,
   21614             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21615             :         },
   21616             :         {
   21617             :                 .name = discard_const_p(char, "dummy4"),
   21618             :                 .get = py_netr_WorkstationInformation_get_dummy4,
   21619             :                 .set = py_netr_WorkstationInformation_set_dummy4,
   21620             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21621             :         },
   21622             :         {
   21623             :                 .name = discard_const_p(char, "os_version"),
   21624             :                 .get = py_netr_WorkstationInformation_get_os_version,
   21625             :                 .set = py_netr_WorkstationInformation_set_os_version,
   21626             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersionContainer")
   21627             :         },
   21628             :         {
   21629             :                 .name = discard_const_p(char, "os_name"),
   21630             :                 .get = py_netr_WorkstationInformation_get_os_name,
   21631             :                 .set = py_netr_WorkstationInformation_set_os_name,
   21632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   21633             :         },
   21634             :         {
   21635             :                 .name = discard_const_p(char, "dummy_string3"),
   21636             :                 .get = py_netr_WorkstationInformation_get_dummy_string3,
   21637             :                 .set = py_netr_WorkstationInformation_set_dummy_string3,
   21638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   21639             :         },
   21640             :         {
   21641             :                 .name = discard_const_p(char, "dummy_string4"),
   21642             :                 .get = py_netr_WorkstationInformation_get_dummy_string4,
   21643             :                 .set = py_netr_WorkstationInformation_set_dummy_string4,
   21644             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   21645             :         },
   21646             :         {
   21647             :                 .name = discard_const_p(char, "workstation_flags"),
   21648             :                 .get = py_netr_WorkstationInformation_get_workstation_flags,
   21649             :                 .set = py_netr_WorkstationInformation_set_workstation_flags,
   21650             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationFlags")
   21651             :         },
   21652             :         {
   21653             :                 .name = discard_const_p(char, "supported_enc_types"),
   21654             :                 .get = py_netr_WorkstationInformation_get_supported_enc_types,
   21655             :                 .set = py_netr_WorkstationInformation_set_supported_enc_types,
   21656             :                 .doc = discard_const_p(char, "PIDL-generated element of base type kerb_EncTypes")
   21657             :         },
   21658             :         {
   21659             :                 .name = discard_const_p(char, "dummy_long3"),
   21660             :                 .get = py_netr_WorkstationInformation_get_dummy_long3,
   21661             :                 .set = py_netr_WorkstationInformation_set_dummy_long3,
   21662             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21663             :         },
   21664             :         {
   21665             :                 .name = discard_const_p(char, "dummy_long4"),
   21666             :                 .get = py_netr_WorkstationInformation_get_dummy_long4,
   21667             :                 .set = py_netr_WorkstationInformation_set_dummy_long4,
   21668             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21669             :         },
   21670             :         { .name = NULL }
   21671             : };
   21672             : 
   21673          31 : static PyObject *py_netr_WorkstationInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21674             : {
   21675          31 :         return pytalloc_new(struct netr_WorkstationInformation, type);
   21676             : }
   21677             : 
   21678             : 
   21679             : static PyTypeObject netr_WorkstationInformation_Type = {
   21680             :         PyVarObject_HEAD_INIT(NULL, 0)
   21681             :         .tp_name = "netlogon.netr_WorkstationInformation",
   21682             :         .tp_getset = py_netr_WorkstationInformation_getsetters,
   21683             :         .tp_methods = NULL,
   21684             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21685             :         .tp_new = py_netr_WorkstationInformation_new,
   21686             : };
   21687             : 
   21688           0 : static PyObject *py_import_netr_WorkstationInfo(TALLOC_CTX *mem_ctx, int level, union netr_WorkstationInfo *in)
   21689             : {
   21690           0 :         PyObject *ret;
   21691             : 
   21692           0 :         switch (level) {
   21693           0 :                 case 1:
   21694           0 :                         if (in->workstation_info == NULL) {
   21695           0 :                                 ret = Py_None;
   21696           0 :                                 Py_INCREF(ret);
   21697             :                         } else {
   21698           0 :                                 ret = pytalloc_reference_ex(&netr_WorkstationInformation_Type, in->workstation_info, in->workstation_info);
   21699             :                         }
   21700           0 :                         return ret;
   21701             : 
   21702           0 :                 case 2:
   21703           0 :                         if (in->lsa_policy_info == NULL) {
   21704           0 :                                 ret = Py_None;
   21705           0 :                                 Py_INCREF(ret);
   21706             :                         } else {
   21707           0 :                                 ret = pytalloc_reference_ex(&netr_WorkstationInformation_Type, in->lsa_policy_info, in->lsa_policy_info);
   21708             :                         }
   21709           0 :                         return ret;
   21710             : 
   21711             :         }
   21712           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   21713           0 :         return NULL;
   21714             : }
   21715             : 
   21716          31 : static union netr_WorkstationInfo *py_export_netr_WorkstationInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   21717             : {
   21718          31 :         union netr_WorkstationInfo *ret = talloc_zero(mem_ctx, union netr_WorkstationInfo);
   21719          31 :         switch (level) {
   21720          21 :                 case 1:
   21721          21 :                         if (in == NULL) {
   21722           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->workstation_info");
   21723           0 :                                 talloc_free(ret); return NULL;
   21724             :                         }
   21725          21 :                         if (in == Py_None) {
   21726           0 :                                 ret->workstation_info = NULL;
   21727             :                         } else {
   21728          21 :                                 ret->workstation_info = NULL;
   21729          21 :                                 PY_CHECK_TYPE(&netr_WorkstationInformation_Type, in, talloc_free(ret); return NULL;);
   21730          21 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   21731           0 :                                         PyErr_NoMemory();
   21732           0 :                                         talloc_free(ret); return NULL;
   21733             :                                 }
   21734          21 :                                 ret->workstation_info = (struct netr_WorkstationInformation *)pytalloc_get_ptr(in);
   21735             :                         }
   21736          21 :                         break;
   21737             : 
   21738          10 :                 case 2:
   21739          10 :                         if (in == NULL) {
   21740           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->lsa_policy_info");
   21741           0 :                                 talloc_free(ret); return NULL;
   21742             :                         }
   21743          10 :                         if (in == Py_None) {
   21744           0 :                                 ret->lsa_policy_info = NULL;
   21745             :                         } else {
   21746          10 :                                 ret->lsa_policy_info = NULL;
   21747          10 :                                 PY_CHECK_TYPE(&netr_WorkstationInformation_Type, in, talloc_free(ret); return NULL;);
   21748          10 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   21749           0 :                                         PyErr_NoMemory();
   21750           0 :                                         talloc_free(ret); return NULL;
   21751             :                                 }
   21752          10 :                                 ret->lsa_policy_info = (struct netr_WorkstationInformation *)pytalloc_get_ptr(in);
   21753             :                         }
   21754          10 :                         break;
   21755             : 
   21756           0 :                 default:
   21757           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   21758           0 :                         talloc_free(ret);
   21759           0 :                         ret = NULL;
   21760             :         }
   21761             : 
   21762          31 :         return ret;
   21763             : }
   21764             : 
   21765           0 : static PyObject *py_netr_WorkstationInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21766             : {
   21767           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   21768           0 :         PyObject *mem_ctx_obj = NULL;
   21769           0 :         TALLOC_CTX *mem_ctx = NULL;
   21770           0 :         int level = 0;
   21771           0 :         PyObject *in_obj = NULL;
   21772           0 :         union netr_WorkstationInfo *in = NULL;
   21773             : 
   21774           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   21775             :                 discard_const_p(char *, kwnames),
   21776             :                 &mem_ctx_obj,
   21777             :                 &level,
   21778             :                 &in_obj)) {
   21779           0 :                 return NULL;
   21780             :         }
   21781           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   21782           0 :         if (mem_ctx == NULL) {
   21783           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   21784           0 :                 return NULL;
   21785             :         }
   21786           0 :         in = (union netr_WorkstationInfo *)pytalloc_get_ptr(in_obj);
   21787           0 :         if (in == NULL) {
   21788           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_WorkstationInfo!");
   21789           0 :                 return NULL;
   21790             :         }
   21791             : 
   21792           0 :         return py_import_netr_WorkstationInfo(mem_ctx, level, in);
   21793             : }
   21794             : 
   21795          31 : static PyObject *py_netr_WorkstationInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21796             : {
   21797          31 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   21798          31 :         PyObject *mem_ctx_obj = NULL;
   21799          31 :         TALLOC_CTX *mem_ctx = NULL;
   21800          31 :         int level = 0;
   21801          31 :         PyObject *in = NULL;
   21802          31 :         union netr_WorkstationInfo *out = NULL;
   21803             : 
   21804          31 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   21805             :                 discard_const_p(char *, kwnames),
   21806             :                 &mem_ctx_obj,
   21807             :                 &level,
   21808             :                 &in)) {
   21809           0 :                 return NULL;
   21810             :         }
   21811          31 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   21812          31 :         if (mem_ctx == NULL) {
   21813           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   21814           0 :                 return NULL;
   21815             :         }
   21816             : 
   21817          31 :         out = py_export_netr_WorkstationInfo(mem_ctx, level, in);
   21818          31 :         if (out == NULL) {
   21819           0 :                 return NULL;
   21820             :         }
   21821             : 
   21822          31 :         return pytalloc_GenericObject_reference(out);
   21823             : }
   21824             : 
   21825             : static PyMethodDef py_netr_WorkstationInfo_methods[] = {
   21826             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_WorkstationInfo_import),
   21827             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   21828             :                 "T.__import__(mem_ctx, level, in) => ret." },
   21829             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_WorkstationInfo_export),
   21830             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   21831             :                 "T.__export__(mem_ctx, level, in) => ret." },
   21832             :         { NULL, NULL, 0, NULL }
   21833             : };
   21834             : 
   21835           0 : static PyObject *py_netr_WorkstationInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21836             : {
   21837           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   21838           0 :         return NULL;
   21839             : }
   21840             : 
   21841             : 
   21842             : static PyTypeObject netr_WorkstationInfo_Type = {
   21843             :         PyVarObject_HEAD_INIT(NULL, 0)
   21844             :         .tp_name = "netlogon.netr_WorkstationInfo",
   21845             :         .tp_getset = NULL,
   21846             :         .tp_methods = py_netr_WorkstationInfo_methods,
   21847             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21848             :         .tp_new = py_netr_WorkstationInfo_new,
   21849             : };
   21850             : 
   21851             : 
   21852           0 : static PyObject *py_netr_trust_extension_info_get_flags(PyObject *obj, void *closure)
   21853             : {
   21854           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(obj);
   21855           0 :         PyObject *py_flags;
   21856           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
   21857           0 :         return py_flags;
   21858             : }
   21859             : 
   21860           0 : static int py_netr_trust_extension_info_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   21861             : {
   21862           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(py_obj);
   21863           0 :         if (value == NULL) {
   21864           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   21865           0 :                 return -1;
   21866             :         }
   21867             :         {
   21868           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   21869           0 :                 if (PyLong_Check(value)) {
   21870           0 :                         unsigned long long test_var;
   21871           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21872           0 :                         if (PyErr_Occurred() != NULL) {
   21873           0 :                                 return -1;
   21874             :                         }
   21875           0 :                         if (test_var > uint_max) {
   21876           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21877             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21878           0 :                                 return -1;
   21879             :                         }
   21880           0 :                         object->flags = test_var;
   21881             :                 } else {
   21882           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21883             :                           PyLong_Type.tp_name);
   21884           0 :                         return -1;
   21885             :                 }
   21886             :         }
   21887           0 :         return 0;
   21888             : }
   21889             : 
   21890           0 : static PyObject *py_netr_trust_extension_info_get_parent_index(PyObject *obj, void *closure)
   21891             : {
   21892           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(obj);
   21893           0 :         PyObject *py_parent_index;
   21894           0 :         py_parent_index = PyLong_FromUnsignedLongLong((uint32_t)object->parent_index);
   21895           0 :         return py_parent_index;
   21896             : }
   21897             : 
   21898           0 : static int py_netr_trust_extension_info_set_parent_index(PyObject *py_obj, PyObject *value, void *closure)
   21899             : {
   21900           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(py_obj);
   21901           0 :         if (value == NULL) {
   21902           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parent_index");
   21903           0 :                 return -1;
   21904             :         }
   21905             :         {
   21906           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parent_index));
   21907           0 :                 if (PyLong_Check(value)) {
   21908           0 :                         unsigned long long test_var;
   21909           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21910           0 :                         if (PyErr_Occurred() != NULL) {
   21911           0 :                                 return -1;
   21912             :                         }
   21913           0 :                         if (test_var > uint_max) {
   21914           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21915             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21916           0 :                                 return -1;
   21917             :                         }
   21918           0 :                         object->parent_index = test_var;
   21919             :                 } else {
   21920           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21921             :                           PyLong_Type.tp_name);
   21922           0 :                         return -1;
   21923             :                 }
   21924             :         }
   21925           0 :         return 0;
   21926             : }
   21927             : 
   21928           0 : static PyObject *py_netr_trust_extension_info_get_trust_type(PyObject *obj, void *closure)
   21929             : {
   21930           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(obj);
   21931           0 :         PyObject *py_trust_type;
   21932           0 :         py_trust_type = PyLong_FromUnsignedLongLong((uint32_t)object->trust_type);
   21933           0 :         return py_trust_type;
   21934             : }
   21935             : 
   21936           0 : static int py_netr_trust_extension_info_set_trust_type(PyObject *py_obj, PyObject *value, void *closure)
   21937             : {
   21938           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(py_obj);
   21939           0 :         if (value == NULL) {
   21940           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_type");
   21941           0 :                 return -1;
   21942             :         }
   21943             :         {
   21944           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_type));
   21945           0 :                 if (PyLong_Check(value)) {
   21946           0 :                         unsigned long long test_var;
   21947           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21948           0 :                         if (PyErr_Occurred() != NULL) {
   21949           0 :                                 return -1;
   21950             :                         }
   21951           0 :                         if (test_var > uint_max) {
   21952           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21953             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21954           0 :                                 return -1;
   21955             :                         }
   21956           0 :                         object->trust_type = test_var;
   21957             :                 } else {
   21958           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21959             :                           PyLong_Type.tp_name);
   21960           0 :                         return -1;
   21961             :                 }
   21962             :         }
   21963           0 :         return 0;
   21964             : }
   21965             : 
   21966           0 : static PyObject *py_netr_trust_extension_info_get_trust_attributes(PyObject *obj, void *closure)
   21967             : {
   21968           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(obj);
   21969           0 :         PyObject *py_trust_attributes;
   21970           0 :         py_trust_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->trust_attributes);
   21971           0 :         return py_trust_attributes;
   21972             : }
   21973             : 
   21974           0 : static int py_netr_trust_extension_info_set_trust_attributes(PyObject *py_obj, PyObject *value, void *closure)
   21975             : {
   21976           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(py_obj);
   21977           0 :         if (value == NULL) {
   21978           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_attributes");
   21979           0 :                 return -1;
   21980             :         }
   21981             :         {
   21982           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_attributes));
   21983           0 :                 if (PyLong_Check(value)) {
   21984           0 :                         unsigned long long test_var;
   21985           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21986           0 :                         if (PyErr_Occurred() != NULL) {
   21987           0 :                                 return -1;
   21988             :                         }
   21989           0 :                         if (test_var > uint_max) {
   21990           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21991             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21992           0 :                                 return -1;
   21993             :                         }
   21994           0 :                         object->trust_attributes = test_var;
   21995             :                 } else {
   21996           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21997             :                           PyLong_Type.tp_name);
   21998           0 :                         return -1;
   21999             :                 }
   22000             :         }
   22001           0 :         return 0;
   22002             : }
   22003             : 
   22004             : static PyGetSetDef py_netr_trust_extension_info_getsetters[] = {
   22005             :         {
   22006             :                 .name = discard_const_p(char, "flags"),
   22007             :                 .get = py_netr_trust_extension_info_get_flags,
   22008             :                 .set = py_netr_trust_extension_info_set_flags,
   22009             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
   22010             :         },
   22011             :         {
   22012             :                 .name = discard_const_p(char, "parent_index"),
   22013             :                 .get = py_netr_trust_extension_info_get_parent_index,
   22014             :                 .set = py_netr_trust_extension_info_set_parent_index,
   22015             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22016             :         },
   22017             :         {
   22018             :                 .name = discard_const_p(char, "trust_type"),
   22019             :                 .get = py_netr_trust_extension_info_get_trust_type,
   22020             :                 .set = py_netr_trust_extension_info_set_trust_type,
   22021             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustType")
   22022             :         },
   22023             :         {
   22024             :                 .name = discard_const_p(char, "trust_attributes"),
   22025             :                 .get = py_netr_trust_extension_info_get_trust_attributes,
   22026             :                 .set = py_netr_trust_extension_info_set_trust_attributes,
   22027             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustAttributes")
   22028             :         },
   22029             :         { .name = NULL }
   22030             : };
   22031             : 
   22032           0 : static PyObject *py_netr_trust_extension_info_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22033             : {
   22034           0 :         return pytalloc_new(struct netr_trust_extension_info, type);
   22035             : }
   22036             : 
   22037             : 
   22038             : static PyTypeObject netr_trust_extension_info_Type = {
   22039             :         PyVarObject_HEAD_INIT(NULL, 0)
   22040             :         .tp_name = "netlogon.netr_trust_extension_info",
   22041             :         .tp_getset = py_netr_trust_extension_info_getsetters,
   22042             :         .tp_methods = NULL,
   22043             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22044             :         .tp_new = py_netr_trust_extension_info_new,
   22045             : };
   22046             : 
   22047             : 
   22048           0 : static PyObject *py_netr_trust_extension_get_length(PyObject *obj, void *closure)
   22049             : {
   22050           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(obj);
   22051           0 :         PyObject *py_length;
   22052           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
   22053           0 :         return py_length;
   22054             : }
   22055             : 
   22056           0 : static int py_netr_trust_extension_set_length(PyObject *py_obj, PyObject *value, void *closure)
   22057             : {
   22058           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(py_obj);
   22059           0 :         if (value == NULL) {
   22060           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   22061           0 :                 return -1;
   22062             :         }
   22063             :         {
   22064           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   22065           0 :                 if (PyLong_Check(value)) {
   22066           0 :                         unsigned long long test_var;
   22067           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22068           0 :                         if (PyErr_Occurred() != NULL) {
   22069           0 :                                 return -1;
   22070             :                         }
   22071           0 :                         if (test_var > uint_max) {
   22072           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22073             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22074           0 :                                 return -1;
   22075             :                         }
   22076           0 :                         object->length = test_var;
   22077             :                 } else {
   22078           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22079             :                           PyLong_Type.tp_name);
   22080           0 :                         return -1;
   22081             :                 }
   22082             :         }
   22083           0 :         return 0;
   22084             : }
   22085             : 
   22086           0 : static PyObject *py_netr_trust_extension_get_dummy(PyObject *obj, void *closure)
   22087             : {
   22088           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(obj);
   22089           0 :         PyObject *py_dummy;
   22090           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)object->dummy);
   22091           0 :         return py_dummy;
   22092             : }
   22093             : 
   22094           0 : static int py_netr_trust_extension_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
   22095             : {
   22096           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(py_obj);
   22097           0 :         if (value == NULL) {
   22098           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy");
   22099           0 :                 return -1;
   22100             :         }
   22101             :         {
   22102           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
   22103           0 :                 if (PyLong_Check(value)) {
   22104           0 :                         unsigned long long test_var;
   22105           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22106           0 :                         if (PyErr_Occurred() != NULL) {
   22107           0 :                                 return -1;
   22108             :                         }
   22109           0 :                         if (test_var > uint_max) {
   22110           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22111             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22112           0 :                                 return -1;
   22113             :                         }
   22114           0 :                         object->dummy = test_var;
   22115             :                 } else {
   22116           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22117             :                           PyLong_Type.tp_name);
   22118           0 :                         return -1;
   22119             :                 }
   22120             :         }
   22121           0 :         return 0;
   22122             : }
   22123             : 
   22124           0 : static PyObject *py_netr_trust_extension_get_size(PyObject *obj, void *closure)
   22125             : {
   22126           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(obj);
   22127           0 :         PyObject *py_size;
   22128           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)object->size);
   22129           0 :         return py_size;
   22130             : }
   22131             : 
   22132           0 : static int py_netr_trust_extension_set_size(PyObject *py_obj, PyObject *value, void *closure)
   22133             : {
   22134           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(py_obj);
   22135           0 :         if (value == NULL) {
   22136           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   22137           0 :                 return -1;
   22138             :         }
   22139             :         {
   22140           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   22141           0 :                 if (PyLong_Check(value)) {
   22142           0 :                         unsigned long long test_var;
   22143           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22144           0 :                         if (PyErr_Occurred() != NULL) {
   22145           0 :                                 return -1;
   22146             :                         }
   22147           0 :                         if (test_var > uint_max) {
   22148           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22149             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22150           0 :                                 return -1;
   22151             :                         }
   22152           0 :                         object->size = test_var;
   22153             :                 } else {
   22154           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22155             :                           PyLong_Type.tp_name);
   22156           0 :                         return -1;
   22157             :                 }
   22158             :         }
   22159           0 :         return 0;
   22160             : }
   22161             : 
   22162           0 : static PyObject *py_netr_trust_extension_get_info(PyObject *obj, void *closure)
   22163             : {
   22164           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(obj);
   22165           0 :         PyObject *py_info;
   22166           0 :         py_info = pytalloc_reference_ex(&netr_trust_extension_info_Type, pytalloc_get_mem_ctx(obj), &object->info);
   22167           0 :         return py_info;
   22168             : }
   22169             : 
   22170           0 : static int py_netr_trust_extension_set_info(PyObject *py_obj, PyObject *value, void *closure)
   22171             : {
   22172           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(py_obj);
   22173           0 :         if (value == NULL) {
   22174           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
   22175           0 :                 return -1;
   22176             :         }
   22177           0 :         PY_CHECK_TYPE(&netr_trust_extension_info_Type, value, return -1;);
   22178           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22179           0 :                 PyErr_NoMemory();
   22180           0 :                 return -1;
   22181             :         }
   22182           0 :         object->info = *(struct netr_trust_extension_info *)pytalloc_get_ptr(value);
   22183           0 :         return 0;
   22184             : }
   22185             : 
   22186             : static PyGetSetDef py_netr_trust_extension_getsetters[] = {
   22187             :         {
   22188             :                 .name = discard_const_p(char, "length"),
   22189             :                 .get = py_netr_trust_extension_get_length,
   22190             :                 .set = py_netr_trust_extension_set_length,
   22191             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   22192             :         },
   22193             :         {
   22194             :                 .name = discard_const_p(char, "dummy"),
   22195             :                 .get = py_netr_trust_extension_get_dummy,
   22196             :                 .set = py_netr_trust_extension_set_dummy,
   22197             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   22198             :         },
   22199             :         {
   22200             :                 .name = discard_const_p(char, "size"),
   22201             :                 .get = py_netr_trust_extension_get_size,
   22202             :                 .set = py_netr_trust_extension_set_size,
   22203             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   22204             :         },
   22205             :         {
   22206             :                 .name = discard_const_p(char, "info"),
   22207             :                 .get = py_netr_trust_extension_get_info,
   22208             :                 .set = py_netr_trust_extension_set_info,
   22209             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension_info")
   22210             :         },
   22211             :         { .name = NULL }
   22212             : };
   22213             : 
   22214           0 : static PyObject *py_netr_trust_extension_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22215             : {
   22216           0 :         return pytalloc_new(struct netr_trust_extension, type);
   22217             : }
   22218             : 
   22219             : 
   22220             : static PyTypeObject netr_trust_extension_Type = {
   22221             :         PyVarObject_HEAD_INIT(NULL, 0)
   22222             :         .tp_name = "netlogon.netr_trust_extension",
   22223             :         .tp_getset = py_netr_trust_extension_getsetters,
   22224             :         .tp_methods = NULL,
   22225             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22226             :         .tp_new = py_netr_trust_extension_new,
   22227             : };
   22228             : 
   22229             : 
   22230           0 : static PyObject *py_netr_trust_extension_container_get_length(PyObject *obj, void *closure)
   22231             : {
   22232           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(obj);
   22233           0 :         PyObject *py_length;
   22234           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
   22235           0 :         return py_length;
   22236             : }
   22237             : 
   22238           0 : static int py_netr_trust_extension_container_set_length(PyObject *py_obj, PyObject *value, void *closure)
   22239             : {
   22240           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(py_obj);
   22241           0 :         if (value == NULL) {
   22242           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   22243           0 :                 return -1;
   22244             :         }
   22245             :         {
   22246           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   22247           0 :                 if (PyLong_Check(value)) {
   22248           0 :                         unsigned long long test_var;
   22249           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22250           0 :                         if (PyErr_Occurred() != NULL) {
   22251           0 :                                 return -1;
   22252             :                         }
   22253           0 :                         if (test_var > uint_max) {
   22254           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22255             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22256           0 :                                 return -1;
   22257             :                         }
   22258           0 :                         object->length = test_var;
   22259             :                 } else {
   22260           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22261             :                           PyLong_Type.tp_name);
   22262           0 :                         return -1;
   22263             :                 }
   22264             :         }
   22265           0 :         return 0;
   22266             : }
   22267             : 
   22268           0 : static PyObject *py_netr_trust_extension_container_get_size(PyObject *obj, void *closure)
   22269             : {
   22270           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(obj);
   22271           0 :         PyObject *py_size;
   22272           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
   22273           0 :         return py_size;
   22274             : }
   22275             : 
   22276           0 : static int py_netr_trust_extension_container_set_size(PyObject *py_obj, PyObject *value, void *closure)
   22277             : {
   22278           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(py_obj);
   22279           0 :         if (value == NULL) {
   22280           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   22281           0 :                 return -1;
   22282             :         }
   22283             :         {
   22284           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   22285           0 :                 if (PyLong_Check(value)) {
   22286           0 :                         unsigned long long test_var;
   22287           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22288           0 :                         if (PyErr_Occurred() != NULL) {
   22289           0 :                                 return -1;
   22290             :                         }
   22291           0 :                         if (test_var > uint_max) {
   22292           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22293             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22294           0 :                                 return -1;
   22295             :                         }
   22296           0 :                         object->size = test_var;
   22297             :                 } else {
   22298           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22299             :                           PyLong_Type.tp_name);
   22300           0 :                         return -1;
   22301             :                 }
   22302             :         }
   22303           0 :         return 0;
   22304             : }
   22305             : 
   22306           0 : static PyObject *py_netr_trust_extension_container_get_info(PyObject *obj, void *closure)
   22307             : {
   22308           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(obj);
   22309           0 :         PyObject *py_info;
   22310           0 :         if (object->info == NULL) {
   22311           0 :                 Py_RETURN_NONE;
   22312             :         }
   22313           0 :         if (object->info == NULL) {
   22314           0 :                 py_info = Py_None;
   22315           0 :                 Py_INCREF(py_info);
   22316             :         } else {
   22317           0 :                 py_info = pytalloc_reference_ex(&netr_trust_extension_Type, object->info, object->info);
   22318             :         }
   22319           0 :         return py_info;
   22320             : }
   22321             : 
   22322           0 : static int py_netr_trust_extension_container_set_info(PyObject *py_obj, PyObject *value, void *closure)
   22323             : {
   22324           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(py_obj);
   22325           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info));
   22326           0 :         if (value == NULL) {
   22327           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
   22328           0 :                 return -1;
   22329             :         }
   22330           0 :         if (value == Py_None) {
   22331           0 :                 object->info = NULL;
   22332             :         } else {
   22333           0 :                 object->info = NULL;
   22334           0 :                 PY_CHECK_TYPE(&netr_trust_extension_Type, value, return -1;);
   22335           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22336           0 :                         PyErr_NoMemory();
   22337           0 :                         return -1;
   22338             :                 }
   22339           0 :                 object->info = (struct netr_trust_extension *)pytalloc_get_ptr(value);
   22340             :         }
   22341           0 :         return 0;
   22342             : }
   22343             : 
   22344             : static PyGetSetDef py_netr_trust_extension_container_getsetters[] = {
   22345             :         {
   22346             :                 .name = discard_const_p(char, "length"),
   22347             :                 .get = py_netr_trust_extension_container_get_length,
   22348             :                 .set = py_netr_trust_extension_container_set_length,
   22349             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   22350             :         },
   22351             :         {
   22352             :                 .name = discard_const_p(char, "size"),
   22353             :                 .get = py_netr_trust_extension_container_get_size,
   22354             :                 .set = py_netr_trust_extension_container_set_size,
   22355             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   22356             :         },
   22357             :         {
   22358             :                 .name = discard_const_p(char, "info"),
   22359             :                 .get = py_netr_trust_extension_container_get_info,
   22360             :                 .set = py_netr_trust_extension_container_set_info,
   22361             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension")
   22362             :         },
   22363             :         { .name = NULL }
   22364             : };
   22365             : 
   22366           0 : static PyObject *py_netr_trust_extension_container_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22367             : {
   22368           0 :         return pytalloc_new(struct netr_trust_extension_container, type);
   22369             : }
   22370             : 
   22371             : 
   22372             : static PyTypeObject netr_trust_extension_container_Type = {
   22373             :         PyVarObject_HEAD_INIT(NULL, 0)
   22374             :         .tp_name = "netlogon.netr_trust_extension_container",
   22375             :         .tp_getset = py_netr_trust_extension_container_getsetters,
   22376             :         .tp_methods = NULL,
   22377             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22378             :         .tp_new = py_netr_trust_extension_container_new,
   22379             : };
   22380             : 
   22381             : 
   22382           0 : static PyObject *py_netr_OneDomainInfo_get_domainname(PyObject *obj, void *closure)
   22383             : {
   22384           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22385           0 :         PyObject *py_domainname;
   22386           0 :         py_domainname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->domainname);
   22387           0 :         return py_domainname;
   22388             : }
   22389             : 
   22390           0 : static int py_netr_OneDomainInfo_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
   22391             : {
   22392           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22393           0 :         if (value == NULL) {
   22394           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domainname");
   22395           0 :                 return -1;
   22396             :         }
   22397           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22398           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22399           0 :                 PyErr_NoMemory();
   22400           0 :                 return -1;
   22401             :         }
   22402           0 :         object->domainname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22403           0 :         return 0;
   22404             : }
   22405             : 
   22406           0 : static PyObject *py_netr_OneDomainInfo_get_dns_domainname(PyObject *obj, void *closure)
   22407             : {
   22408           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22409           0 :         PyObject *py_dns_domainname;
   22410           0 :         py_dns_domainname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_domainname);
   22411           0 :         return py_dns_domainname;
   22412             : }
   22413             : 
   22414           0 : static int py_netr_OneDomainInfo_set_dns_domainname(PyObject *py_obj, PyObject *value, void *closure)
   22415             : {
   22416           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22417           0 :         if (value == NULL) {
   22418           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domainname");
   22419           0 :                 return -1;
   22420             :         }
   22421           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22422           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22423           0 :                 PyErr_NoMemory();
   22424           0 :                 return -1;
   22425             :         }
   22426           0 :         object->dns_domainname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22427           0 :         return 0;
   22428             : }
   22429             : 
   22430           0 : static PyObject *py_netr_OneDomainInfo_get_dns_forestname(PyObject *obj, void *closure)
   22431             : {
   22432           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22433           0 :         PyObject *py_dns_forestname;
   22434           0 :         py_dns_forestname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_forestname);
   22435           0 :         return py_dns_forestname;
   22436             : }
   22437             : 
   22438           0 : static int py_netr_OneDomainInfo_set_dns_forestname(PyObject *py_obj, PyObject *value, void *closure)
   22439             : {
   22440           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22441           0 :         if (value == NULL) {
   22442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_forestname");
   22443           0 :                 return -1;
   22444             :         }
   22445           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22446           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22447           0 :                 PyErr_NoMemory();
   22448           0 :                 return -1;
   22449             :         }
   22450           0 :         object->dns_forestname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22451           0 :         return 0;
   22452             : }
   22453             : 
   22454           0 : static PyObject *py_netr_OneDomainInfo_get_domain_guid(PyObject *obj, void *closure)
   22455             : {
   22456           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22457           0 :         PyObject *py_domain_guid;
   22458           0 :         py_domain_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->domain_guid);
   22459           0 :         return py_domain_guid;
   22460             : }
   22461             : 
   22462           0 : static int py_netr_OneDomainInfo_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   22463             : {
   22464           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22465           0 :         if (value == NULL) {
   22466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_guid");
   22467           0 :                 return -1;
   22468             :         }
   22469           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   22470           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22471           0 :                 PyErr_NoMemory();
   22472           0 :                 return -1;
   22473             :         }
   22474           0 :         object->domain_guid = *(struct GUID *)pytalloc_get_ptr(value);
   22475           0 :         return 0;
   22476             : }
   22477             : 
   22478           0 : static PyObject *py_netr_OneDomainInfo_get_domain_sid(PyObject *obj, void *closure)
   22479             : {
   22480           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22481           0 :         PyObject *py_domain_sid;
   22482           0 :         if (object->domain_sid == NULL) {
   22483           0 :                 Py_RETURN_NONE;
   22484             :         }
   22485           0 :         if (object->domain_sid == NULL) {
   22486           0 :                 py_domain_sid = Py_None;
   22487           0 :                 Py_INCREF(py_domain_sid);
   22488             :         } else {
   22489           0 :                 py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->domain_sid, object->domain_sid);
   22490             :         }
   22491           0 :         return py_domain_sid;
   22492             : }
   22493             : 
   22494           0 : static int py_netr_OneDomainInfo_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
   22495             : {
   22496           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22497           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain_sid));
   22498           0 :         if (value == NULL) {
   22499           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_sid");
   22500           0 :                 return -1;
   22501             :         }
   22502           0 :         if (value == Py_None) {
   22503           0 :                 object->domain_sid = NULL;
   22504             :         } else {
   22505           0 :                 object->domain_sid = NULL;
   22506           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   22507           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22508           0 :                         PyErr_NoMemory();
   22509           0 :                         return -1;
   22510             :                 }
   22511           0 :                 object->domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
   22512             :         }
   22513           0 :         return 0;
   22514             : }
   22515             : 
   22516           0 : static PyObject *py_netr_OneDomainInfo_get_trust_extension(PyObject *obj, void *closure)
   22517             : {
   22518           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22519           0 :         PyObject *py_trust_extension;
   22520           0 :         py_trust_extension = pytalloc_reference_ex(&netr_trust_extension_container_Type, pytalloc_get_mem_ctx(obj), &object->trust_extension);
   22521           0 :         return py_trust_extension;
   22522             : }
   22523             : 
   22524           0 : static int py_netr_OneDomainInfo_set_trust_extension(PyObject *py_obj, PyObject *value, void *closure)
   22525             : {
   22526           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22527           0 :         if (value == NULL) {
   22528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_extension");
   22529           0 :                 return -1;
   22530             :         }
   22531           0 :         PY_CHECK_TYPE(&netr_trust_extension_container_Type, value, return -1;);
   22532           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22533           0 :                 PyErr_NoMemory();
   22534           0 :                 return -1;
   22535             :         }
   22536           0 :         object->trust_extension = *(struct netr_trust_extension_container *)pytalloc_get_ptr(value);
   22537           0 :         return 0;
   22538             : }
   22539             : 
   22540           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_string2(PyObject *obj, void *closure)
   22541             : {
   22542           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22543           0 :         PyObject *py_dummy_string2;
   22544           0 :         py_dummy_string2 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string2);
   22545           0 :         return py_dummy_string2;
   22546             : }
   22547             : 
   22548           0 : static int py_netr_OneDomainInfo_set_dummy_string2(PyObject *py_obj, PyObject *value, void *closure)
   22549             : {
   22550           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22551           0 :         if (value == NULL) {
   22552           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string2");
   22553           0 :                 return -1;
   22554             :         }
   22555           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22556           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22557           0 :                 PyErr_NoMemory();
   22558           0 :                 return -1;
   22559             :         }
   22560           0 :         object->dummy_string2 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22561           0 :         return 0;
   22562             : }
   22563             : 
   22564           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_string3(PyObject *obj, void *closure)
   22565             : {
   22566           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22567           0 :         PyObject *py_dummy_string3;
   22568           0 :         py_dummy_string3 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
   22569           0 :         return py_dummy_string3;
   22570             : }
   22571             : 
   22572           0 : static int py_netr_OneDomainInfo_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
   22573             : {
   22574           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22575           0 :         if (value == NULL) {
   22576           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string3");
   22577           0 :                 return -1;
   22578             :         }
   22579           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22580           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22581           0 :                 PyErr_NoMemory();
   22582           0 :                 return -1;
   22583             :         }
   22584           0 :         object->dummy_string3 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22585           0 :         return 0;
   22586             : }
   22587             : 
   22588           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_string4(PyObject *obj, void *closure)
   22589             : {
   22590           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22591           0 :         PyObject *py_dummy_string4;
   22592           0 :         py_dummy_string4 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
   22593           0 :         return py_dummy_string4;
   22594             : }
   22595             : 
   22596           0 : static int py_netr_OneDomainInfo_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
   22597             : {
   22598           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22599           0 :         if (value == NULL) {
   22600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string4");
   22601           0 :                 return -1;
   22602             :         }
   22603           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22604           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22605           0 :                 PyErr_NoMemory();
   22606           0 :                 return -1;
   22607             :         }
   22608           0 :         object->dummy_string4 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22609           0 :         return 0;
   22610             : }
   22611             : 
   22612           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long1(PyObject *obj, void *closure)
   22613             : {
   22614           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22615           0 :         PyObject *py_dummy_long1;
   22616           0 :         py_dummy_long1 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long1);
   22617           0 :         return py_dummy_long1;
   22618             : }
   22619             : 
   22620           0 : static int py_netr_OneDomainInfo_set_dummy_long1(PyObject *py_obj, PyObject *value, void *closure)
   22621             : {
   22622           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22623           0 :         if (value == NULL) {
   22624           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long1");
   22625           0 :                 return -1;
   22626             :         }
   22627             :         {
   22628           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long1));
   22629           0 :                 if (PyLong_Check(value)) {
   22630           0 :                         unsigned long long test_var;
   22631           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22632           0 :                         if (PyErr_Occurred() != NULL) {
   22633           0 :                                 return -1;
   22634             :                         }
   22635           0 :                         if (test_var > uint_max) {
   22636           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22637             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22638           0 :                                 return -1;
   22639             :                         }
   22640           0 :                         object->dummy_long1 = test_var;
   22641             :                 } else {
   22642           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22643             :                           PyLong_Type.tp_name);
   22644           0 :                         return -1;
   22645             :                 }
   22646             :         }
   22647           0 :         return 0;
   22648             : }
   22649             : 
   22650           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long2(PyObject *obj, void *closure)
   22651             : {
   22652           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22653           0 :         PyObject *py_dummy_long2;
   22654           0 :         py_dummy_long2 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long2);
   22655           0 :         return py_dummy_long2;
   22656             : }
   22657             : 
   22658           0 : static int py_netr_OneDomainInfo_set_dummy_long2(PyObject *py_obj, PyObject *value, void *closure)
   22659             : {
   22660           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22661           0 :         if (value == NULL) {
   22662           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long2");
   22663           0 :                 return -1;
   22664             :         }
   22665             :         {
   22666           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long2));
   22667           0 :                 if (PyLong_Check(value)) {
   22668           0 :                         unsigned long long test_var;
   22669           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22670           0 :                         if (PyErr_Occurred() != NULL) {
   22671           0 :                                 return -1;
   22672             :                         }
   22673           0 :                         if (test_var > uint_max) {
   22674           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22675             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22676           0 :                                 return -1;
   22677             :                         }
   22678           0 :                         object->dummy_long2 = test_var;
   22679             :                 } else {
   22680           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22681             :                           PyLong_Type.tp_name);
   22682           0 :                         return -1;
   22683             :                 }
   22684             :         }
   22685           0 :         return 0;
   22686             : }
   22687             : 
   22688           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long3(PyObject *obj, void *closure)
   22689             : {
   22690           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22691           0 :         PyObject *py_dummy_long3;
   22692           0 :         py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long3);
   22693           0 :         return py_dummy_long3;
   22694             : }
   22695             : 
   22696           0 : static int py_netr_OneDomainInfo_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
   22697             : {
   22698           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22699           0 :         if (value == NULL) {
   22700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long3");
   22701           0 :                 return -1;
   22702             :         }
   22703             :         {
   22704           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
   22705           0 :                 if (PyLong_Check(value)) {
   22706           0 :                         unsigned long long test_var;
   22707           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22708           0 :                         if (PyErr_Occurred() != NULL) {
   22709           0 :                                 return -1;
   22710             :                         }
   22711           0 :                         if (test_var > uint_max) {
   22712           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22713             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22714           0 :                                 return -1;
   22715             :                         }
   22716           0 :                         object->dummy_long3 = test_var;
   22717             :                 } else {
   22718           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22719             :                           PyLong_Type.tp_name);
   22720           0 :                         return -1;
   22721             :                 }
   22722             :         }
   22723           0 :         return 0;
   22724             : }
   22725             : 
   22726           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long4(PyObject *obj, void *closure)
   22727             : {
   22728           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22729           0 :         PyObject *py_dummy_long4;
   22730           0 :         py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long4);
   22731           0 :         return py_dummy_long4;
   22732             : }
   22733             : 
   22734           0 : static int py_netr_OneDomainInfo_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
   22735             : {
   22736           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22737           0 :         if (value == NULL) {
   22738           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long4");
   22739           0 :                 return -1;
   22740             :         }
   22741             :         {
   22742           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
   22743           0 :                 if (PyLong_Check(value)) {
   22744           0 :                         unsigned long long test_var;
   22745           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22746           0 :                         if (PyErr_Occurred() != NULL) {
   22747           0 :                                 return -1;
   22748             :                         }
   22749           0 :                         if (test_var > uint_max) {
   22750           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22751             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22752           0 :                                 return -1;
   22753             :                         }
   22754           0 :                         object->dummy_long4 = test_var;
   22755             :                 } else {
   22756           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22757             :                           PyLong_Type.tp_name);
   22758           0 :                         return -1;
   22759             :                 }
   22760             :         }
   22761           0 :         return 0;
   22762             : }
   22763             : 
   22764             : static PyGetSetDef py_netr_OneDomainInfo_getsetters[] = {
   22765             :         {
   22766             :                 .name = discard_const_p(char, "domainname"),
   22767             :                 .get = py_netr_OneDomainInfo_get_domainname,
   22768             :                 .set = py_netr_OneDomainInfo_set_domainname,
   22769             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22770             :         },
   22771             :         {
   22772             :                 .name = discard_const_p(char, "dns_domainname"),
   22773             :                 .get = py_netr_OneDomainInfo_get_dns_domainname,
   22774             :                 .set = py_netr_OneDomainInfo_set_dns_domainname,
   22775             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22776             :         },
   22777             :         {
   22778             :                 .name = discard_const_p(char, "dns_forestname"),
   22779             :                 .get = py_netr_OneDomainInfo_get_dns_forestname,
   22780             :                 .set = py_netr_OneDomainInfo_set_dns_forestname,
   22781             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22782             :         },
   22783             :         {
   22784             :                 .name = discard_const_p(char, "domain_guid"),
   22785             :                 .get = py_netr_OneDomainInfo_get_domain_guid,
   22786             :                 .set = py_netr_OneDomainInfo_set_domain_guid,
   22787             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   22788             :         },
   22789             :         {
   22790             :                 .name = discard_const_p(char, "domain_sid"),
   22791             :                 .get = py_netr_OneDomainInfo_get_domain_sid,
   22792             :                 .set = py_netr_OneDomainInfo_set_domain_sid,
   22793             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
   22794             :         },
   22795             :         {
   22796             :                 .name = discard_const_p(char, "trust_extension"),
   22797             :                 .get = py_netr_OneDomainInfo_get_trust_extension,
   22798             :                 .set = py_netr_OneDomainInfo_set_trust_extension,
   22799             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension_container")
   22800             :         },
   22801             :         {
   22802             :                 .name = discard_const_p(char, "dummy_string2"),
   22803             :                 .get = py_netr_OneDomainInfo_get_dummy_string2,
   22804             :                 .set = py_netr_OneDomainInfo_set_dummy_string2,
   22805             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22806             :         },
   22807             :         {
   22808             :                 .name = discard_const_p(char, "dummy_string3"),
   22809             :                 .get = py_netr_OneDomainInfo_get_dummy_string3,
   22810             :                 .set = py_netr_OneDomainInfo_set_dummy_string3,
   22811             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22812             :         },
   22813             :         {
   22814             :                 .name = discard_const_p(char, "dummy_string4"),
   22815             :                 .get = py_netr_OneDomainInfo_get_dummy_string4,
   22816             :                 .set = py_netr_OneDomainInfo_set_dummy_string4,
   22817             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22818             :         },
   22819             :         {
   22820             :                 .name = discard_const_p(char, "dummy_long1"),
   22821             :                 .get = py_netr_OneDomainInfo_get_dummy_long1,
   22822             :                 .set = py_netr_OneDomainInfo_set_dummy_long1,
   22823             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22824             :         },
   22825             :         {
   22826             :                 .name = discard_const_p(char, "dummy_long2"),
   22827             :                 .get = py_netr_OneDomainInfo_get_dummy_long2,
   22828             :                 .set = py_netr_OneDomainInfo_set_dummy_long2,
   22829             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22830             :         },
   22831             :         {
   22832             :                 .name = discard_const_p(char, "dummy_long3"),
   22833             :                 .get = py_netr_OneDomainInfo_get_dummy_long3,
   22834             :                 .set = py_netr_OneDomainInfo_set_dummy_long3,
   22835             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22836             :         },
   22837             :         {
   22838             :                 .name = discard_const_p(char, "dummy_long4"),
   22839             :                 .get = py_netr_OneDomainInfo_get_dummy_long4,
   22840             :                 .set = py_netr_OneDomainInfo_set_dummy_long4,
   22841             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22842             :         },
   22843             :         { .name = NULL }
   22844             : };
   22845             : 
   22846           0 : static PyObject *py_netr_OneDomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22847             : {
   22848           0 :         return pytalloc_new(struct netr_OneDomainInfo, type);
   22849             : }
   22850             : 
   22851             : 
   22852             : static PyTypeObject netr_OneDomainInfo_Type = {
   22853             :         PyVarObject_HEAD_INIT(NULL, 0)
   22854             :         .tp_name = "netlogon.netr_OneDomainInfo",
   22855             :         .tp_getset = py_netr_OneDomainInfo_getsetters,
   22856             :         .tp_methods = NULL,
   22857             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22858             :         .tp_new = py_netr_OneDomainInfo_new,
   22859             : };
   22860             : 
   22861             : 
   22862           0 : static PyObject *py_netr_DomainInformation_get_primary_domain(PyObject *obj, void *closure)
   22863             : {
   22864           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22865           0 :         PyObject *py_primary_domain;
   22866           0 :         py_primary_domain = pytalloc_reference_ex(&netr_OneDomainInfo_Type, pytalloc_get_mem_ctx(obj), &object->primary_domain);
   22867           0 :         return py_primary_domain;
   22868             : }
   22869             : 
   22870           0 : static int py_netr_DomainInformation_set_primary_domain(PyObject *py_obj, PyObject *value, void *closure)
   22871             : {
   22872           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22873           0 :         if (value == NULL) {
   22874           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_domain");
   22875           0 :                 return -1;
   22876             :         }
   22877           0 :         PY_CHECK_TYPE(&netr_OneDomainInfo_Type, value, return -1;);
   22878           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22879           0 :                 PyErr_NoMemory();
   22880           0 :                 return -1;
   22881             :         }
   22882           0 :         object->primary_domain = *(struct netr_OneDomainInfo *)pytalloc_get_ptr(value);
   22883           0 :         return 0;
   22884             : }
   22885             : 
   22886           0 : static PyObject *py_netr_DomainInformation_get_trusted_domain_count(PyObject *obj, void *closure)
   22887             : {
   22888           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22889           0 :         PyObject *py_trusted_domain_count;
   22890           0 :         py_trusted_domain_count = PyLong_FromUnsignedLongLong((uint32_t)object->trusted_domain_count);
   22891           0 :         return py_trusted_domain_count;
   22892             : }
   22893             : 
   22894           0 : static int py_netr_DomainInformation_set_trusted_domain_count(PyObject *py_obj, PyObject *value, void *closure)
   22895             : {
   22896           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22897           0 :         if (value == NULL) {
   22898           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_domain_count");
   22899           0 :                 return -1;
   22900             :         }
   22901             :         {
   22902           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trusted_domain_count));
   22903           0 :                 if (PyLong_Check(value)) {
   22904           0 :                         unsigned long long test_var;
   22905           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22906           0 :                         if (PyErr_Occurred() != NULL) {
   22907           0 :                                 return -1;
   22908             :                         }
   22909           0 :                         if (test_var > uint_max) {
   22910           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22911             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22912           0 :                                 return -1;
   22913             :                         }
   22914           0 :                         object->trusted_domain_count = test_var;
   22915             :                 } else {
   22916           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22917             :                           PyLong_Type.tp_name);
   22918           0 :                         return -1;
   22919             :                 }
   22920             :         }
   22921           0 :         return 0;
   22922             : }
   22923             : 
   22924           0 : static PyObject *py_netr_DomainInformation_get_trusted_domains(PyObject *obj, void *closure)
   22925             : {
   22926           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22927           0 :         PyObject *py_trusted_domains;
   22928           0 :         if (object->trusted_domains == NULL) {
   22929           0 :                 Py_RETURN_NONE;
   22930             :         }
   22931           0 :         if (object->trusted_domains == NULL) {
   22932           0 :                 py_trusted_domains = Py_None;
   22933           0 :                 Py_INCREF(py_trusted_domains);
   22934             :         } else {
   22935           0 :                 py_trusted_domains = PyList_New(object->trusted_domain_count);
   22936           0 :                 if (py_trusted_domains == NULL) {
   22937           0 :                         return NULL;
   22938             :                 }
   22939             :                 {
   22940             :                         int trusted_domains_cntr_1;
   22941           0 :                         for (trusted_domains_cntr_1 = 0; trusted_domains_cntr_1 < (object->trusted_domain_count); trusted_domains_cntr_1++) {
   22942           0 :                                 PyObject *py_trusted_domains_1;
   22943           0 :                                 py_trusted_domains_1 = pytalloc_reference_ex(&netr_OneDomainInfo_Type, object->trusted_domains, &object->trusted_domains[trusted_domains_cntr_1]);
   22944           0 :                                 PyList_SetItem(py_trusted_domains, trusted_domains_cntr_1, py_trusted_domains_1);
   22945             :                         }
   22946             :                 }
   22947             :         }
   22948           0 :         return py_trusted_domains;
   22949             : }
   22950             : 
   22951           0 : static int py_netr_DomainInformation_set_trusted_domains(PyObject *py_obj, PyObject *value, void *closure)
   22952             : {
   22953           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22954           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->trusted_domains));
   22955           0 :         if (value == NULL) {
   22956           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_domains");
   22957           0 :                 return -1;
   22958             :         }
   22959           0 :         if (value == Py_None) {
   22960           0 :                 object->trusted_domains = NULL;
   22961             :         } else {
   22962           0 :                 object->trusted_domains = NULL;
   22963           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   22964             :                 {
   22965           0 :                         int trusted_domains_cntr_1;
   22966           0 :                         object->trusted_domains = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->trusted_domains, PyList_GET_SIZE(value));
   22967           0 :                         if (!object->trusted_domains) { return -1; }
   22968           0 :                         talloc_set_name_const(object->trusted_domains, "ARRAY: object->trusted_domains");
   22969           0 :                         for (trusted_domains_cntr_1 = 0; trusted_domains_cntr_1 < PyList_GET_SIZE(value); trusted_domains_cntr_1++) {
   22970           0 :                                 if (PyList_GET_ITEM(value, trusted_domains_cntr_1) == NULL) {
   22971           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_domains[trusted_domains_cntr_1]");
   22972           0 :                                         return -1;
   22973             :                                 }
   22974           0 :                                 PY_CHECK_TYPE(&netr_OneDomainInfo_Type, PyList_GET_ITEM(value, trusted_domains_cntr_1), return -1;);
   22975           0 :                                 if (talloc_reference(object->trusted_domains, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, trusted_domains_cntr_1))) == NULL) {
   22976           0 :                                         PyErr_NoMemory();
   22977           0 :                                         return -1;
   22978             :                                 }
   22979           0 :                                 object->trusted_domains[trusted_domains_cntr_1] = *(struct netr_OneDomainInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, trusted_domains_cntr_1));
   22980             :                         }
   22981             :                 }
   22982             :         }
   22983           0 :         return 0;
   22984             : }
   22985             : 
   22986           0 : static PyObject *py_netr_DomainInformation_get_lsa_policy(PyObject *obj, void *closure)
   22987             : {
   22988           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22989           0 :         PyObject *py_lsa_policy;
   22990           0 :         py_lsa_policy = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, pytalloc_get_mem_ctx(obj), &object->lsa_policy);
   22991           0 :         return py_lsa_policy;
   22992             : }
   22993             : 
   22994           0 : static int py_netr_DomainInformation_set_lsa_policy(PyObject *py_obj, PyObject *value, void *closure)
   22995             : {
   22996           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22997           0 :         if (value == NULL) {
   22998           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lsa_policy");
   22999           0 :                 return -1;
   23000             :         }
   23001           0 :         PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, value, return -1;);
   23002           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23003           0 :                 PyErr_NoMemory();
   23004           0 :                 return -1;
   23005             :         }
   23006           0 :         object->lsa_policy = *(struct netr_LsaPolicyInformation *)pytalloc_get_ptr(value);
   23007           0 :         return 0;
   23008             : }
   23009             : 
   23010           0 : static PyObject *py_netr_DomainInformation_get_dns_hostname(PyObject *obj, void *closure)
   23011             : {
   23012           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   23013           0 :         PyObject *py_dns_hostname;
   23014           0 :         py_dns_hostname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_hostname);
   23015           0 :         return py_dns_hostname;
   23016             : }
   23017             : 
   23018           0 : static int py_netr_DomainInformation_set_dns_hostname(PyObject *py_obj, PyObject *value, void *closure)
   23019             : {
   23020           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23021           0 :         if (value == NULL) {
   23022           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_hostname");
   23023           0 :                 return -1;
   23024             :         }
   23025           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   23026           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23027           0 :                 PyErr_NoMemory();
   23028           0 :                 return -1;
   23029             :         }
   23030           0 :         object->dns_hostname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   23031           0 :         return 0;
   23032             : }
   23033             : 
   23034           0 : static PyObject *py_netr_DomainInformation_get_dummy_string2(PyObject *obj, void *closure)
   23035             : {
   23036           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   23037           0 :         PyObject *py_dummy_string2;
   23038           0 :         py_dummy_string2 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string2);
   23039           0 :         return py_dummy_string2;
   23040             : }
   23041             : 
   23042           0 : static int py_netr_DomainInformation_set_dummy_string2(PyObject *py_obj, PyObject *value, void *closure)
   23043             : {
   23044           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23045           0 :         if (value == NULL) {
   23046           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string2");
   23047           0 :                 return -1;
   23048             :         }
   23049           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   23050           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23051           0 :                 PyErr_NoMemory();
   23052           0 :                 return -1;
   23053             :         }
   23054           0 :         object->dummy_string2 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   23055           0 :         return 0;
   23056             : }
   23057             : 
   23058           0 : static PyObject *py_netr_DomainInformation_get_dummy_string3(PyObject *obj, void *closure)
   23059             : {
   23060           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   23061           0 :         PyObject *py_dummy_string3;
   23062           0 :         py_dummy_string3 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
   23063           0 :         return py_dummy_string3;
   23064             : }
   23065             : 
   23066           0 : static int py_netr_DomainInformation_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
   23067             : {
   23068           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23069           0 :         if (value == NULL) {
   23070           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string3");
   23071           0 :                 return -1;
   23072             :         }
   23073           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   23074           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23075           0 :                 PyErr_NoMemory();
   23076           0 :                 return -1;
   23077             :         }
   23078           0 :         object->dummy_string3 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   23079           0 :         return 0;
   23080             : }
   23081             : 
   23082           0 : static PyObject *py_netr_DomainInformation_get_dummy_string4(PyObject *obj, void *closure)
   23083             : {
   23084           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   23085           0 :         PyObject *py_dummy_string4;
   23086           0 :         py_dummy_string4 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
   23087           0 :         return py_dummy_string4;
   23088             : }
   23089             : 
   23090           0 : static int py_netr_DomainInformation_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
   23091             : {
   23092           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23093           0 :         if (value == NULL) {
   23094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string4");
   23095           0 :                 return -1;
   23096             :         }
   23097           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   23098           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23099           0 :                 PyErr_NoMemory();
   23100           0 :                 return -1;
   23101             :         }
   23102           0 :         object->dummy_string4 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   23103           0 :         return 0;
   23104             : }
   23105             : 
   23106           0 : static PyObject *py_netr_DomainInformation_get_workstation_flags(PyObject *obj, void *closure)
   23107             : {
   23108           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   23109           0 :         PyObject *py_workstation_flags;
   23110           0 :         py_workstation_flags = PyLong_FromUnsignedLongLong((uint32_t)object->workstation_flags);
   23111           0 :         return py_workstation_flags;
   23112             : }
   23113             : 
   23114           0 : static int py_netr_DomainInformation_set_workstation_flags(PyObject *py_obj, PyObject *value, void *closure)
   23115             : {
   23116           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23117           0 :         if (value == NULL) {
   23118           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstation_flags");
   23119           0 :                 return -1;
   23120             :         }
   23121             :         {
   23122           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->workstation_flags));
   23123           0 :                 if (PyLong_Check(value)) {
   23124           0 :                         unsigned long long test_var;
   23125           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23126           0 :                         if (PyErr_Occurred() != NULL) {
   23127           0 :                                 return -1;
   23128             :                         }
   23129           0 :                         if (test_var > uint_max) {
   23130           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23131             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23132           0 :                                 return -1;
   23133             :                         }
   23134           0 :                         object->workstation_flags = test_var;
   23135             :                 } else {
   23136           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23137             :                           PyLong_Type.tp_name);
   23138           0 :                         return -1;
   23139             :                 }
   23140             :         }
   23141           0 :         return 0;
   23142             : }
   23143             : 
   23144           0 : static PyObject *py_netr_DomainInformation_get_supported_enc_types(PyObject *obj, void *closure)
   23145             : {
   23146           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   23147           0 :         PyObject *py_supported_enc_types;
   23148           0 :         py_supported_enc_types = PyLong_FromUnsignedLongLong((uint32_t)object->supported_enc_types);
   23149           0 :         return py_supported_enc_types;
   23150             : }
   23151             : 
   23152           0 : static int py_netr_DomainInformation_set_supported_enc_types(PyObject *py_obj, PyObject *value, void *closure)
   23153             : {
   23154           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23155           0 :         if (value == NULL) {
   23156           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_enc_types");
   23157           0 :                 return -1;
   23158             :         }
   23159             :         {
   23160           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_enc_types));
   23161           0 :                 if (PyLong_Check(value)) {
   23162           0 :                         unsigned long long test_var;
   23163           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23164           0 :                         if (PyErr_Occurred() != NULL) {
   23165           0 :                                 return -1;
   23166             :                         }
   23167           0 :                         if (test_var > uint_max) {
   23168           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23169             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23170           0 :                                 return -1;
   23171             :                         }
   23172           0 :                         object->supported_enc_types = test_var;
   23173             :                 } else {
   23174           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23175             :                           PyLong_Type.tp_name);
   23176           0 :                         return -1;
   23177             :                 }
   23178             :         }
   23179           0 :         return 0;
   23180             : }
   23181             : 
   23182           0 : static PyObject *py_netr_DomainInformation_get_dummy_long3(PyObject *obj, void *closure)
   23183             : {
   23184           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   23185           0 :         PyObject *py_dummy_long3;
   23186           0 :         py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long3);
   23187           0 :         return py_dummy_long3;
   23188             : }
   23189             : 
   23190           0 : static int py_netr_DomainInformation_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
   23191             : {
   23192           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23193           0 :         if (value == NULL) {
   23194           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long3");
   23195           0 :                 return -1;
   23196             :         }
   23197             :         {
   23198           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
   23199           0 :                 if (PyLong_Check(value)) {
   23200           0 :                         unsigned long long test_var;
   23201           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23202           0 :                         if (PyErr_Occurred() != NULL) {
   23203           0 :                                 return -1;
   23204             :                         }
   23205           0 :                         if (test_var > uint_max) {
   23206           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23207             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23208           0 :                                 return -1;
   23209             :                         }
   23210           0 :                         object->dummy_long3 = test_var;
   23211             :                 } else {
   23212           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23213             :                           PyLong_Type.tp_name);
   23214           0 :                         return -1;
   23215             :                 }
   23216             :         }
   23217           0 :         return 0;
   23218             : }
   23219             : 
   23220           0 : static PyObject *py_netr_DomainInformation_get_dummy_long4(PyObject *obj, void *closure)
   23221             : {
   23222           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   23223           0 :         PyObject *py_dummy_long4;
   23224           0 :         py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long4);
   23225           0 :         return py_dummy_long4;
   23226             : }
   23227             : 
   23228           0 : static int py_netr_DomainInformation_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
   23229             : {
   23230           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23231           0 :         if (value == NULL) {
   23232           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long4");
   23233           0 :                 return -1;
   23234             :         }
   23235             :         {
   23236           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
   23237           0 :                 if (PyLong_Check(value)) {
   23238           0 :                         unsigned long long test_var;
   23239           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23240           0 :                         if (PyErr_Occurred() != NULL) {
   23241           0 :                                 return -1;
   23242             :                         }
   23243           0 :                         if (test_var > uint_max) {
   23244           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23245             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23246           0 :                                 return -1;
   23247             :                         }
   23248           0 :                         object->dummy_long4 = test_var;
   23249             :                 } else {
   23250           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23251             :                           PyLong_Type.tp_name);
   23252           0 :                         return -1;
   23253             :                 }
   23254             :         }
   23255           0 :         return 0;
   23256             : }
   23257             : 
   23258             : static PyGetSetDef py_netr_DomainInformation_getsetters[] = {
   23259             :         {
   23260             :                 .name = discard_const_p(char, "primary_domain"),
   23261             :                 .get = py_netr_DomainInformation_get_primary_domain,
   23262             :                 .set = py_netr_DomainInformation_set_primary_domain,
   23263             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OneDomainInfo")
   23264             :         },
   23265             :         {
   23266             :                 .name = discard_const_p(char, "trusted_domain_count"),
   23267             :                 .get = py_netr_DomainInformation_get_trusted_domain_count,
   23268             :                 .set = py_netr_DomainInformation_set_trusted_domain_count,
   23269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23270             :         },
   23271             :         {
   23272             :                 .name = discard_const_p(char, "trusted_domains"),
   23273             :                 .get = py_netr_DomainInformation_get_trusted_domains,
   23274             :                 .set = py_netr_DomainInformation_set_trusted_domains,
   23275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OneDomainInfo")
   23276             :         },
   23277             :         {
   23278             :                 .name = discard_const_p(char, "lsa_policy"),
   23279             :                 .get = py_netr_DomainInformation_get_lsa_policy,
   23280             :                 .set = py_netr_DomainInformation_set_lsa_policy,
   23281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LsaPolicyInformation")
   23282             :         },
   23283             :         {
   23284             :                 .name = discard_const_p(char, "dns_hostname"),
   23285             :                 .get = py_netr_DomainInformation_get_dns_hostname,
   23286             :                 .set = py_netr_DomainInformation_set_dns_hostname,
   23287             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23288             :         },
   23289             :         {
   23290             :                 .name = discard_const_p(char, "dummy_string2"),
   23291             :                 .get = py_netr_DomainInformation_get_dummy_string2,
   23292             :                 .set = py_netr_DomainInformation_set_dummy_string2,
   23293             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23294             :         },
   23295             :         {
   23296             :                 .name = discard_const_p(char, "dummy_string3"),
   23297             :                 .get = py_netr_DomainInformation_get_dummy_string3,
   23298             :                 .set = py_netr_DomainInformation_set_dummy_string3,
   23299             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23300             :         },
   23301             :         {
   23302             :                 .name = discard_const_p(char, "dummy_string4"),
   23303             :                 .get = py_netr_DomainInformation_get_dummy_string4,
   23304             :                 .set = py_netr_DomainInformation_set_dummy_string4,
   23305             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23306             :         },
   23307             :         {
   23308             :                 .name = discard_const_p(char, "workstation_flags"),
   23309             :                 .get = py_netr_DomainInformation_get_workstation_flags,
   23310             :                 .set = py_netr_DomainInformation_set_workstation_flags,
   23311             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationFlags")
   23312             :         },
   23313             :         {
   23314             :                 .name = discard_const_p(char, "supported_enc_types"),
   23315             :                 .get = py_netr_DomainInformation_get_supported_enc_types,
   23316             :                 .set = py_netr_DomainInformation_set_supported_enc_types,
   23317             :                 .doc = discard_const_p(char, "PIDL-generated element of base type kerb_EncTypes")
   23318             :         },
   23319             :         {
   23320             :                 .name = discard_const_p(char, "dummy_long3"),
   23321             :                 .get = py_netr_DomainInformation_get_dummy_long3,
   23322             :                 .set = py_netr_DomainInformation_set_dummy_long3,
   23323             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23324             :         },
   23325             :         {
   23326             :                 .name = discard_const_p(char, "dummy_long4"),
   23327             :                 .get = py_netr_DomainInformation_get_dummy_long4,
   23328             :                 .set = py_netr_DomainInformation_set_dummy_long4,
   23329             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23330             :         },
   23331             :         { .name = NULL }
   23332             : };
   23333             : 
   23334           0 : static PyObject *py_netr_DomainInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23335             : {
   23336           0 :         return pytalloc_new(struct netr_DomainInformation, type);
   23337             : }
   23338             : 
   23339             : 
   23340             : static PyTypeObject netr_DomainInformation_Type = {
   23341             :         PyVarObject_HEAD_INIT(NULL, 0)
   23342             :         .tp_name = "netlogon.netr_DomainInformation",
   23343             :         .tp_getset = py_netr_DomainInformation_getsetters,
   23344             :         .tp_methods = NULL,
   23345             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23346             :         .tp_new = py_netr_DomainInformation_new,
   23347             : };
   23348             : 
   23349          31 : static PyObject *py_import_netr_DomainInfo(TALLOC_CTX *mem_ctx, int level, union netr_DomainInfo *in)
   23350             : {
   23351           0 :         PyObject *ret;
   23352             : 
   23353          31 :         switch (level) {
   23354          21 :                 case 1:
   23355          21 :                         if (in->domain_info == NULL) {
   23356           0 :                                 ret = Py_None;
   23357           0 :                                 Py_INCREF(ret);
   23358             :                         } else {
   23359          21 :                                 ret = pytalloc_reference_ex(&netr_DomainInformation_Type, in->domain_info, in->domain_info);
   23360             :                         }
   23361          21 :                         return ret;
   23362             : 
   23363          10 :                 case 2:
   23364          10 :                         if (in->lsa_policy_info == NULL) {
   23365           0 :                                 ret = Py_None;
   23366           0 :                                 Py_INCREF(ret);
   23367             :                         } else {
   23368          10 :                                 ret = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, in->lsa_policy_info, in->lsa_policy_info);
   23369             :                         }
   23370          10 :                         return ret;
   23371             : 
   23372             :         }
   23373           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   23374           0 :         return NULL;
   23375             : }
   23376             : 
   23377           0 : static union netr_DomainInfo *py_export_netr_DomainInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   23378             : {
   23379           0 :         union netr_DomainInfo *ret = talloc_zero(mem_ctx, union netr_DomainInfo);
   23380           0 :         switch (level) {
   23381           0 :                 case 1:
   23382           0 :                         if (in == NULL) {
   23383           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain_info");
   23384           0 :                                 talloc_free(ret); return NULL;
   23385             :                         }
   23386           0 :                         if (in == Py_None) {
   23387           0 :                                 ret->domain_info = NULL;
   23388             :                         } else {
   23389           0 :                                 ret->domain_info = NULL;
   23390           0 :                                 PY_CHECK_TYPE(&netr_DomainInformation_Type, in, talloc_free(ret); return NULL;);
   23391           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23392           0 :                                         PyErr_NoMemory();
   23393           0 :                                         talloc_free(ret); return NULL;
   23394             :                                 }
   23395           0 :                                 ret->domain_info = (struct netr_DomainInformation *)pytalloc_get_ptr(in);
   23396             :                         }
   23397           0 :                         break;
   23398             : 
   23399           0 :                 case 2:
   23400           0 :                         if (in == NULL) {
   23401           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->lsa_policy_info");
   23402           0 :                                 talloc_free(ret); return NULL;
   23403             :                         }
   23404           0 :                         if (in == Py_None) {
   23405           0 :                                 ret->lsa_policy_info = NULL;
   23406             :                         } else {
   23407           0 :                                 ret->lsa_policy_info = NULL;
   23408           0 :                                 PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, in, talloc_free(ret); return NULL;);
   23409           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23410           0 :                                         PyErr_NoMemory();
   23411           0 :                                         talloc_free(ret); return NULL;
   23412             :                                 }
   23413           0 :                                 ret->lsa_policy_info = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(in);
   23414             :                         }
   23415           0 :                         break;
   23416             : 
   23417           0 :                 default:
   23418           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   23419           0 :                         talloc_free(ret);
   23420           0 :                         ret = NULL;
   23421             :         }
   23422             : 
   23423           0 :         return ret;
   23424             : }
   23425             : 
   23426          31 : static PyObject *py_netr_DomainInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23427             : {
   23428          31 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23429          31 :         PyObject *mem_ctx_obj = NULL;
   23430          31 :         TALLOC_CTX *mem_ctx = NULL;
   23431          31 :         int level = 0;
   23432          31 :         PyObject *in_obj = NULL;
   23433          31 :         union netr_DomainInfo *in = NULL;
   23434             : 
   23435          31 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   23436             :                 discard_const_p(char *, kwnames),
   23437             :                 &mem_ctx_obj,
   23438             :                 &level,
   23439             :                 &in_obj)) {
   23440           0 :                 return NULL;
   23441             :         }
   23442          31 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23443          31 :         if (mem_ctx == NULL) {
   23444           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23445           0 :                 return NULL;
   23446             :         }
   23447          31 :         in = (union netr_DomainInfo *)pytalloc_get_ptr(in_obj);
   23448          31 :         if (in == NULL) {
   23449           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DomainInfo!");
   23450           0 :                 return NULL;
   23451             :         }
   23452             : 
   23453          31 :         return py_import_netr_DomainInfo(mem_ctx, level, in);
   23454             : }
   23455             : 
   23456           0 : static PyObject *py_netr_DomainInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23457             : {
   23458           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23459           0 :         PyObject *mem_ctx_obj = NULL;
   23460           0 :         TALLOC_CTX *mem_ctx = NULL;
   23461           0 :         int level = 0;
   23462           0 :         PyObject *in = NULL;
   23463           0 :         union netr_DomainInfo *out = NULL;
   23464             : 
   23465           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   23466             :                 discard_const_p(char *, kwnames),
   23467             :                 &mem_ctx_obj,
   23468             :                 &level,
   23469             :                 &in)) {
   23470           0 :                 return NULL;
   23471             :         }
   23472           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23473           0 :         if (mem_ctx == NULL) {
   23474           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23475           0 :                 return NULL;
   23476             :         }
   23477             : 
   23478           0 :         out = py_export_netr_DomainInfo(mem_ctx, level, in);
   23479           0 :         if (out == NULL) {
   23480           0 :                 return NULL;
   23481             :         }
   23482             : 
   23483           0 :         return pytalloc_GenericObject_reference(out);
   23484             : }
   23485             : 
   23486             : static PyMethodDef py_netr_DomainInfo_methods[] = {
   23487             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainInfo_import),
   23488             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23489             :                 "T.__import__(mem_ctx, level, in) => ret." },
   23490             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainInfo_export),
   23491             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23492             :                 "T.__export__(mem_ctx, level, in) => ret." },
   23493             :         { NULL, NULL, 0, NULL }
   23494             : };
   23495             : 
   23496           0 : static PyObject *py_netr_DomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23497             : {
   23498           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   23499           0 :         return NULL;
   23500             : }
   23501             : 
   23502             : 
   23503             : static PyTypeObject netr_DomainInfo_Type = {
   23504             :         PyVarObject_HEAD_INIT(NULL, 0)
   23505             :         .tp_name = "netlogon.netr_DomainInfo",
   23506             :         .tp_getset = NULL,
   23507             :         .tp_methods = py_netr_DomainInfo_methods,
   23508             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23509             :         .tp_new = py_netr_DomainInfo_new,
   23510             : };
   23511             : 
   23512             : 
   23513           0 : static PyObject *py_NL_PASSWORD_VERSION_get_ReservedField(PyObject *obj, void *closure)
   23514             : {
   23515           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(obj);
   23516           0 :         PyObject *py_ReservedField;
   23517           0 :         py_ReservedField = PyLong_FromUnsignedLongLong((uint32_t)object->ReservedField);
   23518           0 :         return py_ReservedField;
   23519             : }
   23520             : 
   23521           0 : static int py_NL_PASSWORD_VERSION_set_ReservedField(PyObject *py_obj, PyObject *value, void *closure)
   23522             : {
   23523           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(py_obj);
   23524           0 :         if (value == NULL) {
   23525           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ReservedField");
   23526           0 :                 return -1;
   23527             :         }
   23528             :         {
   23529           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ReservedField));
   23530           0 :                 if (PyLong_Check(value)) {
   23531           0 :                         unsigned long long test_var;
   23532           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23533           0 :                         if (PyErr_Occurred() != NULL) {
   23534           0 :                                 return -1;
   23535             :                         }
   23536           0 :                         if (test_var > uint_max) {
   23537           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23538             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23539           0 :                                 return -1;
   23540             :                         }
   23541           0 :                         object->ReservedField = test_var;
   23542             :                 } else {
   23543           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23544             :                           PyLong_Type.tp_name);
   23545           0 :                         return -1;
   23546             :                 }
   23547             :         }
   23548           0 :         return 0;
   23549             : }
   23550             : 
   23551           0 : static PyObject *py_NL_PASSWORD_VERSION_get_PasswordVersionNumber(PyObject *obj, void *closure)
   23552             : {
   23553           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(obj);
   23554           0 :         PyObject *py_PasswordVersionNumber;
   23555           0 :         py_PasswordVersionNumber = PyLong_FromUnsignedLongLong((uint32_t)object->PasswordVersionNumber);
   23556           0 :         return py_PasswordVersionNumber;
   23557             : }
   23558             : 
   23559           0 : static int py_NL_PASSWORD_VERSION_set_PasswordVersionNumber(PyObject *py_obj, PyObject *value, void *closure)
   23560             : {
   23561           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(py_obj);
   23562           0 :         if (value == NULL) {
   23563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->PasswordVersionNumber");
   23564           0 :                 return -1;
   23565             :         }
   23566             :         {
   23567           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PasswordVersionNumber));
   23568           0 :                 if (PyLong_Check(value)) {
   23569           0 :                         unsigned long long test_var;
   23570           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23571           0 :                         if (PyErr_Occurred() != NULL) {
   23572           0 :                                 return -1;
   23573             :                         }
   23574           0 :                         if (test_var > uint_max) {
   23575           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23576             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23577           0 :                                 return -1;
   23578             :                         }
   23579           0 :                         object->PasswordVersionNumber = test_var;
   23580             :                 } else {
   23581           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23582             :                           PyLong_Type.tp_name);
   23583           0 :                         return -1;
   23584             :                 }
   23585             :         }
   23586           0 :         return 0;
   23587             : }
   23588             : 
   23589           0 : static PyObject *py_NL_PASSWORD_VERSION_get_PasswordVersionPresent(PyObject *obj, void *closure)
   23590             : {
   23591           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(obj);
   23592           0 :         PyObject *py_PasswordVersionPresent;
   23593           0 :         py_PasswordVersionPresent = PyLong_FromUnsignedLongLong((uint32_t)object->PasswordVersionPresent);
   23594           0 :         return py_PasswordVersionPresent;
   23595             : }
   23596             : 
   23597           0 : static int py_NL_PASSWORD_VERSION_set_PasswordVersionPresent(PyObject *py_obj, PyObject *value, void *closure)
   23598             : {
   23599           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(py_obj);
   23600           0 :         if (value == NULL) {
   23601           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->PasswordVersionPresent");
   23602           0 :                 return -1;
   23603             :         }
   23604             :         {
   23605           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PasswordVersionPresent));
   23606           0 :                 if (PyLong_Check(value)) {
   23607           0 :                         unsigned long long test_var;
   23608           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23609           0 :                         if (PyErr_Occurred() != NULL) {
   23610           0 :                                 return -1;
   23611             :                         }
   23612           0 :                         if (test_var > uint_max) {
   23613           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23614             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23615           0 :                                 return -1;
   23616             :                         }
   23617           0 :                         object->PasswordVersionPresent = test_var;
   23618             :                 } else {
   23619           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23620             :                           PyLong_Type.tp_name);
   23621           0 :                         return -1;
   23622             :                 }
   23623             :         }
   23624           0 :         return 0;
   23625             : }
   23626             : 
   23627             : static PyGetSetDef py_NL_PASSWORD_VERSION_getsetters[] = {
   23628             :         {
   23629             :                 .name = discard_const_p(char, "ReservedField"),
   23630             :                 .get = py_NL_PASSWORD_VERSION_get_ReservedField,
   23631             :                 .set = py_NL_PASSWORD_VERSION_set_ReservedField,
   23632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23633             :         },
   23634             :         {
   23635             :                 .name = discard_const_p(char, "PasswordVersionNumber"),
   23636             :                 .get = py_NL_PASSWORD_VERSION_get_PasswordVersionNumber,
   23637             :                 .set = py_NL_PASSWORD_VERSION_set_PasswordVersionNumber,
   23638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23639             :         },
   23640             :         {
   23641             :                 .name = discard_const_p(char, "PasswordVersionPresent"),
   23642             :                 .get = py_NL_PASSWORD_VERSION_get_PasswordVersionPresent,
   23643             :                 .set = py_NL_PASSWORD_VERSION_set_PasswordVersionPresent,
   23644             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23645             :         },
   23646             :         { .name = NULL }
   23647             : };
   23648             : 
   23649           0 : static PyObject *py_NL_PASSWORD_VERSION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23650             : {
   23651           0 :         return pytalloc_new(struct NL_PASSWORD_VERSION, type);
   23652             : }
   23653             : 
   23654             : 
   23655             : static PyTypeObject NL_PASSWORD_VERSION_Type = {
   23656             :         PyVarObject_HEAD_INIT(NULL, 0)
   23657             :         .tp_name = "netlogon.NL_PASSWORD_VERSION",
   23658             :         .tp_getset = py_NL_PASSWORD_VERSION_getsetters,
   23659             :         .tp_methods = NULL,
   23660             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23661             :         .tp_new = py_NL_PASSWORD_VERSION_new,
   23662             : };
   23663             : 
   23664             : 
   23665           0 : static PyObject *py_netr_CryptPassword_get_data(PyObject *obj, void *closure)
   23666             : {
   23667           0 :         struct netr_CryptPassword *object = (struct netr_CryptPassword *)pytalloc_get_ptr(obj);
   23668           0 :         PyObject *py_data;
   23669           0 :         py_data = PyList_New(512);
   23670           0 :         if (py_data == NULL) {
   23671           0 :                 return NULL;
   23672             :         }
   23673             :         {
   23674             :                 int data_cntr_0;
   23675           0 :                 for (data_cntr_0 = 0; data_cntr_0 < (512); data_cntr_0++) {
   23676           0 :                         PyObject *py_data_0;
   23677           0 :                         py_data_0 = PyLong_FromLong((uint16_t)object->data[data_cntr_0]);
   23678           0 :                         PyList_SetItem(py_data, data_cntr_0, py_data_0);
   23679             :                 }
   23680             :         }
   23681           0 :         return py_data;
   23682             : }
   23683             : 
   23684           4 : static int py_netr_CryptPassword_set_data(PyObject *py_obj, PyObject *value, void *closure)
   23685             : {
   23686           4 :         struct netr_CryptPassword *object = (struct netr_CryptPassword *)pytalloc_get_ptr(py_obj);
   23687           4 :         if (value == NULL) {
   23688           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   23689           0 :                 return -1;
   23690             :         }
   23691           4 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   23692             :         {
   23693           0 :                 int data_cntr_0;
   23694           4 :                 if (ARRAY_SIZE(object->data) != PyList_GET_SIZE(value)) {
   23695           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));
   23696           0 :                         return -1;
   23697             :                 }
   23698        2052 :                 for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
   23699        2048 :                         if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
   23700           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_0]");
   23701           0 :                                 return -1;
   23702             :                         }
   23703             :                         {
   23704        2048 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_0]));
   23705        2048 :                                 if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
   23706           0 :                                         unsigned long long test_var;
   23707        2048 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
   23708        2048 :                                         if (PyErr_Occurred() != NULL) {
   23709           0 :                                                 return -1;
   23710             :                                         }
   23711        2048 :                                         if (test_var > uint_max) {
   23712           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23713             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   23714           0 :                                                 return -1;
   23715             :                                         }
   23716        2048 :                                         object->data[data_cntr_0] = test_var;
   23717             :                                 } else {
   23718           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23719             :                                           PyLong_Type.tp_name);
   23720           0 :                                         return -1;
   23721             :                                 }
   23722             :                         }
   23723             :                 }
   23724             :         }
   23725           4 :         return 0;
   23726             : }
   23727             : 
   23728           0 : static PyObject *py_netr_CryptPassword_get_length(PyObject *obj, void *closure)
   23729             : {
   23730           0 :         struct netr_CryptPassword *object = (struct netr_CryptPassword *)pytalloc_get_ptr(obj);
   23731           0 :         PyObject *py_length;
   23732           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
   23733           0 :         return py_length;
   23734             : }
   23735             : 
   23736           4 : static int py_netr_CryptPassword_set_length(PyObject *py_obj, PyObject *value, void *closure)
   23737             : {
   23738           4 :         struct netr_CryptPassword *object = (struct netr_CryptPassword *)pytalloc_get_ptr(py_obj);
   23739           4 :         if (value == NULL) {
   23740           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   23741           0 :                 return -1;
   23742             :         }
   23743             :         {
   23744           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   23745           4 :                 if (PyLong_Check(value)) {
   23746           0 :                         unsigned long long test_var;
   23747           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23748           4 :                         if (PyErr_Occurred() != NULL) {
   23749           0 :                                 return -1;
   23750             :                         }
   23751           4 :                         if (test_var > uint_max) {
   23752           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23753             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23754           0 :                                 return -1;
   23755             :                         }
   23756           4 :                         object->length = test_var;
   23757             :                 } else {
   23758           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23759             :                           PyLong_Type.tp_name);
   23760           0 :                         return -1;
   23761             :                 }
   23762             :         }
   23763           4 :         return 0;
   23764             : }
   23765             : 
   23766             : static PyGetSetDef py_netr_CryptPassword_getsetters[] = {
   23767             :         {
   23768             :                 .name = discard_const_p(char, "data"),
   23769             :                 .get = py_netr_CryptPassword_get_data,
   23770             :                 .set = py_netr_CryptPassword_set_data,
   23771             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   23772             :         },
   23773             :         {
   23774             :                 .name = discard_const_p(char, "length"),
   23775             :                 .get = py_netr_CryptPassword_get_length,
   23776             :                 .set = py_netr_CryptPassword_set_length,
   23777             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23778             :         },
   23779             :         { .name = NULL }
   23780             : };
   23781             : 
   23782           4 : static PyObject *py_netr_CryptPassword_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23783             : {
   23784           4 :         return pytalloc_new(struct netr_CryptPassword, type);
   23785             : }
   23786             : 
   23787             : 
   23788             : static PyTypeObject netr_CryptPassword_Type = {
   23789             :         PyVarObject_HEAD_INIT(NULL, 0)
   23790             :         .tp_name = "netlogon.netr_CryptPassword",
   23791             :         .tp_getset = py_netr_CryptPassword_getsetters,
   23792             :         .tp_methods = NULL,
   23793             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23794             :         .tp_new = py_netr_CryptPassword_new,
   23795             : };
   23796             : 
   23797             : 
   23798           0 : static PyObject *py_netr_SendToSamResetBadPasswordCount_get_guid(PyObject *obj, void *closure)
   23799             : {
   23800           0 :         struct netr_SendToSamResetBadPasswordCount *object = (struct netr_SendToSamResetBadPasswordCount *)pytalloc_get_ptr(obj);
   23801           0 :         PyObject *py_guid;
   23802           0 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
   23803           0 :         return py_guid;
   23804             : }
   23805             : 
   23806           0 : static int py_netr_SendToSamResetBadPasswordCount_set_guid(PyObject *py_obj, PyObject *value, void *closure)
   23807             : {
   23808           0 :         struct netr_SendToSamResetBadPasswordCount *object = (struct netr_SendToSamResetBadPasswordCount *)pytalloc_get_ptr(py_obj);
   23809           0 :         if (value == NULL) {
   23810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
   23811           0 :                 return -1;
   23812             :         }
   23813           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   23814           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23815           0 :                 PyErr_NoMemory();
   23816           0 :                 return -1;
   23817             :         }
   23818           0 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
   23819           0 :         return 0;
   23820             : }
   23821             : 
   23822             : static PyGetSetDef py_netr_SendToSamResetBadPasswordCount_getsetters[] = {
   23823             :         {
   23824             :                 .name = discard_const_p(char, "guid"),
   23825             :                 .get = py_netr_SendToSamResetBadPasswordCount_get_guid,
   23826             :                 .set = py_netr_SendToSamResetBadPasswordCount_set_guid,
   23827             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   23828             :         },
   23829             :         { .name = NULL }
   23830             : };
   23831             : 
   23832           0 : static PyObject *py_netr_SendToSamResetBadPasswordCount_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23833             : {
   23834           0 :         return pytalloc_new(struct netr_SendToSamResetBadPasswordCount, type);
   23835             : }
   23836             : 
   23837             : 
   23838             : static PyTypeObject netr_SendToSamResetBadPasswordCount_Type = {
   23839             :         PyVarObject_HEAD_INIT(NULL, 0)
   23840             :         .tp_name = "netlogon.netr_SendToSamResetBadPasswordCount",
   23841             :         .tp_getset = py_netr_SendToSamResetBadPasswordCount_getsetters,
   23842             :         .tp_methods = NULL,
   23843             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23844             :         .tp_new = py_netr_SendToSamResetBadPasswordCount_new,
   23845             : };
   23846             : 
   23847           0 : static PyObject *py_import_netr_SendToSamMessage(TALLOC_CTX *mem_ctx, int level, union netr_SendToSamMessage *in)
   23848             : {
   23849           0 :         PyObject *ret;
   23850             : 
   23851           0 :         switch (level) {
   23852           0 :                 case SendToSamResetBadPasswordCount:
   23853           0 :                         ret = pytalloc_reference_ex(&netr_SendToSamResetBadPasswordCount_Type, mem_ctx, &in->reset_bad_password);
   23854           0 :                         return ret;
   23855             : 
   23856           0 :                 default:
   23857           0 :                         ret = Py_None;
   23858           0 :                         Py_INCREF(ret);
   23859           0 :                         return ret;
   23860             : 
   23861             :         }
   23862             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   23863             :         return NULL;
   23864             : }
   23865             : 
   23866           0 : static union netr_SendToSamMessage *py_export_netr_SendToSamMessage(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   23867             : {
   23868           0 :         union netr_SendToSamMessage *ret = talloc_zero(mem_ctx, union netr_SendToSamMessage);
   23869           0 :         switch (level) {
   23870           0 :                 case SendToSamResetBadPasswordCount:
   23871           0 :                         if (in == NULL) {
   23872           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->reset_bad_password");
   23873           0 :                                 talloc_free(ret); return NULL;
   23874             :                         }
   23875           0 :                         PY_CHECK_TYPE(&netr_SendToSamResetBadPasswordCount_Type, in, talloc_free(ret); return NULL;);
   23876           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23877           0 :                                 PyErr_NoMemory();
   23878           0 :                                 talloc_free(ret); return NULL;
   23879             :                         }
   23880           0 :                         ret->reset_bad_password = *(struct netr_SendToSamResetBadPasswordCount *)pytalloc_get_ptr(in);
   23881           0 :                         break;
   23882             : 
   23883           0 :                 default:
   23884           0 :                         break;
   23885             : 
   23886             :         }
   23887             : 
   23888           0 :         return ret;
   23889             : }
   23890             : 
   23891           0 : static PyObject *py_netr_SendToSamMessage_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23892             : {
   23893           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23894           0 :         PyObject *mem_ctx_obj = NULL;
   23895           0 :         TALLOC_CTX *mem_ctx = NULL;
   23896           0 :         int level = 0;
   23897           0 :         PyObject *in_obj = NULL;
   23898           0 :         union netr_SendToSamMessage *in = NULL;
   23899             : 
   23900           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   23901             :                 discard_const_p(char *, kwnames),
   23902             :                 &mem_ctx_obj,
   23903             :                 &level,
   23904             :                 &in_obj)) {
   23905           0 :                 return NULL;
   23906             :         }
   23907           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23908           0 :         if (mem_ctx == NULL) {
   23909           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23910           0 :                 return NULL;
   23911             :         }
   23912           0 :         in = (union netr_SendToSamMessage *)pytalloc_get_ptr(in_obj);
   23913           0 :         if (in == NULL) {
   23914           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_SendToSamMessage!");
   23915           0 :                 return NULL;
   23916             :         }
   23917             : 
   23918           0 :         return py_import_netr_SendToSamMessage(mem_ctx, level, in);
   23919             : }
   23920             : 
   23921           0 : static PyObject *py_netr_SendToSamMessage_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23922             : {
   23923           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23924           0 :         PyObject *mem_ctx_obj = NULL;
   23925           0 :         TALLOC_CTX *mem_ctx = NULL;
   23926           0 :         int level = 0;
   23927           0 :         PyObject *in = NULL;
   23928           0 :         union netr_SendToSamMessage *out = NULL;
   23929             : 
   23930           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   23931             :                 discard_const_p(char *, kwnames),
   23932             :                 &mem_ctx_obj,
   23933             :                 &level,
   23934             :                 &in)) {
   23935           0 :                 return NULL;
   23936             :         }
   23937           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23938           0 :         if (mem_ctx == NULL) {
   23939           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23940           0 :                 return NULL;
   23941             :         }
   23942             : 
   23943           0 :         out = py_export_netr_SendToSamMessage(mem_ctx, level, in);
   23944           0 :         if (out == NULL) {
   23945           0 :                 return NULL;
   23946             :         }
   23947             : 
   23948           0 :         return pytalloc_GenericObject_reference(out);
   23949             : }
   23950             : 
   23951             : static PyMethodDef py_netr_SendToSamMessage_methods[] = {
   23952             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamMessage_import),
   23953             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23954             :                 "T.__import__(mem_ctx, level, in) => ret." },
   23955             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamMessage_export),
   23956             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23957             :                 "T.__export__(mem_ctx, level, in) => ret." },
   23958             :         { NULL, NULL, 0, NULL }
   23959             : };
   23960             : 
   23961           0 : static PyObject *py_netr_SendToSamMessage_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23962             : {
   23963           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   23964           0 :         return NULL;
   23965             : }
   23966             : 
   23967             : 
   23968             : static PyTypeObject netr_SendToSamMessage_Type = {
   23969             :         PyVarObject_HEAD_INIT(NULL, 0)
   23970             :         .tp_name = "netlogon.netr_SendToSamMessage",
   23971             :         .tp_getset = NULL,
   23972             :         .tp_methods = py_netr_SendToSamMessage_methods,
   23973             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23974             :         .tp_new = py_netr_SendToSamMessage_new,
   23975             : };
   23976             : 
   23977             : 
   23978           0 : static PyObject *py_netr_SendToSamBase_get_message_type(PyObject *obj, void *closure)
   23979             : {
   23980           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(obj);
   23981           0 :         PyObject *py_message_type;
   23982           0 :         py_message_type = PyLong_FromLong((uint16_t)object->message_type);
   23983           0 :         return py_message_type;
   23984             : }
   23985             : 
   23986           0 : static int py_netr_SendToSamBase_set_message_type(PyObject *py_obj, PyObject *value, void *closure)
   23987             : {
   23988           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   23989           0 :         if (value == NULL) {
   23990           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->message_type");
   23991           0 :                 return -1;
   23992             :         }
   23993             :         {
   23994           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->message_type));
   23995           0 :                 if (PyLong_Check(value)) {
   23996           0 :                         unsigned long long test_var;
   23997           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23998           0 :                         if (PyErr_Occurred() != NULL) {
   23999           0 :                                 return -1;
   24000             :                         }
   24001           0 :                         if (test_var > uint_max) {
   24002           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24003             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24004           0 :                                 return -1;
   24005             :                         }
   24006           0 :                         object->message_type = test_var;
   24007             :                 } else {
   24008           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24009             :                           PyLong_Type.tp_name);
   24010           0 :                         return -1;
   24011             :                 }
   24012             :         }
   24013           0 :         return 0;
   24014             : }
   24015             : 
   24016           0 : static PyObject *py_netr_SendToSamBase_get_message_size(PyObject *obj, void *closure)
   24017             : {
   24018           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(obj);
   24019           0 :         PyObject *py_message_size;
   24020           0 :         py_message_size = PyLong_FromUnsignedLongLong((uint32_t)object->message_size);
   24021           0 :         return py_message_size;
   24022             : }
   24023             : 
   24024           0 : static int py_netr_SendToSamBase_set_message_size(PyObject *py_obj, PyObject *value, void *closure)
   24025             : {
   24026           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   24027           0 :         if (value == NULL) {
   24028           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->message_size");
   24029           0 :                 return -1;
   24030             :         }
   24031             :         {
   24032           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->message_size));
   24033           0 :                 if (PyLong_Check(value)) {
   24034           0 :                         unsigned long long test_var;
   24035           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24036           0 :                         if (PyErr_Occurred() != NULL) {
   24037           0 :                                 return -1;
   24038             :                         }
   24039           0 :                         if (test_var > uint_max) {
   24040           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24041             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24042           0 :                                 return -1;
   24043             :                         }
   24044           0 :                         object->message_size = test_var;
   24045             :                 } else {
   24046           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24047             :                           PyLong_Type.tp_name);
   24048           0 :                         return -1;
   24049             :                 }
   24050             :         }
   24051           0 :         return 0;
   24052             : }
   24053             : 
   24054           0 : static PyObject *py_netr_SendToSamBase_get_message(PyObject *obj, void *closure)
   24055             : {
   24056           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(obj);
   24057           0 :         PyObject *py_message;
   24058           0 :         py_message = pyrpc_import_union(&netr_SendToSamMessage_Type, pytalloc_get_mem_ctx(obj), object->message_type, &object->message, "union netr_SendToSamMessage");
   24059           0 :         if (py_message == NULL) {
   24060           0 :                 return NULL;
   24061             :         }
   24062           0 :         return py_message;
   24063             : }
   24064             : 
   24065           0 : static int py_netr_SendToSamBase_set_message(PyObject *py_obj, PyObject *value, void *closure)
   24066             : {
   24067           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   24068           0 :         if (value == NULL) {
   24069           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->message");
   24070           0 :                 return -1;
   24071             :         }
   24072             :         {
   24073           0 :                 union netr_SendToSamMessage *message_switch_1;
   24074           0 :                 message_switch_1 = (union netr_SendToSamMessage *)pyrpc_export_union(&netr_SendToSamMessage_Type, pytalloc_get_mem_ctx(py_obj), object->message_type, value, "union netr_SendToSamMessage");
   24075           0 :                 if (message_switch_1 == NULL) {
   24076           0 :                         return -1;
   24077             :                 }
   24078           0 :                 object->message = *message_switch_1;
   24079             :         }
   24080           0 :         return 0;
   24081             : }
   24082             : 
   24083             : static PyGetSetDef py_netr_SendToSamBase_getsetters[] = {
   24084             :         {
   24085             :                 .name = discard_const_p(char, "message_type"),
   24086             :                 .get = py_netr_SendToSamBase_get_message_type,
   24087             :                 .set = py_netr_SendToSamBase_set_message_type,
   24088             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamType")
   24089             :         },
   24090             :         {
   24091             :                 .name = discard_const_p(char, "message_size"),
   24092             :                 .get = py_netr_SendToSamBase_get_message_size,
   24093             :                 .set = py_netr_SendToSamBase_set_message_size,
   24094             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24095             :         },
   24096             :         {
   24097             :                 .name = discard_const_p(char, "message"),
   24098             :                 .get = py_netr_SendToSamBase_get_message,
   24099             :                 .set = py_netr_SendToSamBase_set_message,
   24100             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamMessage")
   24101             :         },
   24102             :         { .name = NULL }
   24103             : };
   24104             : 
   24105           0 : static PyObject *py_netr_SendToSamBase_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24106             : {
   24107           0 :         return pytalloc_new(struct netr_SendToSamBase, type);
   24108             : }
   24109             : 
   24110           0 : static PyObject *py_netr_SendToSamBase_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   24111             : {
   24112           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   24113           0 :         PyObject *ret = NULL;
   24114           0 :         DATA_BLOB blob;
   24115           0 :         enum ndr_err_code err;
   24116           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   24117           0 :         if (tmp_ctx == NULL) {
   24118           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   24119           0 :                 return NULL;
   24120             :         }
   24121           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SendToSamBase);
   24122           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   24123           0 :                 TALLOC_FREE(tmp_ctx);
   24124           0 :                 PyErr_SetNdrError(err);
   24125           0 :                 return NULL;
   24126             :         }
   24127             : 
   24128           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   24129           0 :         TALLOC_FREE(tmp_ctx);
   24130           0 :         return ret;
   24131             : }
   24132             : 
   24133           0 : static PyObject *py_netr_SendToSamBase_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   24134             : {
   24135           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   24136           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   24137           0 :         Py_ssize_t blob_length = 0;
   24138           0 :         enum ndr_err_code err;
   24139           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   24140           0 :         PyObject *allow_remaining_obj = NULL;
   24141           0 :         bool allow_remaining = false;
   24142             : 
   24143           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   24144             :                 discard_const_p(char *, kwnames),
   24145             :                 &blob.data, &blob_length,
   24146             :                 &allow_remaining_obj)) {
   24147           0 :                 return NULL;
   24148             :         }
   24149           0 :         blob.length = blob_length;
   24150             : 
   24151           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   24152           0 :                 allow_remaining = true;
   24153             :         }
   24154             : 
   24155           0 :         if (allow_remaining) {
   24156           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SendToSamBase);
   24157             :         } else {
   24158           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SendToSamBase);
   24159             :         }
   24160           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   24161           0 :                 PyErr_SetNdrError(err);
   24162           0 :                 return NULL;
   24163             :         }
   24164             : 
   24165           0 :         Py_RETURN_NONE;
   24166             : }
   24167             : 
   24168           0 : static PyObject *py_netr_SendToSamBase_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   24169             : {
   24170           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   24171           0 :         PyObject *ret;
   24172           0 :         char *retstr;
   24173             : 
   24174           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SendToSamBase, "netr_SendToSamBase", object);
   24175           0 :         ret = PyUnicode_FromString(retstr);
   24176           0 :         talloc_free(retstr);
   24177             : 
   24178           0 :         return ret;
   24179             : }
   24180             : 
   24181             : static PyMethodDef py_netr_SendToSamBase_methods[] = {
   24182             :         { "__ndr_pack__", (PyCFunction)py_netr_SendToSamBase_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   24183             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamBase_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   24184             :         { "__ndr_print__", (PyCFunction)py_netr_SendToSamBase_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   24185             :         { NULL, NULL, 0, NULL }
   24186             : };
   24187             : 
   24188             : 
   24189             : static PyTypeObject netr_SendToSamBase_Type = {
   24190             :         PyVarObject_HEAD_INIT(NULL, 0)
   24191             :         .tp_name = "netlogon.netr_SendToSamBase",
   24192             :         .tp_getset = py_netr_SendToSamBase_getsetters,
   24193             :         .tp_methods = py_netr_SendToSamBase_methods,
   24194             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24195             :         .tp_new = py_netr_SendToSamBase_new,
   24196             : };
   24197             : 
   24198             : 
   24199           0 : static PyObject *py_netr_DsRAddressToSitenamesWCtr_get_count(PyObject *obj, void *closure)
   24200             : {
   24201           0 :         struct netr_DsRAddressToSitenamesWCtr *object = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(obj);
   24202           0 :         PyObject *py_count;
   24203           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   24204           0 :         return py_count;
   24205             : }
   24206             : 
   24207           0 : static int py_netr_DsRAddressToSitenamesWCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   24208             : {
   24209           0 :         struct netr_DsRAddressToSitenamesWCtr *object = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(py_obj);
   24210           0 :         if (value == NULL) {
   24211           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   24212           0 :                 return -1;
   24213             :         }
   24214             :         {
   24215           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   24216           0 :                 if (PyLong_Check(value)) {
   24217           0 :                         unsigned long long test_var;
   24218           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24219           0 :                         if (PyErr_Occurred() != NULL) {
   24220           0 :                                 return -1;
   24221             :                         }
   24222           0 :                         if (test_var > uint_max) {
   24223           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24224             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24225           0 :                                 return -1;
   24226             :                         }
   24227           0 :                         object->count = test_var;
   24228             :                 } else {
   24229           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24230             :                           PyLong_Type.tp_name);
   24231           0 :                         return -1;
   24232             :                 }
   24233             :         }
   24234           0 :         return 0;
   24235             : }
   24236             : 
   24237           0 : static PyObject *py_netr_DsRAddressToSitenamesWCtr_get_sitename(PyObject *obj, void *closure)
   24238             : {
   24239           0 :         struct netr_DsRAddressToSitenamesWCtr *object = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(obj);
   24240           0 :         PyObject *py_sitename;
   24241           0 :         if (object->sitename == NULL) {
   24242           0 :                 Py_RETURN_NONE;
   24243             :         }
   24244           0 :         if (object->sitename == NULL) {
   24245           0 :                 py_sitename = Py_None;
   24246           0 :                 Py_INCREF(py_sitename);
   24247             :         } else {
   24248           0 :                 py_sitename = PyList_New(object->count);
   24249           0 :                 if (py_sitename == NULL) {
   24250           0 :                         return NULL;
   24251             :                 }
   24252             :                 {
   24253             :                         int sitename_cntr_1;
   24254           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < (object->count); sitename_cntr_1++) {
   24255           0 :                                 PyObject *py_sitename_1;
   24256           0 :                                 py_sitename_1 = pytalloc_reference_ex(lsa_String_Type, object->sitename, &object->sitename[sitename_cntr_1]);
   24257           0 :                                 PyList_SetItem(py_sitename, sitename_cntr_1, py_sitename_1);
   24258             :                         }
   24259             :                 }
   24260             :         }
   24261           0 :         return py_sitename;
   24262             : }
   24263             : 
   24264           0 : static int py_netr_DsRAddressToSitenamesWCtr_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
   24265             : {
   24266           0 :         struct netr_DsRAddressToSitenamesWCtr *object = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(py_obj);
   24267           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sitename));
   24268           0 :         if (value == NULL) {
   24269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename");
   24270           0 :                 return -1;
   24271             :         }
   24272           0 :         if (value == Py_None) {
   24273           0 :                 object->sitename = NULL;
   24274             :         } else {
   24275           0 :                 object->sitename = NULL;
   24276           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24277             :                 {
   24278           0 :                         int sitename_cntr_1;
   24279           0 :                         object->sitename = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sitename, PyList_GET_SIZE(value));
   24280           0 :                         if (!object->sitename) { return -1; }
   24281           0 :                         talloc_set_name_const(object->sitename, "ARRAY: object->sitename");
   24282           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < PyList_GET_SIZE(value); sitename_cntr_1++) {
   24283           0 :                                 if (PyList_GET_ITEM(value, sitename_cntr_1) == NULL) {
   24284           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename[sitename_cntr_1]");
   24285           0 :                                         return -1;
   24286             :                                 }
   24287           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sitename_cntr_1), return -1;);
   24288           0 :                                 if (talloc_reference(object->sitename, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sitename_cntr_1))) == NULL) {
   24289           0 :                                         PyErr_NoMemory();
   24290           0 :                                         return -1;
   24291             :                                 }
   24292           0 :                                 object->sitename[sitename_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sitename_cntr_1));
   24293             :                         }
   24294             :                 }
   24295             :         }
   24296           0 :         return 0;
   24297             : }
   24298             : 
   24299             : static PyGetSetDef py_netr_DsRAddressToSitenamesWCtr_getsetters[] = {
   24300             :         {
   24301             :                 .name = discard_const_p(char, "count"),
   24302             :                 .get = py_netr_DsRAddressToSitenamesWCtr_get_count,
   24303             :                 .set = py_netr_DsRAddressToSitenamesWCtr_set_count,
   24304             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24305             :         },
   24306             :         {
   24307             :                 .name = discard_const_p(char, "sitename"),
   24308             :                 .get = py_netr_DsRAddressToSitenamesWCtr_get_sitename,
   24309             :                 .set = py_netr_DsRAddressToSitenamesWCtr_set_sitename,
   24310             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   24311             :         },
   24312             :         { .name = NULL }
   24313             : };
   24314             : 
   24315           0 : static PyObject *py_netr_DsRAddressToSitenamesWCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24316             : {
   24317           0 :         return pytalloc_new(struct netr_DsRAddressToSitenamesWCtr, type);
   24318             : }
   24319             : 
   24320             : 
   24321             : static PyTypeObject netr_DsRAddressToSitenamesWCtr_Type = {
   24322             :         PyVarObject_HEAD_INIT(NULL, 0)
   24323             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesWCtr",
   24324             :         .tp_getset = py_netr_DsRAddressToSitenamesWCtr_getsetters,
   24325             :         .tp_methods = NULL,
   24326             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24327             :         .tp_new = py_netr_DsRAddressToSitenamesWCtr_new,
   24328             : };
   24329             : 
   24330             : 
   24331           0 : static PyObject *py_netr_DsRAddress_get_buffer(PyObject *obj, void *closure)
   24332             : {
   24333           0 :         struct netr_DsRAddress *object = (struct netr_DsRAddress *)pytalloc_get_ptr(obj);
   24334           0 :         PyObject *py_buffer;
   24335           0 :         if (object->buffer == NULL) {
   24336           0 :                 Py_RETURN_NONE;
   24337             :         }
   24338           0 :         if (object->buffer == NULL) {
   24339           0 :                 py_buffer = Py_None;
   24340           0 :                 Py_INCREF(py_buffer);
   24341             :         } else {
   24342           0 :                 py_buffer = PyList_New(object->size);
   24343           0 :                 if (py_buffer == NULL) {
   24344           0 :                         return NULL;
   24345             :                 }
   24346             :                 {
   24347             :                         int buffer_cntr_1;
   24348           0 :                         for (buffer_cntr_1 = 0; buffer_cntr_1 < (object->size); buffer_cntr_1++) {
   24349           0 :                                 PyObject *py_buffer_1;
   24350           0 :                                 py_buffer_1 = PyLong_FromLong((uint16_t)object->buffer[buffer_cntr_1]);
   24351           0 :                                 PyList_SetItem(py_buffer, buffer_cntr_1, py_buffer_1);
   24352             :                         }
   24353             :                 }
   24354             :         }
   24355           0 :         return py_buffer;
   24356             : }
   24357             : 
   24358           0 : static int py_netr_DsRAddress_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   24359             : {
   24360           0 :         struct netr_DsRAddress *object = (struct netr_DsRAddress *)pytalloc_get_ptr(py_obj);
   24361           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->buffer));
   24362           0 :         if (value == NULL) {
   24363           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffer");
   24364           0 :                 return -1;
   24365             :         }
   24366           0 :         if (value == Py_None) {
   24367           0 :                 object->buffer = NULL;
   24368             :         } else {
   24369           0 :                 object->buffer = NULL;
   24370           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24371             :                 {
   24372           0 :                         int buffer_cntr_1;
   24373           0 :                         object->buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->buffer, PyList_GET_SIZE(value));
   24374           0 :                         if (!object->buffer) { return -1; }
   24375           0 :                         talloc_set_name_const(object->buffer, "ARRAY: object->buffer");
   24376           0 :                         for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(value); buffer_cntr_1++) {
   24377           0 :                                 if (PyList_GET_ITEM(value, buffer_cntr_1) == NULL) {
   24378           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffer[buffer_cntr_1]");
   24379           0 :                                         return -1;
   24380             :                                 }
   24381             :                                 {
   24382           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->buffer[buffer_cntr_1]));
   24383           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, buffer_cntr_1))) {
   24384           0 :                                                 unsigned long long test_var;
   24385           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, buffer_cntr_1));
   24386           0 :                                                 if (PyErr_Occurred() != NULL) {
   24387           0 :                                                         return -1;
   24388             :                                                 }
   24389           0 :                                                 if (test_var > uint_max) {
   24390           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24391             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   24392           0 :                                                         return -1;
   24393             :                                                 }
   24394           0 :                                                 object->buffer[buffer_cntr_1] = test_var;
   24395             :                                         } else {
   24396           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   24397             :                                                   PyLong_Type.tp_name);
   24398           0 :                                                 return -1;
   24399             :                                         }
   24400             :                                 }
   24401             :                         }
   24402             :                 }
   24403             :         }
   24404           0 :         return 0;
   24405             : }
   24406             : 
   24407           0 : static PyObject *py_netr_DsRAddress_get_size(PyObject *obj, void *closure)
   24408             : {
   24409           0 :         struct netr_DsRAddress *object = (struct netr_DsRAddress *)pytalloc_get_ptr(obj);
   24410           0 :         PyObject *py_size;
   24411           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)object->size);
   24412           0 :         return py_size;
   24413             : }
   24414             : 
   24415           0 : static int py_netr_DsRAddress_set_size(PyObject *py_obj, PyObject *value, void *closure)
   24416             : {
   24417           0 :         struct netr_DsRAddress *object = (struct netr_DsRAddress *)pytalloc_get_ptr(py_obj);
   24418           0 :         if (value == NULL) {
   24419           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   24420           0 :                 return -1;
   24421             :         }
   24422             :         {
   24423           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   24424           0 :                 if (PyLong_Check(value)) {
   24425           0 :                         unsigned long long test_var;
   24426           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24427           0 :                         if (PyErr_Occurred() != NULL) {
   24428           0 :                                 return -1;
   24429             :                         }
   24430           0 :                         if (test_var > uint_max) {
   24431           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24432             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24433           0 :                                 return -1;
   24434             :                         }
   24435           0 :                         object->size = test_var;
   24436             :                 } else {
   24437           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24438             :                           PyLong_Type.tp_name);
   24439           0 :                         return -1;
   24440             :                 }
   24441             :         }
   24442           0 :         return 0;
   24443             : }
   24444             : 
   24445             : static PyGetSetDef py_netr_DsRAddress_getsetters[] = {
   24446             :         {
   24447             :                 .name = discard_const_p(char, "buffer"),
   24448             :                 .get = py_netr_DsRAddress_get_buffer,
   24449             :                 .set = py_netr_DsRAddress_set_buffer,
   24450             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   24451             :         },
   24452             :         {
   24453             :                 .name = discard_const_p(char, "size"),
   24454             :                 .get = py_netr_DsRAddress_get_size,
   24455             :                 .set = py_netr_DsRAddress_set_size,
   24456             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24457             :         },
   24458             :         { .name = NULL }
   24459             : };
   24460             : 
   24461           0 : static PyObject *py_netr_DsRAddress_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24462             : {
   24463           0 :         return pytalloc_new(struct netr_DsRAddress, type);
   24464             : }
   24465             : 
   24466             : 
   24467             : static PyTypeObject netr_DsRAddress_Type = {
   24468             :         PyVarObject_HEAD_INIT(NULL, 0)
   24469             :         .tp_name = "netlogon.netr_DsRAddress",
   24470             :         .tp_getset = py_netr_DsRAddress_getsetters,
   24471             :         .tp_methods = NULL,
   24472             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24473             :         .tp_new = py_netr_DsRAddress_new,
   24474             : };
   24475             : 
   24476             : 
   24477           0 : static PyObject *py_netr_DomainTrust_get_netbios_name(PyObject *obj, void *closure)
   24478             : {
   24479           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24480           0 :         PyObject *py_netbios_name;
   24481           0 :         if (object->netbios_name == NULL) {
   24482           0 :                 Py_RETURN_NONE;
   24483             :         }
   24484           0 :         if (object->netbios_name == NULL) {
   24485           0 :                 py_netbios_name = Py_None;
   24486           0 :                 Py_INCREF(py_netbios_name);
   24487             :         } else {
   24488           0 :                 if (object->netbios_name == NULL) {
   24489           0 :                         py_netbios_name = Py_None;
   24490           0 :                         Py_INCREF(py_netbios_name);
   24491             :                 } else {
   24492           0 :                         py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
   24493             :                 }
   24494             :         }
   24495           0 :         return py_netbios_name;
   24496             : }
   24497             : 
   24498           0 : static int py_netr_DomainTrust_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
   24499             : {
   24500           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24501           0 :         if (value == NULL) {
   24502           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netbios_name");
   24503           0 :                 return -1;
   24504             :         }
   24505           0 :         if (value == Py_None) {
   24506           0 :                 object->netbios_name = NULL;
   24507             :         } else {
   24508           0 :                 object->netbios_name = NULL;
   24509             :                 {
   24510           0 :                         const char *test_str;
   24511           0 :                         const char *talloc_str;
   24512           0 :                         PyObject *unicode = NULL;
   24513           0 :                         if (PyUnicode_Check(value)) {
   24514           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   24515           0 :                                 if (unicode == NULL) {
   24516           0 :                                         PyErr_NoMemory();
   24517           0 :                                         return -1;
   24518             :                                 }
   24519           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   24520           0 :                         } else if (PyBytes_Check(value)) {
   24521           0 :                                 test_str = PyBytes_AS_STRING(value);
   24522             :                         } else {
   24523           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   24524           0 :                                 return -1;
   24525             :                         }
   24526           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   24527           0 :                         if (unicode != NULL) {
   24528           0 :                                 Py_DECREF(unicode);
   24529             :                         }
   24530           0 :                         if (talloc_str == NULL) {
   24531           0 :                                 PyErr_NoMemory();
   24532           0 :                                 return -1;
   24533             :                         }
   24534           0 :                         object->netbios_name = talloc_str;
   24535             :                 }
   24536             :         }
   24537           0 :         return 0;
   24538             : }
   24539             : 
   24540          26 : static PyObject *py_netr_DomainTrust_get_dns_name(PyObject *obj, void *closure)
   24541             : {
   24542          26 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24543           0 :         PyObject *py_dns_name;
   24544          26 :         if (object->dns_name == NULL) {
   24545           0 :                 Py_RETURN_NONE;
   24546             :         }
   24547          26 :         if (object->dns_name == NULL) {
   24548           0 :                 py_dns_name = Py_None;
   24549           0 :                 Py_INCREF(py_dns_name);
   24550             :         } else {
   24551          26 :                 if (object->dns_name == NULL) {
   24552           0 :                         py_dns_name = Py_None;
   24553           0 :                         Py_INCREF(py_dns_name);
   24554             :                 } else {
   24555          26 :                         py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
   24556             :                 }
   24557             :         }
   24558          26 :         return py_dns_name;
   24559             : }
   24560             : 
   24561           0 : static int py_netr_DomainTrust_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
   24562             : {
   24563           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24564           0 :         if (value == NULL) {
   24565           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
   24566           0 :                 return -1;
   24567             :         }
   24568           0 :         if (value == Py_None) {
   24569           0 :                 object->dns_name = NULL;
   24570             :         } else {
   24571           0 :                 object->dns_name = NULL;
   24572             :                 {
   24573           0 :                         const char *test_str;
   24574           0 :                         const char *talloc_str;
   24575           0 :                         PyObject *unicode = NULL;
   24576           0 :                         if (PyUnicode_Check(value)) {
   24577           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   24578           0 :                                 if (unicode == NULL) {
   24579           0 :                                         PyErr_NoMemory();
   24580           0 :                                         return -1;
   24581             :                                 }
   24582           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   24583           0 :                         } else if (PyBytes_Check(value)) {
   24584           0 :                                 test_str = PyBytes_AS_STRING(value);
   24585             :                         } else {
   24586           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   24587           0 :                                 return -1;
   24588             :                         }
   24589           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   24590           0 :                         if (unicode != NULL) {
   24591           0 :                                 Py_DECREF(unicode);
   24592             :                         }
   24593           0 :                         if (talloc_str == NULL) {
   24594           0 :                                 PyErr_NoMemory();
   24595           0 :                                 return -1;
   24596             :                         }
   24597           0 :                         object->dns_name = talloc_str;
   24598             :                 }
   24599             :         }
   24600           0 :         return 0;
   24601             : }
   24602             : 
   24603         252 : static PyObject *py_netr_DomainTrust_get_trust_flags(PyObject *obj, void *closure)
   24604             : {
   24605         252 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24606           0 :         PyObject *py_trust_flags;
   24607         252 :         py_trust_flags = PyLong_FromUnsignedLongLong((uint32_t)object->trust_flags);
   24608         252 :         return py_trust_flags;
   24609             : }
   24610             : 
   24611           0 : static int py_netr_DomainTrust_set_trust_flags(PyObject *py_obj, PyObject *value, void *closure)
   24612             : {
   24613           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24614           0 :         if (value == NULL) {
   24615           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_flags");
   24616           0 :                 return -1;
   24617             :         }
   24618             :         {
   24619           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_flags));
   24620           0 :                 if (PyLong_Check(value)) {
   24621           0 :                         unsigned long long test_var;
   24622           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24623           0 :                         if (PyErr_Occurred() != NULL) {
   24624           0 :                                 return -1;
   24625             :                         }
   24626           0 :                         if (test_var > uint_max) {
   24627           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24628             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24629           0 :                                 return -1;
   24630             :                         }
   24631           0 :                         object->trust_flags = test_var;
   24632             :                 } else {
   24633           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24634             :                           PyLong_Type.tp_name);
   24635           0 :                         return -1;
   24636             :                 }
   24637             :         }
   24638           0 :         return 0;
   24639             : }
   24640             : 
   24641           0 : static PyObject *py_netr_DomainTrust_get_parent_index(PyObject *obj, void *closure)
   24642             : {
   24643           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24644           0 :         PyObject *py_parent_index;
   24645           0 :         py_parent_index = PyLong_FromUnsignedLongLong((uint32_t)object->parent_index);
   24646           0 :         return py_parent_index;
   24647             : }
   24648             : 
   24649           0 : static int py_netr_DomainTrust_set_parent_index(PyObject *py_obj, PyObject *value, void *closure)
   24650             : {
   24651           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24652           0 :         if (value == NULL) {
   24653           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parent_index");
   24654           0 :                 return -1;
   24655             :         }
   24656             :         {
   24657           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parent_index));
   24658           0 :                 if (PyLong_Check(value)) {
   24659           0 :                         unsigned long long test_var;
   24660           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24661           0 :                         if (PyErr_Occurred() != NULL) {
   24662           0 :                                 return -1;
   24663             :                         }
   24664           0 :                         if (test_var > uint_max) {
   24665           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24666             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24667           0 :                                 return -1;
   24668             :                         }
   24669           0 :                         object->parent_index = test_var;
   24670             :                 } else {
   24671           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24672             :                           PyLong_Type.tp_name);
   24673           0 :                         return -1;
   24674             :                 }
   24675             :         }
   24676           0 :         return 0;
   24677             : }
   24678             : 
   24679          26 : static PyObject *py_netr_DomainTrust_get_trust_type(PyObject *obj, void *closure)
   24680             : {
   24681          26 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24682           0 :         PyObject *py_trust_type;
   24683          26 :         py_trust_type = PyLong_FromUnsignedLongLong((uint32_t)object->trust_type);
   24684          26 :         return py_trust_type;
   24685             : }
   24686             : 
   24687           0 : static int py_netr_DomainTrust_set_trust_type(PyObject *py_obj, PyObject *value, void *closure)
   24688             : {
   24689           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24690           0 :         if (value == NULL) {
   24691           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_type");
   24692           0 :                 return -1;
   24693             :         }
   24694             :         {
   24695           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_type));
   24696           0 :                 if (PyLong_Check(value)) {
   24697           0 :                         unsigned long long test_var;
   24698           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24699           0 :                         if (PyErr_Occurred() != NULL) {
   24700           0 :                                 return -1;
   24701             :                         }
   24702           0 :                         if (test_var > uint_max) {
   24703           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24704             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24705           0 :                                 return -1;
   24706             :                         }
   24707           0 :                         object->trust_type = test_var;
   24708             :                 } else {
   24709           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24710             :                           PyLong_Type.tp_name);
   24711           0 :                         return -1;
   24712             :                 }
   24713             :         }
   24714           0 :         return 0;
   24715             : }
   24716             : 
   24717          78 : static PyObject *py_netr_DomainTrust_get_trust_attributes(PyObject *obj, void *closure)
   24718             : {
   24719          78 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24720           0 :         PyObject *py_trust_attributes;
   24721          78 :         py_trust_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->trust_attributes);
   24722          78 :         return py_trust_attributes;
   24723             : }
   24724             : 
   24725           0 : static int py_netr_DomainTrust_set_trust_attributes(PyObject *py_obj, PyObject *value, void *closure)
   24726             : {
   24727           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24728           0 :         if (value == NULL) {
   24729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_attributes");
   24730           0 :                 return -1;
   24731             :         }
   24732             :         {
   24733           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_attributes));
   24734           0 :                 if (PyLong_Check(value)) {
   24735           0 :                         unsigned long long test_var;
   24736           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24737           0 :                         if (PyErr_Occurred() != NULL) {
   24738           0 :                                 return -1;
   24739             :                         }
   24740           0 :                         if (test_var > uint_max) {
   24741           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24742             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24743           0 :                                 return -1;
   24744             :                         }
   24745           0 :                         object->trust_attributes = test_var;
   24746             :                 } else {
   24747           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24748             :                           PyLong_Type.tp_name);
   24749           0 :                         return -1;
   24750             :                 }
   24751             :         }
   24752           0 :         return 0;
   24753             : }
   24754             : 
   24755           0 : static PyObject *py_netr_DomainTrust_get_sid(PyObject *obj, void *closure)
   24756             : {
   24757           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24758           0 :         PyObject *py_sid;
   24759           0 :         if (object->sid == NULL) {
   24760           0 :                 Py_RETURN_NONE;
   24761             :         }
   24762           0 :         if (object->sid == NULL) {
   24763           0 :                 py_sid = Py_None;
   24764           0 :                 Py_INCREF(py_sid);
   24765             :         } else {
   24766           0 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
   24767             :         }
   24768           0 :         return py_sid;
   24769             : }
   24770             : 
   24771           0 : static int py_netr_DomainTrust_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   24772             : {
   24773           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24774           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
   24775           0 :         if (value == NULL) {
   24776           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
   24777           0 :                 return -1;
   24778             :         }
   24779           0 :         if (value == Py_None) {
   24780           0 :                 object->sid = NULL;
   24781             :         } else {
   24782           0 :                 object->sid = NULL;
   24783           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   24784           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24785           0 :                         PyErr_NoMemory();
   24786           0 :                         return -1;
   24787             :                 }
   24788           0 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
   24789             :         }
   24790           0 :         return 0;
   24791             : }
   24792             : 
   24793           0 : static PyObject *py_netr_DomainTrust_get_guid(PyObject *obj, void *closure)
   24794             : {
   24795           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24796           0 :         PyObject *py_guid;
   24797           0 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
   24798           0 :         return py_guid;
   24799             : }
   24800             : 
   24801           0 : static int py_netr_DomainTrust_set_guid(PyObject *py_obj, PyObject *value, void *closure)
   24802             : {
   24803           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24804           0 :         if (value == NULL) {
   24805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
   24806           0 :                 return -1;
   24807             :         }
   24808           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   24809           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24810           0 :                 PyErr_NoMemory();
   24811           0 :                 return -1;
   24812             :         }
   24813           0 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
   24814           0 :         return 0;
   24815             : }
   24816             : 
   24817             : static PyGetSetDef py_netr_DomainTrust_getsetters[] = {
   24818             :         {
   24819             :                 .name = discard_const_p(char, "netbios_name"),
   24820             :                 .get = py_netr_DomainTrust_get_netbios_name,
   24821             :                 .set = py_netr_DomainTrust_set_netbios_name,
   24822             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   24823             :         },
   24824             :         {
   24825             :                 .name = discard_const_p(char, "dns_name"),
   24826             :                 .get = py_netr_DomainTrust_get_dns_name,
   24827             :                 .set = py_netr_DomainTrust_set_dns_name,
   24828             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   24829             :         },
   24830             :         {
   24831             :                 .name = discard_const_p(char, "trust_flags"),
   24832             :                 .get = py_netr_DomainTrust_get_trust_flags,
   24833             :                 .set = py_netr_DomainTrust_set_trust_flags,
   24834             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
   24835             :         },
   24836             :         {
   24837             :                 .name = discard_const_p(char, "parent_index"),
   24838             :                 .get = py_netr_DomainTrust_get_parent_index,
   24839             :                 .set = py_netr_DomainTrust_set_parent_index,
   24840             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24841             :         },
   24842             :         {
   24843             :                 .name = discard_const_p(char, "trust_type"),
   24844             :                 .get = py_netr_DomainTrust_get_trust_type,
   24845             :                 .set = py_netr_DomainTrust_set_trust_type,
   24846             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustType")
   24847             :         },
   24848             :         {
   24849             :                 .name = discard_const_p(char, "trust_attributes"),
   24850             :                 .get = py_netr_DomainTrust_get_trust_attributes,
   24851             :                 .set = py_netr_DomainTrust_set_trust_attributes,
   24852             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustAttributes")
   24853             :         },
   24854             :         {
   24855             :                 .name = discard_const_p(char, "sid"),
   24856             :                 .get = py_netr_DomainTrust_get_sid,
   24857             :                 .set = py_netr_DomainTrust_set_sid,
   24858             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
   24859             :         },
   24860             :         {
   24861             :                 .name = discard_const_p(char, "guid"),
   24862             :                 .get = py_netr_DomainTrust_get_guid,
   24863             :                 .set = py_netr_DomainTrust_set_guid,
   24864             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   24865             :         },
   24866             :         { .name = NULL }
   24867             : };
   24868             : 
   24869           0 : static PyObject *py_netr_DomainTrust_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24870             : {
   24871           0 :         return pytalloc_new(struct netr_DomainTrust, type);
   24872             : }
   24873             : 
   24874           0 : static PyObject *py_netr_DomainTrust_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   24875             : {
   24876           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24877           0 :         PyObject *ret = NULL;
   24878           0 :         DATA_BLOB blob;
   24879           0 :         enum ndr_err_code err;
   24880           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   24881           0 :         if (tmp_ctx == NULL) {
   24882           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   24883           0 :                 return NULL;
   24884             :         }
   24885           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DomainTrust);
   24886           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   24887           0 :                 TALLOC_FREE(tmp_ctx);
   24888           0 :                 PyErr_SetNdrError(err);
   24889           0 :                 return NULL;
   24890             :         }
   24891             : 
   24892           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   24893           0 :         TALLOC_FREE(tmp_ctx);
   24894           0 :         return ret;
   24895             : }
   24896             : 
   24897           0 : static PyObject *py_netr_DomainTrust_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   24898             : {
   24899           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24900           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   24901           0 :         Py_ssize_t blob_length = 0;
   24902           0 :         enum ndr_err_code err;
   24903           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   24904           0 :         PyObject *allow_remaining_obj = NULL;
   24905           0 :         bool allow_remaining = false;
   24906             : 
   24907           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   24908             :                 discard_const_p(char *, kwnames),
   24909             :                 &blob.data, &blob_length,
   24910             :                 &allow_remaining_obj)) {
   24911           0 :                 return NULL;
   24912             :         }
   24913           0 :         blob.length = blob_length;
   24914             : 
   24915           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   24916           0 :                 allow_remaining = true;
   24917             :         }
   24918             : 
   24919           0 :         if (allow_remaining) {
   24920           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrust);
   24921             :         } else {
   24922           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrust);
   24923             :         }
   24924           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   24925           0 :                 PyErr_SetNdrError(err);
   24926           0 :                 return NULL;
   24927             :         }
   24928             : 
   24929           0 :         Py_RETURN_NONE;
   24930             : }
   24931             : 
   24932           0 : static PyObject *py_netr_DomainTrust_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   24933             : {
   24934           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24935           0 :         PyObject *ret;
   24936           0 :         char *retstr;
   24937             : 
   24938           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DomainTrust, "netr_DomainTrust", object);
   24939           0 :         ret = PyUnicode_FromString(retstr);
   24940           0 :         talloc_free(retstr);
   24941             : 
   24942           0 :         return ret;
   24943             : }
   24944             : 
   24945             : static PyMethodDef py_netr_DomainTrust_methods[] = {
   24946             :         { "__ndr_pack__", (PyCFunction)py_netr_DomainTrust_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   24947             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainTrust_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   24948             :         { "__ndr_print__", (PyCFunction)py_netr_DomainTrust_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   24949             :         { NULL, NULL, 0, NULL }
   24950             : };
   24951             : 
   24952             : 
   24953             : static PyTypeObject netr_DomainTrust_Type = {
   24954             :         PyVarObject_HEAD_INIT(NULL, 0)
   24955             :         .tp_name = "netlogon.netr_DomainTrust",
   24956             :         .tp_getset = py_netr_DomainTrust_getsetters,
   24957             :         .tp_methods = py_netr_DomainTrust_methods,
   24958             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24959             :         .tp_new = py_netr_DomainTrust_new,
   24960             : };
   24961             : 
   24962             : 
   24963           0 : static PyObject *py_netr_DomainTrustList_get_count(PyObject *obj, void *closure)
   24964             : {
   24965           0 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(obj);
   24966           0 :         PyObject *py_count;
   24967           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   24968           0 :         return py_count;
   24969             : }
   24970             : 
   24971           0 : static int py_netr_DomainTrustList_set_count(PyObject *py_obj, PyObject *value, void *closure)
   24972             : {
   24973           0 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(py_obj);
   24974           0 :         if (value == NULL) {
   24975           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   24976           0 :                 return -1;
   24977             :         }
   24978             :         {
   24979           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   24980           0 :                 if (PyLong_Check(value)) {
   24981           0 :                         unsigned long long test_var;
   24982           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24983           0 :                         if (PyErr_Occurred() != NULL) {
   24984           0 :                                 return -1;
   24985             :                         }
   24986           0 :                         if (test_var > uint_max) {
   24987           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24988             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24989           0 :                                 return -1;
   24990             :                         }
   24991           0 :                         object->count = test_var;
   24992             :                 } else {
   24993           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24994             :                           PyLong_Type.tp_name);
   24995           0 :                         return -1;
   24996             :                 }
   24997             :         }
   24998           0 :         return 0;
   24999             : }
   25000             : 
   25001          18 : static PyObject *py_netr_DomainTrustList_get_array(PyObject *obj, void *closure)
   25002             : {
   25003          18 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(obj);
   25004           0 :         PyObject *py_array;
   25005          18 :         if (object->array == NULL) {
   25006           0 :                 Py_RETURN_NONE;
   25007             :         }
   25008          18 :         if (object->array == NULL) {
   25009           0 :                 py_array = Py_None;
   25010           0 :                 Py_INCREF(py_array);
   25011             :         } else {
   25012          18 :                 py_array = PyList_New(object->count);
   25013          18 :                 if (py_array == NULL) {
   25014           0 :                         return NULL;
   25015             :                 }
   25016             :                 {
   25017             :                         int array_cntr_1;
   25018          62 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   25019           0 :                                 PyObject *py_array_1;
   25020          44 :                                 py_array_1 = pytalloc_reference_ex(&netr_DomainTrust_Type, object->array, &object->array[array_cntr_1]);
   25021          44 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   25022             :                         }
   25023             :                 }
   25024             :         }
   25025          18 :         return py_array;
   25026             : }
   25027             : 
   25028           0 : static int py_netr_DomainTrustList_set_array(PyObject *py_obj, PyObject *value, void *closure)
   25029             : {
   25030           0 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(py_obj);
   25031           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   25032           0 :         if (value == NULL) {
   25033           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   25034           0 :                 return -1;
   25035             :         }
   25036           0 :         if (value == Py_None) {
   25037           0 :                 object->array = NULL;
   25038             :         } else {
   25039           0 :                 object->array = NULL;
   25040           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25041             :                 {
   25042           0 :                         int array_cntr_1;
   25043           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   25044           0 :                         if (!object->array) { return -1; }
   25045           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   25046           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   25047           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   25048           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
   25049           0 :                                         return -1;
   25050             :                                 }
   25051           0 :                                 PY_CHECK_TYPE(&netr_DomainTrust_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   25052           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   25053           0 :                                         PyErr_NoMemory();
   25054           0 :                                         return -1;
   25055             :                                 }
   25056           0 :                                 object->array[array_cntr_1] = *(struct netr_DomainTrust *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   25057             :                         }
   25058             :                 }
   25059             :         }
   25060           0 :         return 0;
   25061             : }
   25062             : 
   25063             : static PyGetSetDef py_netr_DomainTrustList_getsetters[] = {
   25064             :         {
   25065             :                 .name = discard_const_p(char, "count"),
   25066             :                 .get = py_netr_DomainTrustList_get_count,
   25067             :                 .set = py_netr_DomainTrustList_set_count,
   25068             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25069             :         },
   25070             :         {
   25071             :                 .name = discard_const_p(char, "array"),
   25072             :                 .get = py_netr_DomainTrustList_get_array,
   25073             :                 .set = py_netr_DomainTrustList_set_array,
   25074             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrust")
   25075             :         },
   25076             :         { .name = NULL }
   25077             : };
   25078             : 
   25079           0 : static PyObject *py_netr_DomainTrustList_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25080             : {
   25081           0 :         return pytalloc_new(struct netr_DomainTrustList, type);
   25082             : }
   25083             : 
   25084           0 : static PyObject *py_netr_DomainTrustList_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   25085             : {
   25086           0 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(py_obj);
   25087           0 :         PyObject *ret = NULL;
   25088           0 :         DATA_BLOB blob;
   25089           0 :         enum ndr_err_code err;
   25090           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   25091           0 :         if (tmp_ctx == NULL) {
   25092           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   25093           0 :                 return NULL;
   25094             :         }
   25095           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DomainTrustList);
   25096           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   25097           0 :                 TALLOC_FREE(tmp_ctx);
   25098           0 :                 PyErr_SetNdrError(err);
   25099           0 :                 return NULL;
   25100             :         }
   25101             : 
   25102           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   25103           0 :         TALLOC_FREE(tmp_ctx);
   25104           0 :         return ret;
   25105             : }
   25106             : 
   25107           0 : static PyObject *py_netr_DomainTrustList_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   25108             : {
   25109           0 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(py_obj);
   25110           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   25111           0 :         Py_ssize_t blob_length = 0;
   25112           0 :         enum ndr_err_code err;
   25113           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   25114           0 :         PyObject *allow_remaining_obj = NULL;
   25115           0 :         bool allow_remaining = false;
   25116             : 
   25117           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   25118             :                 discard_const_p(char *, kwnames),
   25119             :                 &blob.data, &blob_length,
   25120             :                 &allow_remaining_obj)) {
   25121           0 :                 return NULL;
   25122             :         }
   25123           0 :         blob.length = blob_length;
   25124             : 
   25125           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   25126           0 :                 allow_remaining = true;
   25127             :         }
   25128             : 
   25129           0 :         if (allow_remaining) {
   25130           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrustList);
   25131             :         } else {
   25132           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrustList);
   25133             :         }
   25134           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   25135           0 :                 PyErr_SetNdrError(err);
   25136           0 :                 return NULL;
   25137             :         }
   25138             : 
   25139           0 :         Py_RETURN_NONE;
   25140             : }
   25141             : 
   25142           0 : static PyObject *py_netr_DomainTrustList_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   25143             : {
   25144           0 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(py_obj);
   25145           0 :         PyObject *ret;
   25146           0 :         char *retstr;
   25147             : 
   25148           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DomainTrustList, "netr_DomainTrustList", object);
   25149           0 :         ret = PyUnicode_FromString(retstr);
   25150           0 :         talloc_free(retstr);
   25151             : 
   25152           0 :         return ret;
   25153             : }
   25154             : 
   25155             : static PyMethodDef py_netr_DomainTrustList_methods[] = {
   25156             :         { "__ndr_pack__", (PyCFunction)py_netr_DomainTrustList_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   25157             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainTrustList_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   25158             :         { "__ndr_print__", (PyCFunction)py_netr_DomainTrustList_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   25159             :         { NULL, NULL, 0, NULL }
   25160             : };
   25161             : 
   25162             : 
   25163             : static PyTypeObject netr_DomainTrustList_Type = {
   25164             :         PyVarObject_HEAD_INIT(NULL, 0)
   25165             :         .tp_name = "netlogon.netr_DomainTrustList",
   25166             :         .tp_getset = py_netr_DomainTrustList_getsetters,
   25167             :         .tp_methods = py_netr_DomainTrustList_methods,
   25168             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25169             :         .tp_new = py_netr_DomainTrustList_new,
   25170             : };
   25171             : 
   25172             : 
   25173           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_count(PyObject *obj, void *closure)
   25174             : {
   25175           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(obj);
   25176           0 :         PyObject *py_count;
   25177           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   25178           0 :         return py_count;
   25179             : }
   25180             : 
   25181           0 : static int py_netr_DsRAddressToSitenamesExWCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   25182             : {
   25183           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(py_obj);
   25184           0 :         if (value == NULL) {
   25185           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   25186           0 :                 return -1;
   25187             :         }
   25188             :         {
   25189           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   25190           0 :                 if (PyLong_Check(value)) {
   25191           0 :                         unsigned long long test_var;
   25192           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25193           0 :                         if (PyErr_Occurred() != NULL) {
   25194           0 :                                 return -1;
   25195             :                         }
   25196           0 :                         if (test_var > uint_max) {
   25197           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25198             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25199           0 :                                 return -1;
   25200             :                         }
   25201           0 :                         object->count = test_var;
   25202             :                 } else {
   25203           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25204             :                           PyLong_Type.tp_name);
   25205           0 :                         return -1;
   25206             :                 }
   25207             :         }
   25208           0 :         return 0;
   25209             : }
   25210             : 
   25211           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_sitename(PyObject *obj, void *closure)
   25212             : {
   25213           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(obj);
   25214           0 :         PyObject *py_sitename;
   25215           0 :         if (object->sitename == NULL) {
   25216           0 :                 Py_RETURN_NONE;
   25217             :         }
   25218           0 :         if (object->sitename == NULL) {
   25219           0 :                 py_sitename = Py_None;
   25220           0 :                 Py_INCREF(py_sitename);
   25221             :         } else {
   25222           0 :                 py_sitename = PyList_New(object->count);
   25223           0 :                 if (py_sitename == NULL) {
   25224           0 :                         return NULL;
   25225             :                 }
   25226             :                 {
   25227             :                         int sitename_cntr_1;
   25228           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < (object->count); sitename_cntr_1++) {
   25229           0 :                                 PyObject *py_sitename_1;
   25230           0 :                                 py_sitename_1 = pytalloc_reference_ex(lsa_String_Type, object->sitename, &object->sitename[sitename_cntr_1]);
   25231           0 :                                 PyList_SetItem(py_sitename, sitename_cntr_1, py_sitename_1);
   25232             :                         }
   25233             :                 }
   25234             :         }
   25235           0 :         return py_sitename;
   25236             : }
   25237             : 
   25238           0 : static int py_netr_DsRAddressToSitenamesExWCtr_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
   25239             : {
   25240           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(py_obj);
   25241           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sitename));
   25242           0 :         if (value == NULL) {
   25243           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename");
   25244           0 :                 return -1;
   25245             :         }
   25246           0 :         if (value == Py_None) {
   25247           0 :                 object->sitename = NULL;
   25248             :         } else {
   25249           0 :                 object->sitename = NULL;
   25250           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25251             :                 {
   25252           0 :                         int sitename_cntr_1;
   25253           0 :                         object->sitename = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sitename, PyList_GET_SIZE(value));
   25254           0 :                         if (!object->sitename) { return -1; }
   25255           0 :                         talloc_set_name_const(object->sitename, "ARRAY: object->sitename");
   25256           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < PyList_GET_SIZE(value); sitename_cntr_1++) {
   25257           0 :                                 if (PyList_GET_ITEM(value, sitename_cntr_1) == NULL) {
   25258           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename[sitename_cntr_1]");
   25259           0 :                                         return -1;
   25260             :                                 }
   25261           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sitename_cntr_1), return -1;);
   25262           0 :                                 if (talloc_reference(object->sitename, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sitename_cntr_1))) == NULL) {
   25263           0 :                                         PyErr_NoMemory();
   25264           0 :                                         return -1;
   25265             :                                 }
   25266           0 :                                 object->sitename[sitename_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sitename_cntr_1));
   25267             :                         }
   25268             :                 }
   25269             :         }
   25270           0 :         return 0;
   25271             : }
   25272             : 
   25273           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_subnetname(PyObject *obj, void *closure)
   25274             : {
   25275           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(obj);
   25276           0 :         PyObject *py_subnetname;
   25277           0 :         if (object->subnetname == NULL) {
   25278           0 :                 Py_RETURN_NONE;
   25279             :         }
   25280           0 :         if (object->subnetname == NULL) {
   25281           0 :                 py_subnetname = Py_None;
   25282           0 :                 Py_INCREF(py_subnetname);
   25283             :         } else {
   25284           0 :                 py_subnetname = PyList_New(object->count);
   25285           0 :                 if (py_subnetname == NULL) {
   25286           0 :                         return NULL;
   25287             :                 }
   25288             :                 {
   25289             :                         int subnetname_cntr_1;
   25290           0 :                         for (subnetname_cntr_1 = 0; subnetname_cntr_1 < (object->count); subnetname_cntr_1++) {
   25291           0 :                                 PyObject *py_subnetname_1;
   25292           0 :                                 py_subnetname_1 = pytalloc_reference_ex(lsa_String_Type, object->subnetname, &object->subnetname[subnetname_cntr_1]);
   25293           0 :                                 PyList_SetItem(py_subnetname, subnetname_cntr_1, py_subnetname_1);
   25294             :                         }
   25295             :                 }
   25296             :         }
   25297           0 :         return py_subnetname;
   25298             : }
   25299             : 
   25300           0 : static int py_netr_DsRAddressToSitenamesExWCtr_set_subnetname(PyObject *py_obj, PyObject *value, void *closure)
   25301             : {
   25302           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(py_obj);
   25303           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->subnetname));
   25304           0 :         if (value == NULL) {
   25305           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->subnetname");
   25306           0 :                 return -1;
   25307             :         }
   25308           0 :         if (value == Py_None) {
   25309           0 :                 object->subnetname = NULL;
   25310             :         } else {
   25311           0 :                 object->subnetname = NULL;
   25312           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25313             :                 {
   25314           0 :                         int subnetname_cntr_1;
   25315           0 :                         object->subnetname = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->subnetname, PyList_GET_SIZE(value));
   25316           0 :                         if (!object->subnetname) { return -1; }
   25317           0 :                         talloc_set_name_const(object->subnetname, "ARRAY: object->subnetname");
   25318           0 :                         for (subnetname_cntr_1 = 0; subnetname_cntr_1 < PyList_GET_SIZE(value); subnetname_cntr_1++) {
   25319           0 :                                 if (PyList_GET_ITEM(value, subnetname_cntr_1) == NULL) {
   25320           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->subnetname[subnetname_cntr_1]");
   25321           0 :                                         return -1;
   25322             :                                 }
   25323           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, subnetname_cntr_1), return -1;);
   25324           0 :                                 if (talloc_reference(object->subnetname, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, subnetname_cntr_1))) == NULL) {
   25325           0 :                                         PyErr_NoMemory();
   25326           0 :                                         return -1;
   25327             :                                 }
   25328           0 :                                 object->subnetname[subnetname_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, subnetname_cntr_1));
   25329             :                         }
   25330             :                 }
   25331             :         }
   25332           0 :         return 0;
   25333             : }
   25334             : 
   25335             : static PyGetSetDef py_netr_DsRAddressToSitenamesExWCtr_getsetters[] = {
   25336             :         {
   25337             :                 .name = discard_const_p(char, "count"),
   25338             :                 .get = py_netr_DsRAddressToSitenamesExWCtr_get_count,
   25339             :                 .set = py_netr_DsRAddressToSitenamesExWCtr_set_count,
   25340             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25341             :         },
   25342             :         {
   25343             :                 .name = discard_const_p(char, "sitename"),
   25344             :                 .get = py_netr_DsRAddressToSitenamesExWCtr_get_sitename,
   25345             :                 .set = py_netr_DsRAddressToSitenamesExWCtr_set_sitename,
   25346             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25347             :         },
   25348             :         {
   25349             :                 .name = discard_const_p(char, "subnetname"),
   25350             :                 .get = py_netr_DsRAddressToSitenamesExWCtr_get_subnetname,
   25351             :                 .set = py_netr_DsRAddressToSitenamesExWCtr_set_subnetname,
   25352             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25353             :         },
   25354             :         { .name = NULL }
   25355             : };
   25356             : 
   25357           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25358             : {
   25359           0 :         return pytalloc_new(struct netr_DsRAddressToSitenamesExWCtr, type);
   25360             : }
   25361             : 
   25362             : 
   25363             : static PyTypeObject netr_DsRAddressToSitenamesExWCtr_Type = {
   25364             :         PyVarObject_HEAD_INIT(NULL, 0)
   25365             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesExWCtr",
   25366             :         .tp_getset = py_netr_DsRAddressToSitenamesExWCtr_getsetters,
   25367             :         .tp_methods = NULL,
   25368             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25369             :         .tp_new = py_netr_DsRAddressToSitenamesExWCtr_new,
   25370             : };
   25371             : 
   25372             : 
   25373           0 : static PyObject *py_DcSitesCtr_get_num_sites(PyObject *obj, void *closure)
   25374             : {
   25375           0 :         struct DcSitesCtr *object = (struct DcSitesCtr *)pytalloc_get_ptr(obj);
   25376           0 :         PyObject *py_num_sites;
   25377           0 :         py_num_sites = PyLong_FromUnsignedLongLong((uint32_t)object->num_sites);
   25378           0 :         return py_num_sites;
   25379             : }
   25380             : 
   25381           0 : static int py_DcSitesCtr_set_num_sites(PyObject *py_obj, PyObject *value, void *closure)
   25382             : {
   25383           0 :         struct DcSitesCtr *object = (struct DcSitesCtr *)pytalloc_get_ptr(py_obj);
   25384           0 :         if (value == NULL) {
   25385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_sites");
   25386           0 :                 return -1;
   25387             :         }
   25388             :         {
   25389           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_sites));
   25390           0 :                 if (PyLong_Check(value)) {
   25391           0 :                         unsigned long long test_var;
   25392           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25393           0 :                         if (PyErr_Occurred() != NULL) {
   25394           0 :                                 return -1;
   25395             :                         }
   25396           0 :                         if (test_var > uint_max) {
   25397           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25398             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25399           0 :                                 return -1;
   25400             :                         }
   25401           0 :                         object->num_sites = test_var;
   25402             :                 } else {
   25403           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25404             :                           PyLong_Type.tp_name);
   25405           0 :                         return -1;
   25406             :                 }
   25407             :         }
   25408           0 :         return 0;
   25409             : }
   25410             : 
   25411           0 : static PyObject *py_DcSitesCtr_get_sites(PyObject *obj, void *closure)
   25412             : {
   25413           0 :         struct DcSitesCtr *object = (struct DcSitesCtr *)pytalloc_get_ptr(obj);
   25414           0 :         PyObject *py_sites;
   25415           0 :         if (object->sites == NULL) {
   25416           0 :                 Py_RETURN_NONE;
   25417             :         }
   25418           0 :         if (object->sites == NULL) {
   25419           0 :                 py_sites = Py_None;
   25420           0 :                 Py_INCREF(py_sites);
   25421             :         } else {
   25422           0 :                 py_sites = PyList_New(object->num_sites);
   25423           0 :                 if (py_sites == NULL) {
   25424           0 :                         return NULL;
   25425             :                 }
   25426             :                 {
   25427             :                         int sites_cntr_1;
   25428           0 :                         for (sites_cntr_1 = 0; sites_cntr_1 < (object->num_sites); sites_cntr_1++) {
   25429           0 :                                 PyObject *py_sites_1;
   25430           0 :                                 py_sites_1 = pytalloc_reference_ex(lsa_String_Type, object->sites, &object->sites[sites_cntr_1]);
   25431           0 :                                 PyList_SetItem(py_sites, sites_cntr_1, py_sites_1);
   25432             :                         }
   25433             :                 }
   25434             :         }
   25435           0 :         return py_sites;
   25436             : }
   25437             : 
   25438           0 : static int py_DcSitesCtr_set_sites(PyObject *py_obj, PyObject *value, void *closure)
   25439             : {
   25440           0 :         struct DcSitesCtr *object = (struct DcSitesCtr *)pytalloc_get_ptr(py_obj);
   25441           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sites));
   25442           0 :         if (value == NULL) {
   25443           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sites");
   25444           0 :                 return -1;
   25445             :         }
   25446           0 :         if (value == Py_None) {
   25447           0 :                 object->sites = NULL;
   25448             :         } else {
   25449           0 :                 object->sites = NULL;
   25450           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25451             :                 {
   25452           0 :                         int sites_cntr_1;
   25453           0 :                         object->sites = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sites, PyList_GET_SIZE(value));
   25454           0 :                         if (!object->sites) { return -1; }
   25455           0 :                         talloc_set_name_const(object->sites, "ARRAY: object->sites");
   25456           0 :                         for (sites_cntr_1 = 0; sites_cntr_1 < PyList_GET_SIZE(value); sites_cntr_1++) {
   25457           0 :                                 if (PyList_GET_ITEM(value, sites_cntr_1) == NULL) {
   25458           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sites[sites_cntr_1]");
   25459           0 :                                         return -1;
   25460             :                                 }
   25461           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sites_cntr_1), return -1;);
   25462           0 :                                 if (talloc_reference(object->sites, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sites_cntr_1))) == NULL) {
   25463           0 :                                         PyErr_NoMemory();
   25464           0 :                                         return -1;
   25465             :                                 }
   25466           0 :                                 object->sites[sites_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sites_cntr_1));
   25467             :                         }
   25468             :                 }
   25469             :         }
   25470           0 :         return 0;
   25471             : }
   25472             : 
   25473             : static PyGetSetDef py_DcSitesCtr_getsetters[] = {
   25474             :         {
   25475             :                 .name = discard_const_p(char, "num_sites"),
   25476             :                 .get = py_DcSitesCtr_get_num_sites,
   25477             :                 .set = py_DcSitesCtr_set_num_sites,
   25478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25479             :         },
   25480             :         {
   25481             :                 .name = discard_const_p(char, "sites"),
   25482             :                 .get = py_DcSitesCtr_get_sites,
   25483             :                 .set = py_DcSitesCtr_set_sites,
   25484             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25485             :         },
   25486             :         { .name = NULL }
   25487             : };
   25488             : 
   25489           0 : static PyObject *py_DcSitesCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25490             : {
   25491           0 :         return pytalloc_new(struct DcSitesCtr, type);
   25492             : }
   25493             : 
   25494             : 
   25495             : static PyTypeObject DcSitesCtr_Type = {
   25496             :         PyVarObject_HEAD_INIT(NULL, 0)
   25497             :         .tp_name = "netlogon.DcSitesCtr",
   25498             :         .tp_getset = py_DcSitesCtr_getsetters,
   25499             :         .tp_methods = NULL,
   25500             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25501             :         .tp_new = py_DcSitesCtr_new,
   25502             : };
   25503             : 
   25504             : 
   25505           0 : static PyObject *py_netr_TrustInfo_get_count(PyObject *obj, void *closure)
   25506             : {
   25507           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(obj);
   25508           0 :         PyObject *py_count;
   25509           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   25510           0 :         return py_count;
   25511             : }
   25512             : 
   25513           0 : static int py_netr_TrustInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
   25514             : {
   25515           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(py_obj);
   25516           0 :         if (value == NULL) {
   25517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   25518           0 :                 return -1;
   25519             :         }
   25520             :         {
   25521           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   25522           0 :                 if (PyLong_Check(value)) {
   25523           0 :                         unsigned long long test_var;
   25524           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25525           0 :                         if (PyErr_Occurred() != NULL) {
   25526           0 :                                 return -1;
   25527             :                         }
   25528           0 :                         if (test_var > uint_max) {
   25529           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25530             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25531           0 :                                 return -1;
   25532             :                         }
   25533           0 :                         object->count = test_var;
   25534             :                 } else {
   25535           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25536             :                           PyLong_Type.tp_name);
   25537           0 :                         return -1;
   25538             :                 }
   25539             :         }
   25540           0 :         return 0;
   25541             : }
   25542             : 
   25543           0 : static PyObject *py_netr_TrustInfo_get_data(PyObject *obj, void *closure)
   25544             : {
   25545           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(obj);
   25546           0 :         PyObject *py_data;
   25547           0 :         if (object->data == NULL) {
   25548           0 :                 Py_RETURN_NONE;
   25549             :         }
   25550           0 :         if (object->data == NULL) {
   25551           0 :                 py_data = Py_None;
   25552           0 :                 Py_INCREF(py_data);
   25553             :         } else {
   25554           0 :                 py_data = PyList_New(object->count);
   25555           0 :                 if (py_data == NULL) {
   25556           0 :                         return NULL;
   25557             :                 }
   25558             :                 {
   25559             :                         int data_cntr_1;
   25560           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->count); data_cntr_1++) {
   25561           0 :                                 PyObject *py_data_1;
   25562           0 :                                 py_data_1 = PyLong_FromUnsignedLongLong((uint32_t)object->data[data_cntr_1]);
   25563           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
   25564             :                         }
   25565             :                 }
   25566             :         }
   25567           0 :         return py_data;
   25568             : }
   25569             : 
   25570           0 : static int py_netr_TrustInfo_set_data(PyObject *py_obj, PyObject *value, void *closure)
   25571             : {
   25572           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(py_obj);
   25573           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
   25574           0 :         if (value == NULL) {
   25575           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   25576           0 :                 return -1;
   25577             :         }
   25578           0 :         if (value == Py_None) {
   25579           0 :                 object->data = NULL;
   25580             :         } else {
   25581           0 :                 object->data = NULL;
   25582           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25583             :                 {
   25584           0 :                         int data_cntr_1;
   25585           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
   25586           0 :                         if (!object->data) { return -1; }
   25587           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
   25588           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
   25589           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
   25590           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
   25591           0 :                                         return -1;
   25592             :                                 }
   25593             :                                 {
   25594           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
   25595           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
   25596           0 :                                                 unsigned long long test_var;
   25597           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
   25598           0 :                                                 if (PyErr_Occurred() != NULL) {
   25599           0 :                                                         return -1;
   25600             :                                                 }
   25601           0 :                                                 if (test_var > uint_max) {
   25602           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25603             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   25604           0 :                                                         return -1;
   25605             :                                                 }
   25606           0 :                                                 object->data[data_cntr_1] = test_var;
   25607             :                                         } else {
   25608           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   25609             :                                                   PyLong_Type.tp_name);
   25610           0 :                                                 return -1;
   25611             :                                         }
   25612             :                                 }
   25613             :                         }
   25614             :                 }
   25615             :         }
   25616           0 :         return 0;
   25617             : }
   25618             : 
   25619           0 : static PyObject *py_netr_TrustInfo_get_entry_count(PyObject *obj, void *closure)
   25620             : {
   25621           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(obj);
   25622           0 :         PyObject *py_entry_count;
   25623           0 :         py_entry_count = PyLong_FromUnsignedLongLong((uint32_t)object->entry_count);
   25624           0 :         return py_entry_count;
   25625             : }
   25626             : 
   25627           0 : static int py_netr_TrustInfo_set_entry_count(PyObject *py_obj, PyObject *value, void *closure)
   25628             : {
   25629           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(py_obj);
   25630           0 :         if (value == NULL) {
   25631           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->entry_count");
   25632           0 :                 return -1;
   25633             :         }
   25634             :         {
   25635           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->entry_count));
   25636           0 :                 if (PyLong_Check(value)) {
   25637           0 :                         unsigned long long test_var;
   25638           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25639           0 :                         if (PyErr_Occurred() != NULL) {
   25640           0 :                                 return -1;
   25641             :                         }
   25642           0 :                         if (test_var > uint_max) {
   25643           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25644             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25645           0 :                                 return -1;
   25646             :                         }
   25647           0 :                         object->entry_count = test_var;
   25648             :                 } else {
   25649           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25650             :                           PyLong_Type.tp_name);
   25651           0 :                         return -1;
   25652             :                 }
   25653             :         }
   25654           0 :         return 0;
   25655             : }
   25656             : 
   25657           0 : static PyObject *py_netr_TrustInfo_get_entries(PyObject *obj, void *closure)
   25658             : {
   25659           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(obj);
   25660           0 :         PyObject *py_entries;
   25661           0 :         if (object->entries == NULL) {
   25662           0 :                 Py_RETURN_NONE;
   25663             :         }
   25664           0 :         if (object->entries == NULL) {
   25665           0 :                 py_entries = Py_None;
   25666           0 :                 Py_INCREF(py_entries);
   25667             :         } else {
   25668           0 :                 py_entries = PyList_New(object->count);
   25669           0 :                 if (py_entries == NULL) {
   25670           0 :                         return NULL;
   25671             :                 }
   25672             :                 {
   25673             :                         int entries_cntr_1;
   25674           0 :                         for (entries_cntr_1 = 0; entries_cntr_1 < (object->count); entries_cntr_1++) {
   25675           0 :                                 PyObject *py_entries_1;
   25676           0 :                                 py_entries_1 = pytalloc_reference_ex(lsa_String_Type, object->entries, &object->entries[entries_cntr_1]);
   25677           0 :                                 PyList_SetItem(py_entries, entries_cntr_1, py_entries_1);
   25678             :                         }
   25679             :                 }
   25680             :         }
   25681           0 :         return py_entries;
   25682             : }
   25683             : 
   25684           0 : static int py_netr_TrustInfo_set_entries(PyObject *py_obj, PyObject *value, void *closure)
   25685             : {
   25686           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(py_obj);
   25687           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->entries));
   25688           0 :         if (value == NULL) {
   25689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->entries");
   25690           0 :                 return -1;
   25691             :         }
   25692           0 :         if (value == Py_None) {
   25693           0 :                 object->entries = NULL;
   25694             :         } else {
   25695           0 :                 object->entries = NULL;
   25696           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25697             :                 {
   25698           0 :                         int entries_cntr_1;
   25699           0 :                         object->entries = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
   25700           0 :                         if (!object->entries) { return -1; }
   25701           0 :                         talloc_set_name_const(object->entries, "ARRAY: object->entries");
   25702           0 :                         for (entries_cntr_1 = 0; entries_cntr_1 < PyList_GET_SIZE(value); entries_cntr_1++) {
   25703           0 :                                 if (PyList_GET_ITEM(value, entries_cntr_1) == NULL) {
   25704           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->entries[entries_cntr_1]");
   25705           0 :                                         return -1;
   25706             :                                 }
   25707           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, entries_cntr_1), return -1;);
   25708           0 :                                 if (talloc_reference(object->entries, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_1))) == NULL) {
   25709           0 :                                         PyErr_NoMemory();
   25710           0 :                                         return -1;
   25711             :                                 }
   25712           0 :                                 object->entries[entries_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_1));
   25713             :                         }
   25714             :                 }
   25715             :         }
   25716           0 :         return 0;
   25717             : }
   25718             : 
   25719             : static PyGetSetDef py_netr_TrustInfo_getsetters[] = {
   25720             :         {
   25721             :                 .name = discard_const_p(char, "count"),
   25722             :                 .get = py_netr_TrustInfo_get_count,
   25723             :                 .set = py_netr_TrustInfo_set_count,
   25724             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25725             :         },
   25726             :         {
   25727             :                 .name = discard_const_p(char, "data"),
   25728             :                 .get = py_netr_TrustInfo_get_data,
   25729             :                 .set = py_netr_TrustInfo_set_data,
   25730             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25731             :         },
   25732             :         {
   25733             :                 .name = discard_const_p(char, "entry_count"),
   25734             :                 .get = py_netr_TrustInfo_get_entry_count,
   25735             :                 .set = py_netr_TrustInfo_set_entry_count,
   25736             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25737             :         },
   25738             :         {
   25739             :                 .name = discard_const_p(char, "entries"),
   25740             :                 .get = py_netr_TrustInfo_get_entries,
   25741             :                 .set = py_netr_TrustInfo_set_entries,
   25742             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25743             :         },
   25744             :         { .name = NULL }
   25745             : };
   25746             : 
   25747           0 : static PyObject *py_netr_TrustInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25748             : {
   25749           0 :         return pytalloc_new(struct netr_TrustInfo, type);
   25750             : }
   25751             : 
   25752             : 
   25753             : static PyTypeObject netr_TrustInfo_Type = {
   25754             :         PyVarObject_HEAD_INIT(NULL, 0)
   25755             :         .tp_name = "netlogon.netr_TrustInfo",
   25756             :         .tp_getset = py_netr_TrustInfo_getsetters,
   25757             :         .tp_methods = NULL,
   25758             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25759             :         .tp_new = py_netr_TrustInfo_new,
   25760             : };
   25761             : 
   25762             : 
   25763           0 : static PyObject *py_NL_DNS_NAME_INFO_get_type(PyObject *obj, void *closure)
   25764             : {
   25765           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25766           0 :         PyObject *py_type;
   25767           0 :         py_type = PyLong_FromLong((uint16_t)object->type);
   25768           0 :         return py_type;
   25769             : }
   25770             : 
   25771           5 : static int py_NL_DNS_NAME_INFO_set_type(PyObject *py_obj, PyObject *value, void *closure)
   25772             : {
   25773           5 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25774           5 :         if (value == NULL) {
   25775           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
   25776           0 :                 return -1;
   25777             :         }
   25778             :         {
   25779           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
   25780           5 :                 if (PyLong_Check(value)) {
   25781           0 :                         unsigned long long test_var;
   25782           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25783           5 :                         if (PyErr_Occurred() != NULL) {
   25784           0 :                                 return -1;
   25785             :                         }
   25786           5 :                         if (test_var > uint_max) {
   25787           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25788             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25789           0 :                                 return -1;
   25790             :                         }
   25791           5 :                         object->type = test_var;
   25792             :                 } else {
   25793           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25794             :                           PyLong_Type.tp_name);
   25795           0 :                         return -1;
   25796             :                 }
   25797             :         }
   25798           5 :         return 0;
   25799             : }
   25800             : 
   25801           0 : static PyObject *py_NL_DNS_NAME_INFO_get_dns_domain_info(PyObject *obj, void *closure)
   25802             : {
   25803           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25804           0 :         PyObject *py_dns_domain_info;
   25805           0 :         if (object->dns_domain_info == NULL) {
   25806           0 :                 Py_RETURN_NONE;
   25807             :         }
   25808           0 :         if (object->dns_domain_info == NULL) {
   25809           0 :                 py_dns_domain_info = Py_None;
   25810           0 :                 Py_INCREF(py_dns_domain_info);
   25811             :         } else {
   25812           0 :                 if (object->dns_domain_info == NULL) {
   25813           0 :                         py_dns_domain_info = Py_None;
   25814           0 :                         Py_INCREF(py_dns_domain_info);
   25815             :                 } else {
   25816           0 :                         py_dns_domain_info = PyUnicode_Decode(object->dns_domain_info, strlen(object->dns_domain_info), "utf-8", "ignore");
   25817             :                 }
   25818             :         }
   25819           0 :         return py_dns_domain_info;
   25820             : }
   25821             : 
   25822           0 : static int py_NL_DNS_NAME_INFO_set_dns_domain_info(PyObject *py_obj, PyObject *value, void *closure)
   25823             : {
   25824           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25825           0 :         if (value == NULL) {
   25826           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domain_info");
   25827           0 :                 return -1;
   25828             :         }
   25829           0 :         if (value == Py_None) {
   25830           0 :                 object->dns_domain_info = NULL;
   25831             :         } else {
   25832           0 :                 object->dns_domain_info = NULL;
   25833             :                 {
   25834           0 :                         const char *test_str;
   25835           0 :                         const char *talloc_str;
   25836           0 :                         PyObject *unicode = NULL;
   25837           0 :                         if (PyUnicode_Check(value)) {
   25838           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25839           0 :                                 if (unicode == NULL) {
   25840           0 :                                         PyErr_NoMemory();
   25841           0 :                                         return -1;
   25842             :                                 }
   25843           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   25844           0 :                         } else if (PyBytes_Check(value)) {
   25845           0 :                                 test_str = PyBytes_AS_STRING(value);
   25846             :                         } else {
   25847           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25848           0 :                                 return -1;
   25849             :                         }
   25850           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25851           0 :                         if (unicode != NULL) {
   25852           0 :                                 Py_DECREF(unicode);
   25853             :                         }
   25854           0 :                         if (talloc_str == NULL) {
   25855           0 :                                 PyErr_NoMemory();
   25856           0 :                                 return -1;
   25857             :                         }
   25858           0 :                         object->dns_domain_info = talloc_str;
   25859             :                 }
   25860             :         }
   25861           0 :         return 0;
   25862             : }
   25863             : 
   25864           0 : static PyObject *py_NL_DNS_NAME_INFO_get_dns_domain_info_type(PyObject *obj, void *closure)
   25865             : {
   25866           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25867           0 :         PyObject *py_dns_domain_info_type;
   25868           0 :         py_dns_domain_info_type = PyLong_FromLong((uint16_t)object->dns_domain_info_type);
   25869           0 :         return py_dns_domain_info_type;
   25870             : }
   25871             : 
   25872           5 : static int py_NL_DNS_NAME_INFO_set_dns_domain_info_type(PyObject *py_obj, PyObject *value, void *closure)
   25873             : {
   25874           5 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25875           5 :         if (value == NULL) {
   25876           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domain_info_type");
   25877           0 :                 return -1;
   25878             :         }
   25879             :         {
   25880           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dns_domain_info_type));
   25881           5 :                 if (PyLong_Check(value)) {
   25882           0 :                         unsigned long long test_var;
   25883           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25884           5 :                         if (PyErr_Occurred() != NULL) {
   25885           0 :                                 return -1;
   25886             :                         }
   25887           5 :                         if (test_var > uint_max) {
   25888           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25889             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25890           0 :                                 return -1;
   25891             :                         }
   25892           5 :                         object->dns_domain_info_type = test_var;
   25893             :                 } else {
   25894           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25895             :                           PyLong_Type.tp_name);
   25896           0 :                         return -1;
   25897             :                 }
   25898             :         }
   25899           5 :         return 0;
   25900             : }
   25901             : 
   25902           0 : static PyObject *py_NL_DNS_NAME_INFO_get_priority(PyObject *obj, void *closure)
   25903             : {
   25904           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25905           0 :         PyObject *py_priority;
   25906           0 :         py_priority = PyLong_FromUnsignedLongLong((uint32_t)object->priority);
   25907           0 :         return py_priority;
   25908             : }
   25909             : 
   25910           5 : static int py_NL_DNS_NAME_INFO_set_priority(PyObject *py_obj, PyObject *value, void *closure)
   25911             : {
   25912           5 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25913           5 :         if (value == NULL) {
   25914           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->priority");
   25915           0 :                 return -1;
   25916             :         }
   25917             :         {
   25918           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
   25919           5 :                 if (PyLong_Check(value)) {
   25920           0 :                         unsigned long long test_var;
   25921           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25922           5 :                         if (PyErr_Occurred() != NULL) {
   25923           0 :                                 return -1;
   25924             :                         }
   25925           5 :                         if (test_var > uint_max) {
   25926           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25927             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25928           0 :                                 return -1;
   25929             :                         }
   25930           5 :                         object->priority = test_var;
   25931             :                 } else {
   25932           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25933             :                           PyLong_Type.tp_name);
   25934           0 :                         return -1;
   25935             :                 }
   25936             :         }
   25937           5 :         return 0;
   25938             : }
   25939             : 
   25940           0 : static PyObject *py_NL_DNS_NAME_INFO_get_weight(PyObject *obj, void *closure)
   25941             : {
   25942           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25943           0 :         PyObject *py_weight;
   25944           0 :         py_weight = PyLong_FromUnsignedLongLong((uint32_t)object->weight);
   25945           0 :         return py_weight;
   25946             : }
   25947             : 
   25948           5 : static int py_NL_DNS_NAME_INFO_set_weight(PyObject *py_obj, PyObject *value, void *closure)
   25949             : {
   25950           5 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25951           5 :         if (value == NULL) {
   25952           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->weight");
   25953           0 :                 return -1;
   25954             :         }
   25955             :         {
   25956           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->weight));
   25957           5 :                 if (PyLong_Check(value)) {
   25958           0 :                         unsigned long long test_var;
   25959           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25960           5 :                         if (PyErr_Occurred() != NULL) {
   25961           0 :                                 return -1;
   25962             :                         }
   25963           5 :                         if (test_var > uint_max) {
   25964           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25965             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25966           0 :                                 return -1;
   25967             :                         }
   25968           5 :                         object->weight = test_var;
   25969             :                 } else {
   25970           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25971             :                           PyLong_Type.tp_name);
   25972           0 :                         return -1;
   25973             :                 }
   25974             :         }
   25975           5 :         return 0;
   25976             : }
   25977             : 
   25978           0 : static PyObject *py_NL_DNS_NAME_INFO_get_port(PyObject *obj, void *closure)
   25979             : {
   25980           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25981           0 :         PyObject *py_port;
   25982           0 :         py_port = PyLong_FromUnsignedLongLong((uint32_t)object->port);
   25983           0 :         return py_port;
   25984             : }
   25985             : 
   25986           4 : static int py_NL_DNS_NAME_INFO_set_port(PyObject *py_obj, PyObject *value, void *closure)
   25987             : {
   25988           4 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25989           4 :         if (value == NULL) {
   25990           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->port");
   25991           0 :                 return -1;
   25992             :         }
   25993             :         {
   25994           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->port));
   25995           4 :                 if (PyLong_Check(value)) {
   25996           0 :                         unsigned long long test_var;
   25997           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25998           4 :                         if (PyErr_Occurred() != NULL) {
   25999           0 :                                 return -1;
   26000             :                         }
   26001           4 :                         if (test_var > uint_max) {
   26002           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26003             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26004           0 :                                 return -1;
   26005             :                         }
   26006           4 :                         object->port = test_var;
   26007             :                 } else {
   26008           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26009             :                           PyLong_Type.tp_name);
   26010           0 :                         return -1;
   26011             :                 }
   26012             :         }
   26013           4 :         return 0;
   26014             : }
   26015             : 
   26016           0 : static PyObject *py_NL_DNS_NAME_INFO_get_dns_register(PyObject *obj, void *closure)
   26017             : {
   26018           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   26019           0 :         PyObject *py_dns_register;
   26020           0 :         py_dns_register = PyLong_FromUnsignedLongLong((uint32_t)object->dns_register);
   26021           0 :         return py_dns_register;
   26022             : }
   26023             : 
   26024           5 : static int py_NL_DNS_NAME_INFO_set_dns_register(PyObject *py_obj, PyObject *value, void *closure)
   26025             : {
   26026           5 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   26027           5 :         if (value == NULL) {
   26028           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_register");
   26029           0 :                 return -1;
   26030             :         }
   26031             :         {
   26032           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dns_register));
   26033           5 :                 if (PyLong_Check(value)) {
   26034           0 :                         unsigned long long test_var;
   26035           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26036           5 :                         if (PyErr_Occurred() != NULL) {
   26037           0 :                                 return -1;
   26038             :                         }
   26039           5 :                         if (test_var > uint_max) {
   26040           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26041             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26042           0 :                                 return -1;
   26043             :                         }
   26044           5 :                         object->dns_register = test_var;
   26045             :                 } else {
   26046           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26047             :                           PyLong_Type.tp_name);
   26048           0 :                         return -1;
   26049             :                 }
   26050             :         }
   26051           5 :         return 0;
   26052             : }
   26053             : 
   26054           5 : static PyObject *py_NL_DNS_NAME_INFO_get_status(PyObject *obj, void *closure)
   26055             : {
   26056           5 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   26057           0 :         PyObject *py_status;
   26058           5 :         py_status = PyLong_FromUnsignedLongLong((uint32_t)object->status);
   26059           5 :         return py_status;
   26060             : }
   26061             : 
   26062           0 : static int py_NL_DNS_NAME_INFO_set_status(PyObject *py_obj, PyObject *value, void *closure)
   26063             : {
   26064           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   26065           0 :         if (value == NULL) {
   26066           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
   26067           0 :                 return -1;
   26068             :         }
   26069             :         {
   26070           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
   26071           0 :                 if (PyLong_Check(value)) {
   26072           0 :                         unsigned long long test_var;
   26073           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26074           0 :                         if (PyErr_Occurred() != NULL) {
   26075           0 :                                 return -1;
   26076             :                         }
   26077           0 :                         if (test_var > uint_max) {
   26078           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26079             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26080           0 :                                 return -1;
   26081             :                         }
   26082           0 :                         object->status = test_var;
   26083             :                 } else {
   26084           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26085             :                           PyLong_Type.tp_name);
   26086           0 :                         return -1;
   26087             :                 }
   26088             :         }
   26089           0 :         return 0;
   26090             : }
   26091             : 
   26092             : static PyGetSetDef py_NL_DNS_NAME_INFO_getsetters[] = {
   26093             :         {
   26094             :                 .name = discard_const_p(char, "type"),
   26095             :                 .get = py_NL_DNS_NAME_INFO_get_type,
   26096             :                 .set = py_NL_DNS_NAME_INFO_set_type,
   26097             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DnsType")
   26098             :         },
   26099             :         {
   26100             :                 .name = discard_const_p(char, "dns_domain_info"),
   26101             :                 .get = py_NL_DNS_NAME_INFO_get_dns_domain_info,
   26102             :                 .set = py_NL_DNS_NAME_INFO_set_dns_domain_info,
   26103             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26104             :         },
   26105             :         {
   26106             :                 .name = discard_const_p(char, "dns_domain_info_type"),
   26107             :                 .get = py_NL_DNS_NAME_INFO_get_dns_domain_info_type,
   26108             :                 .set = py_NL_DNS_NAME_INFO_set_dns_domain_info_type,
   26109             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DnsDomainInfoType")
   26110             :         },
   26111             :         {
   26112             :                 .name = discard_const_p(char, "priority"),
   26113             :                 .get = py_NL_DNS_NAME_INFO_get_priority,
   26114             :                 .set = py_NL_DNS_NAME_INFO_set_priority,
   26115             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26116             :         },
   26117             :         {
   26118             :                 .name = discard_const_p(char, "weight"),
   26119             :                 .get = py_NL_DNS_NAME_INFO_get_weight,
   26120             :                 .set = py_NL_DNS_NAME_INFO_set_weight,
   26121             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26122             :         },
   26123             :         {
   26124             :                 .name = discard_const_p(char, "port"),
   26125             :                 .get = py_NL_DNS_NAME_INFO_get_port,
   26126             :                 .set = py_NL_DNS_NAME_INFO_set_port,
   26127             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26128             :         },
   26129             :         {
   26130             :                 .name = discard_const_p(char, "dns_register"),
   26131             :                 .get = py_NL_DNS_NAME_INFO_get_dns_register,
   26132             :                 .set = py_NL_DNS_NAME_INFO_set_dns_register,
   26133             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26134             :         },
   26135             :         {
   26136             :                 .name = discard_const_p(char, "status"),
   26137             :                 .get = py_NL_DNS_NAME_INFO_get_status,
   26138             :                 .set = py_NL_DNS_NAME_INFO_set_status,
   26139             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26140             :         },
   26141             :         { .name = NULL }
   26142             : };
   26143             : 
   26144           5 : static PyObject *py_NL_DNS_NAME_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26145             : {
   26146           5 :         return pytalloc_new(struct NL_DNS_NAME_INFO, type);
   26147             : }
   26148             : 
   26149             : 
   26150             : static PyTypeObject NL_DNS_NAME_INFO_Type = {
   26151             :         PyVarObject_HEAD_INIT(NULL, 0)
   26152             :         .tp_name = "netlogon.NL_DNS_NAME_INFO",
   26153             :         .tp_getset = py_NL_DNS_NAME_INFO_getsetters,
   26154             :         .tp_methods = NULL,
   26155             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26156             :         .tp_new = py_NL_DNS_NAME_INFO_new,
   26157             : };
   26158             : 
   26159             : 
   26160           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_get_count(PyObject *obj, void *closure)
   26161             : {
   26162           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(obj);
   26163           0 :         PyObject *py_count;
   26164           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   26165           0 :         return py_count;
   26166             : }
   26167             : 
   26168           5 : static int py_NL_DNS_NAME_INFO_ARRAY_set_count(PyObject *py_obj, PyObject *value, void *closure)
   26169             : {
   26170           5 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   26171           5 :         if (value == NULL) {
   26172           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   26173           0 :                 return -1;
   26174             :         }
   26175             :         {
   26176           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   26177           5 :                 if (PyLong_Check(value)) {
   26178           0 :                         unsigned long long test_var;
   26179           5 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26180           5 :                         if (PyErr_Occurred() != NULL) {
   26181           0 :                                 return -1;
   26182             :                         }
   26183           5 :                         if (test_var > uint_max) {
   26184           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26185             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26186           0 :                                 return -1;
   26187             :                         }
   26188           5 :                         object->count = test_var;
   26189             :                 } else {
   26190           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26191             :                           PyLong_Type.tp_name);
   26192           0 :                         return -1;
   26193             :                 }
   26194             :         }
   26195           5 :         return 0;
   26196             : }
   26197             : 
   26198           5 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_get_names(PyObject *obj, void *closure)
   26199             : {
   26200           5 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(obj);
   26201           0 :         PyObject *py_names;
   26202           5 :         if (object->names == NULL) {
   26203           0 :                 Py_RETURN_NONE;
   26204             :         }
   26205           5 :         if (object->names == NULL) {
   26206           0 :                 py_names = Py_None;
   26207           0 :                 Py_INCREF(py_names);
   26208             :         } else {
   26209           5 :                 py_names = PyList_New(object->count);
   26210           5 :                 if (py_names == NULL) {
   26211           0 :                         return NULL;
   26212             :                 }
   26213             :                 {
   26214             :                         int names_cntr_1;
   26215          10 :                         for (names_cntr_1 = 0; names_cntr_1 < (object->count); names_cntr_1++) {
   26216           0 :                                 PyObject *py_names_1;
   26217           5 :                                 py_names_1 = pytalloc_reference_ex(&NL_DNS_NAME_INFO_Type, object->names, &object->names[names_cntr_1]);
   26218           5 :                                 PyList_SetItem(py_names, names_cntr_1, py_names_1);
   26219             :                         }
   26220             :                 }
   26221             :         }
   26222           5 :         return py_names;
   26223             : }
   26224             : 
   26225           5 : static int py_NL_DNS_NAME_INFO_ARRAY_set_names(PyObject *py_obj, PyObject *value, void *closure)
   26226             : {
   26227           5 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   26228           5 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->names));
   26229           5 :         if (value == NULL) {
   26230           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->names");
   26231           0 :                 return -1;
   26232             :         }
   26233           5 :         if (value == Py_None) {
   26234           0 :                 object->names = NULL;
   26235             :         } else {
   26236           5 :                 object->names = NULL;
   26237           5 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   26238             :                 {
   26239           0 :                         int names_cntr_1;
   26240           5 :                         object->names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->names, PyList_GET_SIZE(value));
   26241           5 :                         if (!object->names) { return -1; }
   26242           5 :                         talloc_set_name_const(object->names, "ARRAY: object->names");
   26243          10 :                         for (names_cntr_1 = 0; names_cntr_1 < PyList_GET_SIZE(value); names_cntr_1++) {
   26244           5 :                                 if (PyList_GET_ITEM(value, names_cntr_1) == NULL) {
   26245           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->names[names_cntr_1]");
   26246           0 :                                         return -1;
   26247             :                                 }
   26248           5 :                                 PY_CHECK_TYPE(&NL_DNS_NAME_INFO_Type, PyList_GET_ITEM(value, names_cntr_1), return -1;);
   26249           5 :                                 if (talloc_reference(object->names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, names_cntr_1))) == NULL) {
   26250           0 :                                         PyErr_NoMemory();
   26251           0 :                                         return -1;
   26252             :                                 }
   26253           5 :                                 object->names[names_cntr_1] = *(struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(PyList_GET_ITEM(value, names_cntr_1));
   26254             :                         }
   26255             :                 }
   26256             :         }
   26257           5 :         return 0;
   26258             : }
   26259             : 
   26260             : static PyGetSetDef py_NL_DNS_NAME_INFO_ARRAY_getsetters[] = {
   26261             :         {
   26262             :                 .name = discard_const_p(char, "count"),
   26263             :                 .get = py_NL_DNS_NAME_INFO_ARRAY_get_count,
   26264             :                 .set = py_NL_DNS_NAME_INFO_ARRAY_set_count,
   26265             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26266             :         },
   26267             :         {
   26268             :                 .name = discard_const_p(char, "names"),
   26269             :                 .get = py_NL_DNS_NAME_INFO_ARRAY_get_names,
   26270             :                 .set = py_NL_DNS_NAME_INFO_ARRAY_set_names,
   26271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO")
   26272             :         },
   26273             :         { .name = NULL }
   26274             : };
   26275             : 
   26276           5 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26277             : {
   26278           5 :         return pytalloc_new(struct NL_DNS_NAME_INFO_ARRAY, type);
   26279             : }
   26280             : 
   26281           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   26282             : {
   26283           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   26284           0 :         PyObject *ret = NULL;
   26285           0 :         DATA_BLOB blob;
   26286           0 :         enum ndr_err_code err;
   26287           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   26288           0 :         if (tmp_ctx == NULL) {
   26289           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   26290           0 :                 return NULL;
   26291             :         }
   26292           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_NL_DNS_NAME_INFO_ARRAY);
   26293           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26294           0 :                 TALLOC_FREE(tmp_ctx);
   26295           0 :                 PyErr_SetNdrError(err);
   26296           0 :                 return NULL;
   26297             :         }
   26298             : 
   26299           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   26300           0 :         TALLOC_FREE(tmp_ctx);
   26301           0 :         return ret;
   26302             : }
   26303             : 
   26304           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26305             : {
   26306           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   26307           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   26308           0 :         Py_ssize_t blob_length = 0;
   26309           0 :         enum ndr_err_code err;
   26310           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   26311           0 :         PyObject *allow_remaining_obj = NULL;
   26312           0 :         bool allow_remaining = false;
   26313             : 
   26314           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   26315             :                 discard_const_p(char *, kwnames),
   26316             :                 &blob.data, &blob_length,
   26317             :                 &allow_remaining_obj)) {
   26318           0 :                 return NULL;
   26319             :         }
   26320           0 :         blob.length = blob_length;
   26321             : 
   26322           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   26323           0 :                 allow_remaining = true;
   26324             :         }
   26325             : 
   26326           0 :         if (allow_remaining) {
   26327           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_NL_DNS_NAME_INFO_ARRAY);
   26328             :         } else {
   26329           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_NL_DNS_NAME_INFO_ARRAY);
   26330             :         }
   26331           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26332           0 :                 PyErr_SetNdrError(err);
   26333           0 :                 return NULL;
   26334             :         }
   26335             : 
   26336           0 :         Py_RETURN_NONE;
   26337             : }
   26338             : 
   26339           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   26340             : {
   26341           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   26342           0 :         PyObject *ret;
   26343           0 :         char *retstr;
   26344             : 
   26345           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_NL_DNS_NAME_INFO_ARRAY, "NL_DNS_NAME_INFO_ARRAY", object);
   26346           0 :         ret = PyUnicode_FromString(retstr);
   26347           0 :         talloc_free(retstr);
   26348             : 
   26349           0 :         return ret;
   26350             : }
   26351             : 
   26352             : static PyMethodDef py_NL_DNS_NAME_INFO_ARRAY_methods[] = {
   26353             :         { "__ndr_pack__", (PyCFunction)py_NL_DNS_NAME_INFO_ARRAY_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   26354             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_NL_DNS_NAME_INFO_ARRAY_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   26355             :         { "__ndr_print__", (PyCFunction)py_NL_DNS_NAME_INFO_ARRAY_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   26356             :         { NULL, NULL, 0, NULL }
   26357             : };
   26358             : 
   26359             : 
   26360             : static PyTypeObject NL_DNS_NAME_INFO_ARRAY_Type = {
   26361             :         PyVarObject_HEAD_INIT(NULL, 0)
   26362             :         .tp_name = "netlogon.NL_DNS_NAME_INFO_ARRAY",
   26363             :         .tp_getset = py_NL_DNS_NAME_INFO_ARRAY_getsetters,
   26364             :         .tp_methods = py_NL_DNS_NAME_INFO_ARRAY_methods,
   26365             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26366             :         .tp_new = py_NL_DNS_NAME_INFO_ARRAY_new,
   26367             : };
   26368             : 
   26369             : 
   26370             : 
   26371           0 : static PyObject *py_netr_LogonUasLogon_in_get_server_name(PyObject *obj, void *closure)
   26372             : {
   26373           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26374           0 :         PyObject *py_server_name;
   26375           0 :         if (object->in.server_name == NULL) {
   26376           0 :                 Py_RETURN_NONE;
   26377             :         }
   26378           0 :         if (object->in.server_name == NULL) {
   26379           0 :                 py_server_name = Py_None;
   26380           0 :                 Py_INCREF(py_server_name);
   26381             :         } else {
   26382           0 :                 if (object->in.server_name == NULL) {
   26383           0 :                         py_server_name = Py_None;
   26384           0 :                         Py_INCREF(py_server_name);
   26385             :                 } else {
   26386           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   26387             :                 }
   26388             :         }
   26389           0 :         return py_server_name;
   26390             : }
   26391             : 
   26392           0 : static int py_netr_LogonUasLogon_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   26393             : {
   26394           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26395           0 :         if (value == NULL) {
   26396           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   26397           0 :                 return -1;
   26398             :         }
   26399           0 :         if (value == Py_None) {
   26400           0 :                 object->in.server_name = NULL;
   26401             :         } else {
   26402           0 :                 object->in.server_name = NULL;
   26403             :                 {
   26404           0 :                         const char *test_str;
   26405           0 :                         const char *talloc_str;
   26406           0 :                         PyObject *unicode = NULL;
   26407           0 :                         if (PyUnicode_Check(value)) {
   26408           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26409           0 :                                 if (unicode == NULL) {
   26410           0 :                                         PyErr_NoMemory();
   26411           0 :                                         return -1;
   26412             :                                 }
   26413           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26414           0 :                         } else if (PyBytes_Check(value)) {
   26415           0 :                                 test_str = PyBytes_AS_STRING(value);
   26416             :                         } else {
   26417           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26418           0 :                                 return -1;
   26419             :                         }
   26420           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26421           0 :                         if (unicode != NULL) {
   26422           0 :                                 Py_DECREF(unicode);
   26423             :                         }
   26424           0 :                         if (talloc_str == NULL) {
   26425           0 :                                 PyErr_NoMemory();
   26426           0 :                                 return -1;
   26427             :                         }
   26428           0 :                         object->in.server_name = talloc_str;
   26429             :                 }
   26430             :         }
   26431           0 :         return 0;
   26432             : }
   26433             : 
   26434           0 : static PyObject *py_netr_LogonUasLogon_in_get_account_name(PyObject *obj, void *closure)
   26435             : {
   26436           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26437           0 :         PyObject *py_account_name;
   26438           0 :         if (object->in.account_name == NULL) {
   26439           0 :                 Py_RETURN_NONE;
   26440             :         }
   26441           0 :         if (object->in.account_name == NULL) {
   26442           0 :                 py_account_name = Py_None;
   26443           0 :                 Py_INCREF(py_account_name);
   26444             :         } else {
   26445           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   26446             :         }
   26447           0 :         return py_account_name;
   26448             : }
   26449             : 
   26450           0 : static int py_netr_LogonUasLogon_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   26451             : {
   26452           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26453           0 :         if (value == NULL) {
   26454           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   26455           0 :                 return -1;
   26456             :         }
   26457           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   26458           0 :         if (object->in.account_name == NULL) {
   26459           0 :                 PyErr_NoMemory();
   26460           0 :                 return -1;
   26461             :         }
   26462             :         {
   26463           0 :                 const char *test_str;
   26464           0 :                 const char *talloc_str;
   26465           0 :                 PyObject *unicode = NULL;
   26466           0 :                 if (PyUnicode_Check(value)) {
   26467           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26468           0 :                         if (unicode == NULL) {
   26469           0 :                                 PyErr_NoMemory();
   26470           0 :                                 return -1;
   26471             :                         }
   26472           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26473           0 :                 } else if (PyBytes_Check(value)) {
   26474           0 :                         test_str = PyBytes_AS_STRING(value);
   26475             :                 } else {
   26476           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26477           0 :                         return -1;
   26478             :                 }
   26479           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26480           0 :                 if (unicode != NULL) {
   26481           0 :                         Py_DECREF(unicode);
   26482             :                 }
   26483           0 :                 if (talloc_str == NULL) {
   26484           0 :                         PyErr_NoMemory();
   26485           0 :                         return -1;
   26486             :                 }
   26487           0 :                 object->in.account_name = talloc_str;
   26488             :         }
   26489           0 :         return 0;
   26490             : }
   26491             : 
   26492           0 : static PyObject *py_netr_LogonUasLogon_in_get_workstation(PyObject *obj, void *closure)
   26493             : {
   26494           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26495           0 :         PyObject *py_workstation;
   26496           0 :         if (object->in.workstation == NULL) {
   26497           0 :                 Py_RETURN_NONE;
   26498             :         }
   26499           0 :         if (object->in.workstation == NULL) {
   26500           0 :                 py_workstation = Py_None;
   26501           0 :                 Py_INCREF(py_workstation);
   26502             :         } else {
   26503           0 :                 py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
   26504             :         }
   26505           0 :         return py_workstation;
   26506             : }
   26507             : 
   26508           0 : static int py_netr_LogonUasLogon_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
   26509             : {
   26510           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26511           0 :         if (value == NULL) {
   26512           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.workstation");
   26513           0 :                 return -1;
   26514             :         }
   26515           0 :         object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
   26516           0 :         if (object->in.workstation == NULL) {
   26517           0 :                 PyErr_NoMemory();
   26518           0 :                 return -1;
   26519             :         }
   26520             :         {
   26521           0 :                 const char *test_str;
   26522           0 :                 const char *talloc_str;
   26523           0 :                 PyObject *unicode = NULL;
   26524           0 :                 if (PyUnicode_Check(value)) {
   26525           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26526           0 :                         if (unicode == NULL) {
   26527           0 :                                 PyErr_NoMemory();
   26528           0 :                                 return -1;
   26529             :                         }
   26530           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26531           0 :                 } else if (PyBytes_Check(value)) {
   26532           0 :                         test_str = PyBytes_AS_STRING(value);
   26533             :                 } else {
   26534           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26535           0 :                         return -1;
   26536             :                 }
   26537           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26538           0 :                 if (unicode != NULL) {
   26539           0 :                         Py_DECREF(unicode);
   26540             :                 }
   26541           0 :                 if (talloc_str == NULL) {
   26542           0 :                         PyErr_NoMemory();
   26543           0 :                         return -1;
   26544             :                 }
   26545           0 :                 object->in.workstation = talloc_str;
   26546             :         }
   26547           0 :         return 0;
   26548             : }
   26549             : 
   26550           0 : static PyObject *py_netr_LogonUasLogon_out_get_info(PyObject *obj, void *closure)
   26551             : {
   26552           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26553           0 :         PyObject *py_info;
   26554           0 :         if (object->out.info == NULL) {
   26555           0 :                 Py_RETURN_NONE;
   26556             :         }
   26557           0 :         if (*object->out.info == NULL) {
   26558           0 :                 py_info = Py_None;
   26559           0 :                 Py_INCREF(py_info);
   26560             :         } else {
   26561           0 :                 py_info = pytalloc_reference_ex(&netr_UasInfo_Type, *object->out.info, *object->out.info);
   26562             :         }
   26563           0 :         return py_info;
   26564             : }
   26565             : 
   26566           0 : static int py_netr_LogonUasLogon_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   26567             : {
   26568           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26569           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   26570           0 :         if (value == NULL) {
   26571           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   26572           0 :                 return -1;
   26573             :         }
   26574           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   26575           0 :         if (object->out.info == NULL) {
   26576           0 :                 PyErr_NoMemory();
   26577           0 :                 return -1;
   26578             :         }
   26579           0 :         if (value == Py_None) {
   26580           0 :                 *object->out.info = NULL;
   26581             :         } else {
   26582           0 :                 *object->out.info = NULL;
   26583           0 :                 PY_CHECK_TYPE(&netr_UasInfo_Type, value, return -1;);
   26584           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   26585           0 :                         PyErr_NoMemory();
   26586           0 :                         return -1;
   26587             :                 }
   26588           0 :                 *object->out.info = (struct netr_UasInfo *)pytalloc_get_ptr(value);
   26589             :         }
   26590           0 :         return 0;
   26591             : }
   26592             : 
   26593           0 : static PyObject *py_netr_LogonUasLogon_get_result(PyObject *obj, void *closure)
   26594             : {
   26595           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26596           0 :         PyObject *py_result;
   26597           0 :         py_result = PyErr_FromWERROR(object->out.result);
   26598           0 :         return py_result;
   26599             : }
   26600             : 
   26601           0 : static int py_netr_LogonUasLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
   26602             : {
   26603           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26604           0 :         if (value == NULL) {
   26605           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   26606           0 :                 return -1;
   26607             :         }
   26608           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   26609           0 :         return 0;
   26610             : }
   26611             : 
   26612             : static PyGetSetDef py_netr_LogonUasLogon_getsetters[] = {
   26613             :         {
   26614             :                 .name = discard_const_p(char, "in_server_name"),
   26615             :                 .get = py_netr_LogonUasLogon_in_get_server_name,
   26616             :                 .set = py_netr_LogonUasLogon_in_set_server_name,
   26617             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26618             :         },
   26619             :         {
   26620             :                 .name = discard_const_p(char, "in_account_name"),
   26621             :                 .get = py_netr_LogonUasLogon_in_get_account_name,
   26622             :                 .set = py_netr_LogonUasLogon_in_set_account_name,
   26623             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26624             :         },
   26625             :         {
   26626             :                 .name = discard_const_p(char, "in_workstation"),
   26627             :                 .get = py_netr_LogonUasLogon_in_get_workstation,
   26628             :                 .set = py_netr_LogonUasLogon_in_set_workstation,
   26629             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26630             :         },
   26631             :         {
   26632             :                 .name = discard_const_p(char, "out_info"),
   26633             :                 .get = py_netr_LogonUasLogon_out_get_info,
   26634             :                 .set = py_netr_LogonUasLogon_out_set_info,
   26635             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UasInfo")
   26636             :         },
   26637             :         {
   26638             :                 .name = discard_const_p(char, "result"),
   26639             :                 .get = py_netr_LogonUasLogon_get_result,
   26640             :                 .set = py_netr_LogonUasLogon_set_result,
   26641             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   26642             :         },
   26643             :         { .name = NULL }
   26644             : };
   26645             : 
   26646           0 : static PyObject *py_netr_LogonUasLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26647             : {
   26648           0 :         PyObject *self = pytalloc_new(struct netr_LogonUasLogon, type);
   26649           0 :         struct netr_LogonUasLogon *_self = (struct netr_LogonUasLogon *)pytalloc_get_ptr(self);
   26650           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   26651             :         /* a pointer to a NULL pointer */
   26652           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_UasInfo *);
   26653           0 :         return self;
   26654             : }
   26655             : 
   26656           0 : static PyObject *py_netr_LogonUasLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   26657             : {
   26658             : 
   26659             : 
   26660           0 :         return PyLong_FromLong(0);
   26661             : }
   26662             : 
   26663           0 : static PyObject *py_netr_LogonUasLogon_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   26664             : {
   26665           0 :         const struct ndr_interface_call *call = NULL;
   26666           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26667           0 :         PyObject *ret = NULL;
   26668           0 :         struct ndr_push *push = NULL;
   26669           0 :         DATA_BLOB blob;
   26670           0 :         enum ndr_err_code err;
   26671             : 
   26672           0 :         if (ndr_table_netlogon.num_calls < 1) {
   26673           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_pack");
   26674           0 :                 return NULL;
   26675             :         }
   26676           0 :         call = &ndr_table_netlogon.calls[0];
   26677             : 
   26678           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   26679           0 :         if (push == NULL) {
   26680           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   26681           0 :                 return NULL;
   26682             :         }
   26683             : 
   26684           0 :         push->flags |= ndr_push_flags;
   26685             : 
   26686           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   26687           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26688           0 :                 TALLOC_FREE(push);
   26689           0 :                 PyErr_SetNdrError(err);
   26690           0 :                 return NULL;
   26691             :         }
   26692           0 :         blob = ndr_push_blob(push);
   26693           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   26694           0 :         TALLOC_FREE(push);
   26695           0 :         return ret;
   26696             : }
   26697             : 
   26698           0 : static PyObject *py_netr_LogonUasLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26699             : {
   26700           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   26701           0 :         PyObject *bigendian_obj = NULL;
   26702           0 :         PyObject *ndr64_obj = NULL;
   26703           0 :         libndr_flags ndr_push_flags = 0;
   26704             : 
   26705           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   26706             :                 discard_const_p(char *, kwnames),
   26707             :                 &bigendian_obj,
   26708             :                 &ndr64_obj)) {
   26709           0 :                 return NULL;
   26710             :         }
   26711             : 
   26712           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26713           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   26714             :         }
   26715           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26716           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   26717             :         }
   26718             : 
   26719           0 :         return py_netr_LogonUasLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   26720             : }
   26721             : 
   26722           0 : static PyObject *py_netr_LogonUasLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26723             : {
   26724           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   26725           0 :         PyObject *bigendian_obj = NULL;
   26726           0 :         PyObject *ndr64_obj = NULL;
   26727           0 :         libndr_flags ndr_push_flags = 0;
   26728             : 
   26729           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   26730             :                 discard_const_p(char *, kwnames),
   26731             :                 &bigendian_obj,
   26732             :                 &ndr64_obj)) {
   26733           0 :                 return NULL;
   26734             :         }
   26735             : 
   26736           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26737           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   26738             :         }
   26739           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26740           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   26741             :         }
   26742             : 
   26743           0 :         return py_netr_LogonUasLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   26744             : }
   26745             : 
   26746           0 : static PyObject *py_netr_LogonUasLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   26747             : {
   26748           0 :         const struct ndr_interface_call *call = NULL;
   26749           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26750           0 :         struct ndr_pull *pull = NULL;
   26751           0 :         enum ndr_err_code err;
   26752             : 
   26753           0 :         if (ndr_table_netlogon.num_calls < 1) {
   26754           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_unpack");
   26755           0 :                 return NULL;
   26756             :         }
   26757           0 :         call = &ndr_table_netlogon.calls[0];
   26758             : 
   26759           0 :         pull = ndr_pull_init_blob(blob, object);
   26760           0 :         if (pull == NULL) {
   26761           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   26762           0 :                 return NULL;
   26763             :         }
   26764             : 
   26765           0 :         pull->flags |= ndr_pull_flags;
   26766             : 
   26767           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   26768           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26769           0 :                 TALLOC_FREE(pull);
   26770           0 :                 PyErr_SetNdrError(err);
   26771           0 :                 return NULL;
   26772             :         }
   26773           0 :         if (!allow_remaining) {
   26774           0 :                 uint32_t highest_ofs;
   26775             : 
   26776           0 :                 if (pull->offset > pull->relative_highest_offset) {
   26777           0 :                         highest_ofs = pull->offset;
   26778             :                 } else {
   26779           0 :                         highest_ofs = pull->relative_highest_offset;
   26780             :                 }
   26781           0 :                 if (highest_ofs < pull->data_size) {
   26782           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   26783             :                                 "not all bytes consumed ofs[%u] size[%u]",
   26784             :                                 highest_ofs, pull->data_size);
   26785           0 :                         TALLOC_FREE(pull);
   26786           0 :                         PyErr_SetNdrError(err);
   26787           0 :                         return NULL;
   26788             :                 }
   26789             :         }
   26790             : 
   26791           0 :         TALLOC_FREE(pull);
   26792           0 :         Py_RETURN_NONE;
   26793             : }
   26794             : 
   26795           0 : static PyObject *py_netr_LogonUasLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26796             : {
   26797           0 :         DATA_BLOB blob;
   26798           0 :         Py_ssize_t blob_length = 0;
   26799           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   26800           0 :         PyObject *bigendian_obj = NULL;
   26801           0 :         PyObject *ndr64_obj = NULL;
   26802           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   26803           0 :         PyObject *allow_remaining_obj = NULL;
   26804           0 :         bool allow_remaining = false;
   26805             : 
   26806           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   26807             :                 discard_const_p(char *, kwnames),
   26808             :                 &blob.data, &blob_length,
   26809             :                 &bigendian_obj,
   26810             :                 &ndr64_obj,
   26811             :                 &allow_remaining_obj)) {
   26812           0 :                 return NULL;
   26813             :         }
   26814           0 :         blob.length = blob_length;
   26815             : 
   26816           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26817           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   26818             :         }
   26819           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26820           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   26821             :         }
   26822             : 
   26823           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   26824           0 :                 allow_remaining = true;
   26825             :         }
   26826             : 
   26827           0 :         return py_netr_LogonUasLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   26828             : }
   26829             : 
   26830           0 : static PyObject *py_netr_LogonUasLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26831             : {
   26832           0 :         DATA_BLOB blob;
   26833           0 :         Py_ssize_t blob_length = 0;
   26834           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   26835           0 :         PyObject *bigendian_obj = NULL;
   26836           0 :         PyObject *ndr64_obj = NULL;
   26837           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   26838           0 :         PyObject *allow_remaining_obj = NULL;
   26839           0 :         bool allow_remaining = false;
   26840             : 
   26841           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   26842             :                 discard_const_p(char *, kwnames),
   26843             :                 &blob.data, &blob_length,
   26844             :                 &bigendian_obj,
   26845             :                 &ndr64_obj,
   26846             :                 &allow_remaining_obj)) {
   26847           0 :                 return NULL;
   26848             :         }
   26849           0 :         blob.length = blob_length;
   26850             : 
   26851           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26852           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   26853             :         }
   26854           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26855           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   26856             :         }
   26857             : 
   26858           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   26859           0 :                 allow_remaining = true;
   26860             :         }
   26861             : 
   26862           0 :         return py_netr_LogonUasLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   26863             : }
   26864             : 
   26865           0 : static PyObject *py_netr_LogonUasLogon_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   26866             : {
   26867           0 :         const struct ndr_interface_call *call = NULL;
   26868           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26869           0 :         PyObject *ret;
   26870           0 :         char *retstr;
   26871             : 
   26872           0 :         if (ndr_table_netlogon.num_calls < 1) {
   26873           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_print");
   26874           0 :                 return NULL;
   26875             :         }
   26876           0 :         call = &ndr_table_netlogon.calls[0];
   26877             : 
   26878           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   26879           0 :         ret = PyUnicode_FromString(retstr);
   26880           0 :         TALLOC_FREE(retstr);
   26881             : 
   26882           0 :         return ret;
   26883             : }
   26884             : 
   26885           0 : static PyObject *py_netr_LogonUasLogon_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   26886             : {
   26887           0 :         return py_netr_LogonUasLogon_ndr_print(py_obj, "netr_LogonUasLogon_in", NDR_IN);
   26888             : }
   26889             : 
   26890           0 : static PyObject *py_netr_LogonUasLogon_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   26891             : {
   26892           0 :         return py_netr_LogonUasLogon_ndr_print(py_obj, "netr_LogonUasLogon_out", NDR_OUT);
   26893             : }
   26894             : 
   26895             : static PyMethodDef py_netr_LogonUasLogon_methods[] = {
   26896             :         { "opnum", (PyCFunction)py_netr_LogonUasLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
   26897             :                 "netlogon.netr_LogonUasLogon.opnum() -> 0 (0x00) " },
   26898             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   26899             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   26900             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   26901             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   26902             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   26903             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   26904             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   26905             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   26906             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonUasLogon_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   26907             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonUasLogon_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   26908             :         { NULL, NULL, 0, NULL }
   26909             : };
   26910             : 
   26911             : 
   26912             : static PyTypeObject netr_LogonUasLogon_Type = {
   26913             :         PyVarObject_HEAD_INIT(NULL, 0)
   26914             :         .tp_name = "netlogon.netr_LogonUasLogon",
   26915             :         .tp_getset = py_netr_LogonUasLogon_getsetters,
   26916             :         .tp_methods = py_netr_LogonUasLogon_methods,
   26917             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26918             :         .tp_new = py_netr_LogonUasLogon_new,
   26919             : };
   26920             : 
   26921           0 : static bool pack_py_netr_LogonUasLogon_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonUasLogon *r)
   26922             : {
   26923           0 :         PyObject *py_server_name;
   26924           0 :         PyObject *py_account_name;
   26925           0 :         PyObject *py_workstation;
   26926           0 :         const char *kwnames[] = {
   26927             :                 "server_name", "account_name", "workstation", NULL
   26928             :         };
   26929             : 
   26930           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonUasLogon", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_workstation)) {
   26931           0 :                 return false;
   26932             :         }
   26933             : 
   26934           0 :         if (py_server_name == NULL) {
   26935           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   26936           0 :                 return false;
   26937             :         }
   26938           0 :         if (py_server_name == Py_None) {
   26939           0 :                 r->in.server_name = NULL;
   26940             :         } else {
   26941           0 :                 r->in.server_name = NULL;
   26942             :                 {
   26943           0 :                         const char *test_str;
   26944           0 :                         const char *talloc_str;
   26945           0 :                         PyObject *unicode = NULL;
   26946           0 :                         if (PyUnicode_Check(py_server_name)) {
   26947           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   26948           0 :                                 if (unicode == NULL) {
   26949           0 :                                         PyErr_NoMemory();
   26950           0 :                                         return false;
   26951             :                                 }
   26952           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26953           0 :                         } else if (PyBytes_Check(py_server_name)) {
   26954           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   26955             :                         } else {
   26956           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   26957           0 :                                 return false;
   26958             :                         }
   26959           0 :                         talloc_str = talloc_strdup(r, test_str);
   26960           0 :                         if (unicode != NULL) {
   26961           0 :                                 Py_DECREF(unicode);
   26962             :                         }
   26963           0 :                         if (talloc_str == NULL) {
   26964           0 :                                 PyErr_NoMemory();
   26965           0 :                                 return false;
   26966             :                         }
   26967           0 :                         r->in.server_name = talloc_str;
   26968             :                 }
   26969             :         }
   26970           0 :         if (py_account_name == NULL) {
   26971           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   26972           0 :                 return false;
   26973             :         }
   26974           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   26975           0 :         if (r->in.account_name == NULL) {
   26976           0 :                 PyErr_NoMemory();
   26977           0 :                 return false;
   26978             :         }
   26979             :         {
   26980           0 :                 const char *test_str;
   26981           0 :                 const char *talloc_str;
   26982           0 :                 PyObject *unicode = NULL;
   26983           0 :                 if (PyUnicode_Check(py_account_name)) {
   26984           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   26985           0 :                         if (unicode == NULL) {
   26986           0 :                                 PyErr_NoMemory();
   26987           0 :                                 return false;
   26988             :                         }
   26989           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26990           0 :                 } else if (PyBytes_Check(py_account_name)) {
   26991           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   26992             :                 } else {
   26993           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   26994           0 :                         return false;
   26995             :                 }
   26996           0 :                 talloc_str = talloc_strdup(r, test_str);
   26997           0 :                 if (unicode != NULL) {
   26998           0 :                         Py_DECREF(unicode);
   26999             :                 }
   27000           0 :                 if (talloc_str == NULL) {
   27001           0 :                         PyErr_NoMemory();
   27002           0 :                         return false;
   27003             :                 }
   27004           0 :                 r->in.account_name = talloc_str;
   27005             :         }
   27006           0 :         if (py_workstation == NULL) {
   27007           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.workstation");
   27008           0 :                 return false;
   27009             :         }
   27010           0 :         r->in.workstation = talloc_ptrtype(r, r->in.workstation);
   27011           0 :         if (r->in.workstation == NULL) {
   27012           0 :                 PyErr_NoMemory();
   27013           0 :                 return false;
   27014             :         }
   27015             :         {
   27016           0 :                 const char *test_str;
   27017           0 :                 const char *talloc_str;
   27018           0 :                 PyObject *unicode = NULL;
   27019           0 :                 if (PyUnicode_Check(py_workstation)) {
   27020           0 :                         unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
   27021           0 :                         if (unicode == NULL) {
   27022           0 :                                 PyErr_NoMemory();
   27023           0 :                                 return false;
   27024             :                         }
   27025           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27026           0 :                 } else if (PyBytes_Check(py_workstation)) {
   27027           0 :                         test_str = PyBytes_AS_STRING(py_workstation);
   27028             :                 } else {
   27029           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
   27030           0 :                         return false;
   27031             :                 }
   27032           0 :                 talloc_str = talloc_strdup(r, test_str);
   27033           0 :                 if (unicode != NULL) {
   27034           0 :                         Py_DECREF(unicode);
   27035             :                 }
   27036           0 :                 if (talloc_str == NULL) {
   27037           0 :                         PyErr_NoMemory();
   27038           0 :                         return false;
   27039             :                 }
   27040           0 :                 r->in.workstation = talloc_str;
   27041             :         }
   27042           0 :         return true;
   27043             : }
   27044             : 
   27045           0 : static PyObject *unpack_py_netr_LogonUasLogon_args_out(struct netr_LogonUasLogon *r)
   27046             : {
   27047           0 :         PyObject *result;
   27048           0 :         PyObject *py_info;
   27049           0 :         if (*r->out.info == NULL) {
   27050           0 :                 py_info = Py_None;
   27051           0 :                 Py_INCREF(py_info);
   27052             :         } else {
   27053           0 :                 py_info = pytalloc_reference_ex(&netr_UasInfo_Type, *r->out.info, *r->out.info);
   27054             :         }
   27055           0 :         result = py_info;
   27056           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   27057           0 :                 PyErr_SetWERROR(r->out.result);
   27058           0 :                 return NULL;
   27059             :         }
   27060             : 
   27061           0 :         return result;
   27062             : }
   27063             : 
   27064             : 
   27065           0 : static PyObject *py_netr_LogonUasLogoff_in_get_server_name(PyObject *obj, void *closure)
   27066             : {
   27067           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   27068           0 :         PyObject *py_server_name;
   27069           0 :         if (object->in.server_name == NULL) {
   27070           0 :                 Py_RETURN_NONE;
   27071             :         }
   27072           0 :         if (object->in.server_name == NULL) {
   27073           0 :                 py_server_name = Py_None;
   27074           0 :                 Py_INCREF(py_server_name);
   27075             :         } else {
   27076           0 :                 if (object->in.server_name == NULL) {
   27077           0 :                         py_server_name = Py_None;
   27078           0 :                         Py_INCREF(py_server_name);
   27079             :                 } else {
   27080           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   27081             :                 }
   27082             :         }
   27083           0 :         return py_server_name;
   27084             : }
   27085             : 
   27086           0 : static int py_netr_LogonUasLogoff_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   27087             : {
   27088           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27089           0 :         if (value == NULL) {
   27090           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   27091           0 :                 return -1;
   27092             :         }
   27093           0 :         if (value == Py_None) {
   27094           0 :                 object->in.server_name = NULL;
   27095             :         } else {
   27096           0 :                 object->in.server_name = NULL;
   27097             :                 {
   27098           0 :                         const char *test_str;
   27099           0 :                         const char *talloc_str;
   27100           0 :                         PyObject *unicode = NULL;
   27101           0 :                         if (PyUnicode_Check(value)) {
   27102           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27103           0 :                                 if (unicode == NULL) {
   27104           0 :                                         PyErr_NoMemory();
   27105           0 :                                         return -1;
   27106             :                                 }
   27107           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27108           0 :                         } else if (PyBytes_Check(value)) {
   27109           0 :                                 test_str = PyBytes_AS_STRING(value);
   27110             :                         } else {
   27111           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27112           0 :                                 return -1;
   27113             :                         }
   27114           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27115           0 :                         if (unicode != NULL) {
   27116           0 :                                 Py_DECREF(unicode);
   27117             :                         }
   27118           0 :                         if (talloc_str == NULL) {
   27119           0 :                                 PyErr_NoMemory();
   27120           0 :                                 return -1;
   27121             :                         }
   27122           0 :                         object->in.server_name = talloc_str;
   27123             :                 }
   27124             :         }
   27125           0 :         return 0;
   27126             : }
   27127             : 
   27128           0 : static PyObject *py_netr_LogonUasLogoff_in_get_account_name(PyObject *obj, void *closure)
   27129             : {
   27130           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   27131           0 :         PyObject *py_account_name;
   27132           0 :         if (object->in.account_name == NULL) {
   27133           0 :                 Py_RETURN_NONE;
   27134             :         }
   27135           0 :         if (object->in.account_name == NULL) {
   27136           0 :                 py_account_name = Py_None;
   27137           0 :                 Py_INCREF(py_account_name);
   27138             :         } else {
   27139           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   27140             :         }
   27141           0 :         return py_account_name;
   27142             : }
   27143             : 
   27144           0 : static int py_netr_LogonUasLogoff_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   27145             : {
   27146           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27147           0 :         if (value == NULL) {
   27148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   27149           0 :                 return -1;
   27150             :         }
   27151           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   27152           0 :         if (object->in.account_name == NULL) {
   27153           0 :                 PyErr_NoMemory();
   27154           0 :                 return -1;
   27155             :         }
   27156             :         {
   27157           0 :                 const char *test_str;
   27158           0 :                 const char *talloc_str;
   27159           0 :                 PyObject *unicode = NULL;
   27160           0 :                 if (PyUnicode_Check(value)) {
   27161           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27162           0 :                         if (unicode == NULL) {
   27163           0 :                                 PyErr_NoMemory();
   27164           0 :                                 return -1;
   27165             :                         }
   27166           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27167           0 :                 } else if (PyBytes_Check(value)) {
   27168           0 :                         test_str = PyBytes_AS_STRING(value);
   27169             :                 } else {
   27170           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27171           0 :                         return -1;
   27172             :                 }
   27173           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27174           0 :                 if (unicode != NULL) {
   27175           0 :                         Py_DECREF(unicode);
   27176             :                 }
   27177           0 :                 if (talloc_str == NULL) {
   27178           0 :                         PyErr_NoMemory();
   27179           0 :                         return -1;
   27180             :                 }
   27181           0 :                 object->in.account_name = talloc_str;
   27182             :         }
   27183           0 :         return 0;
   27184             : }
   27185             : 
   27186           0 : static PyObject *py_netr_LogonUasLogoff_in_get_workstation(PyObject *obj, void *closure)
   27187             : {
   27188           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   27189           0 :         PyObject *py_workstation;
   27190           0 :         if (object->in.workstation == NULL) {
   27191           0 :                 Py_RETURN_NONE;
   27192             :         }
   27193           0 :         if (object->in.workstation == NULL) {
   27194           0 :                 py_workstation = Py_None;
   27195           0 :                 Py_INCREF(py_workstation);
   27196             :         } else {
   27197           0 :                 py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
   27198             :         }
   27199           0 :         return py_workstation;
   27200             : }
   27201             : 
   27202           0 : static int py_netr_LogonUasLogoff_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
   27203             : {
   27204           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27205           0 :         if (value == NULL) {
   27206           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.workstation");
   27207           0 :                 return -1;
   27208             :         }
   27209           0 :         object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
   27210           0 :         if (object->in.workstation == NULL) {
   27211           0 :                 PyErr_NoMemory();
   27212           0 :                 return -1;
   27213             :         }
   27214             :         {
   27215           0 :                 const char *test_str;
   27216           0 :                 const char *talloc_str;
   27217           0 :                 PyObject *unicode = NULL;
   27218           0 :                 if (PyUnicode_Check(value)) {
   27219           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27220           0 :                         if (unicode == NULL) {
   27221           0 :                                 PyErr_NoMemory();
   27222           0 :                                 return -1;
   27223             :                         }
   27224           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27225           0 :                 } else if (PyBytes_Check(value)) {
   27226           0 :                         test_str = PyBytes_AS_STRING(value);
   27227             :                 } else {
   27228           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27229           0 :                         return -1;
   27230             :                 }
   27231           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27232           0 :                 if (unicode != NULL) {
   27233           0 :                         Py_DECREF(unicode);
   27234             :                 }
   27235           0 :                 if (talloc_str == NULL) {
   27236           0 :                         PyErr_NoMemory();
   27237           0 :                         return -1;
   27238             :                 }
   27239           0 :                 object->in.workstation = talloc_str;
   27240             :         }
   27241           0 :         return 0;
   27242             : }
   27243             : 
   27244           0 : static PyObject *py_netr_LogonUasLogoff_out_get_info(PyObject *obj, void *closure)
   27245             : {
   27246           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   27247           0 :         PyObject *py_info;
   27248           0 :         if (object->out.info == NULL) {
   27249           0 :                 Py_RETURN_NONE;
   27250             :         }
   27251           0 :         py_info = pytalloc_reference_ex(&netr_UasLogoffInfo_Type, object->out.info, object->out.info);
   27252           0 :         return py_info;
   27253             : }
   27254             : 
   27255           0 : static int py_netr_LogonUasLogoff_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   27256             : {
   27257           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27258           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   27259           0 :         if (value == NULL) {
   27260           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   27261           0 :                 return -1;
   27262             :         }
   27263           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   27264           0 :         if (object->out.info == NULL) {
   27265           0 :                 PyErr_NoMemory();
   27266           0 :                 return -1;
   27267             :         }
   27268           0 :         PY_CHECK_TYPE(&netr_UasLogoffInfo_Type, value, return -1;);
   27269           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27270           0 :                 PyErr_NoMemory();
   27271           0 :                 return -1;
   27272             :         }
   27273           0 :         object->out.info = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(value);
   27274           0 :         return 0;
   27275             : }
   27276             : 
   27277           0 : static PyObject *py_netr_LogonUasLogoff_get_result(PyObject *obj, void *closure)
   27278             : {
   27279           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   27280           0 :         PyObject *py_result;
   27281           0 :         py_result = PyErr_FromWERROR(object->out.result);
   27282           0 :         return py_result;
   27283             : }
   27284             : 
   27285           0 : static int py_netr_LogonUasLogoff_set_result(PyObject *py_obj, PyObject *value, void *closure)
   27286             : {
   27287           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27288           0 :         if (value == NULL) {
   27289           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   27290           0 :                 return -1;
   27291             :         }
   27292           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   27293           0 :         return 0;
   27294             : }
   27295             : 
   27296             : static PyGetSetDef py_netr_LogonUasLogoff_getsetters[] = {
   27297             :         {
   27298             :                 .name = discard_const_p(char, "in_server_name"),
   27299             :                 .get = py_netr_LogonUasLogoff_in_get_server_name,
   27300             :                 .set = py_netr_LogonUasLogoff_in_set_server_name,
   27301             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27302             :         },
   27303             :         {
   27304             :                 .name = discard_const_p(char, "in_account_name"),
   27305             :                 .get = py_netr_LogonUasLogoff_in_get_account_name,
   27306             :                 .set = py_netr_LogonUasLogoff_in_set_account_name,
   27307             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27308             :         },
   27309             :         {
   27310             :                 .name = discard_const_p(char, "in_workstation"),
   27311             :                 .get = py_netr_LogonUasLogoff_in_get_workstation,
   27312             :                 .set = py_netr_LogonUasLogoff_in_set_workstation,
   27313             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27314             :         },
   27315             :         {
   27316             :                 .name = discard_const_p(char, "out_info"),
   27317             :                 .get = py_netr_LogonUasLogoff_out_get_info,
   27318             :                 .set = py_netr_LogonUasLogoff_out_set_info,
   27319             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UasLogoffInfo")
   27320             :         },
   27321             :         {
   27322             :                 .name = discard_const_p(char, "result"),
   27323             :                 .get = py_netr_LogonUasLogoff_get_result,
   27324             :                 .set = py_netr_LogonUasLogoff_set_result,
   27325             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   27326             :         },
   27327             :         { .name = NULL }
   27328             : };
   27329             : 
   27330           0 : static PyObject *py_netr_LogonUasLogoff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27331             : {
   27332           0 :         PyObject *self = pytalloc_new(struct netr_LogonUasLogoff, type);
   27333           0 :         struct netr_LogonUasLogoff *_self = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(self);
   27334           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   27335           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_UasLogoffInfo);
   27336           0 :         return self;
   27337             : }
   27338             : 
   27339           0 : static PyObject *py_netr_LogonUasLogoff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   27340             : {
   27341             : 
   27342             : 
   27343           0 :         return PyLong_FromLong(1);
   27344             : }
   27345             : 
   27346           0 : static PyObject *py_netr_LogonUasLogoff_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   27347             : {
   27348           0 :         const struct ndr_interface_call *call = NULL;
   27349           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27350           0 :         PyObject *ret = NULL;
   27351           0 :         struct ndr_push *push = NULL;
   27352           0 :         DATA_BLOB blob;
   27353           0 :         enum ndr_err_code err;
   27354             : 
   27355           0 :         if (ndr_table_netlogon.num_calls < 2) {
   27356           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_pack");
   27357           0 :                 return NULL;
   27358             :         }
   27359           0 :         call = &ndr_table_netlogon.calls[1];
   27360             : 
   27361           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   27362           0 :         if (push == NULL) {
   27363           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   27364           0 :                 return NULL;
   27365             :         }
   27366             : 
   27367           0 :         push->flags |= ndr_push_flags;
   27368             : 
   27369           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   27370           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   27371           0 :                 TALLOC_FREE(push);
   27372           0 :                 PyErr_SetNdrError(err);
   27373           0 :                 return NULL;
   27374             :         }
   27375           0 :         blob = ndr_push_blob(push);
   27376           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   27377           0 :         TALLOC_FREE(push);
   27378           0 :         return ret;
   27379             : }
   27380             : 
   27381           0 : static PyObject *py_netr_LogonUasLogoff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27382             : {
   27383           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   27384           0 :         PyObject *bigendian_obj = NULL;
   27385           0 :         PyObject *ndr64_obj = NULL;
   27386           0 :         libndr_flags ndr_push_flags = 0;
   27387             : 
   27388           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   27389             :                 discard_const_p(char *, kwnames),
   27390             :                 &bigendian_obj,
   27391             :                 &ndr64_obj)) {
   27392           0 :                 return NULL;
   27393             :         }
   27394             : 
   27395           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27396           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   27397             :         }
   27398           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27399           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   27400             :         }
   27401             : 
   27402           0 :         return py_netr_LogonUasLogoff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   27403             : }
   27404             : 
   27405           0 : static PyObject *py_netr_LogonUasLogoff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27406             : {
   27407           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   27408           0 :         PyObject *bigendian_obj = NULL;
   27409           0 :         PyObject *ndr64_obj = NULL;
   27410           0 :         libndr_flags ndr_push_flags = 0;
   27411             : 
   27412           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   27413             :                 discard_const_p(char *, kwnames),
   27414             :                 &bigendian_obj,
   27415             :                 &ndr64_obj)) {
   27416           0 :                 return NULL;
   27417             :         }
   27418             : 
   27419           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27420           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   27421             :         }
   27422           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27423           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   27424             :         }
   27425             : 
   27426           0 :         return py_netr_LogonUasLogoff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   27427             : }
   27428             : 
   27429           0 : static PyObject *py_netr_LogonUasLogoff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   27430             : {
   27431           0 :         const struct ndr_interface_call *call = NULL;
   27432           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27433           0 :         struct ndr_pull *pull = NULL;
   27434           0 :         enum ndr_err_code err;
   27435             : 
   27436           0 :         if (ndr_table_netlogon.num_calls < 2) {
   27437           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_unpack");
   27438           0 :                 return NULL;
   27439             :         }
   27440           0 :         call = &ndr_table_netlogon.calls[1];
   27441             : 
   27442           0 :         pull = ndr_pull_init_blob(blob, object);
   27443           0 :         if (pull == NULL) {
   27444           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   27445           0 :                 return NULL;
   27446             :         }
   27447             : 
   27448           0 :         pull->flags |= ndr_pull_flags;
   27449             : 
   27450           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   27451           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   27452           0 :                 TALLOC_FREE(pull);
   27453           0 :                 PyErr_SetNdrError(err);
   27454           0 :                 return NULL;
   27455             :         }
   27456           0 :         if (!allow_remaining) {
   27457           0 :                 uint32_t highest_ofs;
   27458             : 
   27459           0 :                 if (pull->offset > pull->relative_highest_offset) {
   27460           0 :                         highest_ofs = pull->offset;
   27461             :                 } else {
   27462           0 :                         highest_ofs = pull->relative_highest_offset;
   27463             :                 }
   27464           0 :                 if (highest_ofs < pull->data_size) {
   27465           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   27466             :                                 "not all bytes consumed ofs[%u] size[%u]",
   27467             :                                 highest_ofs, pull->data_size);
   27468           0 :                         TALLOC_FREE(pull);
   27469           0 :                         PyErr_SetNdrError(err);
   27470           0 :                         return NULL;
   27471             :                 }
   27472             :         }
   27473             : 
   27474           0 :         TALLOC_FREE(pull);
   27475           0 :         Py_RETURN_NONE;
   27476             : }
   27477             : 
   27478           0 : static PyObject *py_netr_LogonUasLogoff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27479             : {
   27480           0 :         DATA_BLOB blob;
   27481           0 :         Py_ssize_t blob_length = 0;
   27482           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   27483           0 :         PyObject *bigendian_obj = NULL;
   27484           0 :         PyObject *ndr64_obj = NULL;
   27485           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   27486           0 :         PyObject *allow_remaining_obj = NULL;
   27487           0 :         bool allow_remaining = false;
   27488             : 
   27489           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   27490             :                 discard_const_p(char *, kwnames),
   27491             :                 &blob.data, &blob_length,
   27492             :                 &bigendian_obj,
   27493             :                 &ndr64_obj,
   27494             :                 &allow_remaining_obj)) {
   27495           0 :                 return NULL;
   27496             :         }
   27497           0 :         blob.length = blob_length;
   27498             : 
   27499           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27500           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   27501             :         }
   27502           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27503           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   27504             :         }
   27505             : 
   27506           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   27507           0 :                 allow_remaining = true;
   27508             :         }
   27509             : 
   27510           0 :         return py_netr_LogonUasLogoff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   27511             : }
   27512             : 
   27513           0 : static PyObject *py_netr_LogonUasLogoff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27514             : {
   27515           0 :         DATA_BLOB blob;
   27516           0 :         Py_ssize_t blob_length = 0;
   27517           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   27518           0 :         PyObject *bigendian_obj = NULL;
   27519           0 :         PyObject *ndr64_obj = NULL;
   27520           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   27521           0 :         PyObject *allow_remaining_obj = NULL;
   27522           0 :         bool allow_remaining = false;
   27523             : 
   27524           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   27525             :                 discard_const_p(char *, kwnames),
   27526             :                 &blob.data, &blob_length,
   27527             :                 &bigendian_obj,
   27528             :                 &ndr64_obj,
   27529             :                 &allow_remaining_obj)) {
   27530           0 :                 return NULL;
   27531             :         }
   27532           0 :         blob.length = blob_length;
   27533             : 
   27534           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27535           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   27536             :         }
   27537           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27538           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   27539             :         }
   27540             : 
   27541           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   27542           0 :                 allow_remaining = true;
   27543             :         }
   27544             : 
   27545           0 :         return py_netr_LogonUasLogoff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   27546             : }
   27547             : 
   27548           0 : static PyObject *py_netr_LogonUasLogoff_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   27549             : {
   27550           0 :         const struct ndr_interface_call *call = NULL;
   27551           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27552           0 :         PyObject *ret;
   27553           0 :         char *retstr;
   27554             : 
   27555           0 :         if (ndr_table_netlogon.num_calls < 2) {
   27556           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_print");
   27557           0 :                 return NULL;
   27558             :         }
   27559           0 :         call = &ndr_table_netlogon.calls[1];
   27560             : 
   27561           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   27562           0 :         ret = PyUnicode_FromString(retstr);
   27563           0 :         TALLOC_FREE(retstr);
   27564             : 
   27565           0 :         return ret;
   27566             : }
   27567             : 
   27568           0 : static PyObject *py_netr_LogonUasLogoff_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   27569             : {
   27570           0 :         return py_netr_LogonUasLogoff_ndr_print(py_obj, "netr_LogonUasLogoff_in", NDR_IN);
   27571             : }
   27572             : 
   27573           0 : static PyObject *py_netr_LogonUasLogoff_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   27574             : {
   27575           0 :         return py_netr_LogonUasLogoff_ndr_print(py_obj, "netr_LogonUasLogoff_out", NDR_OUT);
   27576             : }
   27577             : 
   27578             : static PyMethodDef py_netr_LogonUasLogoff_methods[] = {
   27579             :         { "opnum", (PyCFunction)py_netr_LogonUasLogoff_ndr_opnum, METH_NOARGS|METH_CLASS,
   27580             :                 "netlogon.netr_LogonUasLogoff.opnum() -> 1 (0x01) " },
   27581             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   27582             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   27583             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   27584             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   27585             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   27586             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   27587             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   27588             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   27589             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonUasLogoff_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   27590             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonUasLogoff_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   27591             :         { NULL, NULL, 0, NULL }
   27592             : };
   27593             : 
   27594             : 
   27595             : static PyTypeObject netr_LogonUasLogoff_Type = {
   27596             :         PyVarObject_HEAD_INIT(NULL, 0)
   27597             :         .tp_name = "netlogon.netr_LogonUasLogoff",
   27598             :         .tp_getset = py_netr_LogonUasLogoff_getsetters,
   27599             :         .tp_methods = py_netr_LogonUasLogoff_methods,
   27600             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27601             :         .tp_new = py_netr_LogonUasLogoff_new,
   27602             : };
   27603             : 
   27604           0 : static bool pack_py_netr_LogonUasLogoff_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonUasLogoff *r)
   27605             : {
   27606           0 :         PyObject *py_server_name;
   27607           0 :         PyObject *py_account_name;
   27608           0 :         PyObject *py_workstation;
   27609           0 :         const char *kwnames[] = {
   27610             :                 "server_name", "account_name", "workstation", NULL
   27611             :         };
   27612             : 
   27613           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonUasLogoff", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_workstation)) {
   27614           0 :                 return false;
   27615             :         }
   27616             : 
   27617           0 :         if (py_server_name == NULL) {
   27618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   27619           0 :                 return false;
   27620             :         }
   27621           0 :         if (py_server_name == Py_None) {
   27622           0 :                 r->in.server_name = NULL;
   27623             :         } else {
   27624           0 :                 r->in.server_name = NULL;
   27625             :                 {
   27626           0 :                         const char *test_str;
   27627           0 :                         const char *talloc_str;
   27628           0 :                         PyObject *unicode = NULL;
   27629           0 :                         if (PyUnicode_Check(py_server_name)) {
   27630           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   27631           0 :                                 if (unicode == NULL) {
   27632           0 :                                         PyErr_NoMemory();
   27633           0 :                                         return false;
   27634             :                                 }
   27635           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27636           0 :                         } else if (PyBytes_Check(py_server_name)) {
   27637           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   27638             :                         } else {
   27639           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   27640           0 :                                 return false;
   27641             :                         }
   27642           0 :                         talloc_str = talloc_strdup(r, test_str);
   27643           0 :                         if (unicode != NULL) {
   27644           0 :                                 Py_DECREF(unicode);
   27645             :                         }
   27646           0 :                         if (talloc_str == NULL) {
   27647           0 :                                 PyErr_NoMemory();
   27648           0 :                                 return false;
   27649             :                         }
   27650           0 :                         r->in.server_name = talloc_str;
   27651             :                 }
   27652             :         }
   27653           0 :         if (py_account_name == NULL) {
   27654           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   27655           0 :                 return false;
   27656             :         }
   27657           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   27658           0 :         if (r->in.account_name == NULL) {
   27659           0 :                 PyErr_NoMemory();
   27660           0 :                 return false;
   27661             :         }
   27662             :         {
   27663           0 :                 const char *test_str;
   27664           0 :                 const char *talloc_str;
   27665           0 :                 PyObject *unicode = NULL;
   27666           0 :                 if (PyUnicode_Check(py_account_name)) {
   27667           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   27668           0 :                         if (unicode == NULL) {
   27669           0 :                                 PyErr_NoMemory();
   27670           0 :                                 return false;
   27671             :                         }
   27672           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27673           0 :                 } else if (PyBytes_Check(py_account_name)) {
   27674           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   27675             :                 } else {
   27676           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   27677           0 :                         return false;
   27678             :                 }
   27679           0 :                 talloc_str = talloc_strdup(r, test_str);
   27680           0 :                 if (unicode != NULL) {
   27681           0 :                         Py_DECREF(unicode);
   27682             :                 }
   27683           0 :                 if (talloc_str == NULL) {
   27684           0 :                         PyErr_NoMemory();
   27685           0 :                         return false;
   27686             :                 }
   27687           0 :                 r->in.account_name = talloc_str;
   27688             :         }
   27689           0 :         if (py_workstation == NULL) {
   27690           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.workstation");
   27691           0 :                 return false;
   27692             :         }
   27693           0 :         r->in.workstation = talloc_ptrtype(r, r->in.workstation);
   27694           0 :         if (r->in.workstation == NULL) {
   27695           0 :                 PyErr_NoMemory();
   27696           0 :                 return false;
   27697             :         }
   27698             :         {
   27699           0 :                 const char *test_str;
   27700           0 :                 const char *talloc_str;
   27701           0 :                 PyObject *unicode = NULL;
   27702           0 :                 if (PyUnicode_Check(py_workstation)) {
   27703           0 :                         unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
   27704           0 :                         if (unicode == NULL) {
   27705           0 :                                 PyErr_NoMemory();
   27706           0 :                                 return false;
   27707             :                         }
   27708           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27709           0 :                 } else if (PyBytes_Check(py_workstation)) {
   27710           0 :                         test_str = PyBytes_AS_STRING(py_workstation);
   27711             :                 } else {
   27712           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
   27713           0 :                         return false;
   27714             :                 }
   27715           0 :                 talloc_str = talloc_strdup(r, test_str);
   27716           0 :                 if (unicode != NULL) {
   27717           0 :                         Py_DECREF(unicode);
   27718             :                 }
   27719           0 :                 if (talloc_str == NULL) {
   27720           0 :                         PyErr_NoMemory();
   27721           0 :                         return false;
   27722             :                 }
   27723           0 :                 r->in.workstation = talloc_str;
   27724             :         }
   27725           0 :         return true;
   27726             : }
   27727             : 
   27728           0 : static PyObject *unpack_py_netr_LogonUasLogoff_args_out(struct netr_LogonUasLogoff *r)
   27729             : {
   27730           0 :         PyObject *result;
   27731           0 :         PyObject *py_info;
   27732           0 :         py_info = pytalloc_reference_ex(&netr_UasLogoffInfo_Type, r->out.info, r->out.info);
   27733           0 :         result = py_info;
   27734           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   27735           0 :                 PyErr_SetWERROR(r->out.result);
   27736           0 :                 return NULL;
   27737             :         }
   27738             : 
   27739           0 :         return result;
   27740             : }
   27741             : 
   27742             : 
   27743           0 : static PyObject *py_netr_LogonSamLogon_in_get_server_name(PyObject *obj, void *closure)
   27744             : {
   27745           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27746           0 :         PyObject *py_server_name;
   27747           0 :         if (object->in.server_name == NULL) {
   27748           0 :                 Py_RETURN_NONE;
   27749             :         }
   27750           0 :         if (object->in.server_name == NULL) {
   27751           0 :                 py_server_name = Py_None;
   27752           0 :                 Py_INCREF(py_server_name);
   27753             :         } else {
   27754           0 :                 if (object->in.server_name == NULL) {
   27755           0 :                         py_server_name = Py_None;
   27756           0 :                         Py_INCREF(py_server_name);
   27757             :                 } else {
   27758           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   27759             :                 }
   27760             :         }
   27761           0 :         return py_server_name;
   27762             : }
   27763             : 
   27764           0 : static int py_netr_LogonSamLogon_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   27765             : {
   27766           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27767           0 :         if (value == NULL) {
   27768           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   27769           0 :                 return -1;
   27770             :         }
   27771           0 :         if (value == Py_None) {
   27772           0 :                 object->in.server_name = NULL;
   27773             :         } else {
   27774           0 :                 object->in.server_name = NULL;
   27775             :                 {
   27776           0 :                         const char *test_str;
   27777           0 :                         const char *talloc_str;
   27778           0 :                         PyObject *unicode = NULL;
   27779           0 :                         if (PyUnicode_Check(value)) {
   27780           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27781           0 :                                 if (unicode == NULL) {
   27782           0 :                                         PyErr_NoMemory();
   27783           0 :                                         return -1;
   27784             :                                 }
   27785           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27786           0 :                         } else if (PyBytes_Check(value)) {
   27787           0 :                                 test_str = PyBytes_AS_STRING(value);
   27788             :                         } else {
   27789           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27790           0 :                                 return -1;
   27791             :                         }
   27792           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27793           0 :                         if (unicode != NULL) {
   27794           0 :                                 Py_DECREF(unicode);
   27795             :                         }
   27796           0 :                         if (talloc_str == NULL) {
   27797           0 :                                 PyErr_NoMemory();
   27798           0 :                                 return -1;
   27799             :                         }
   27800           0 :                         object->in.server_name = talloc_str;
   27801             :                 }
   27802             :         }
   27803           0 :         return 0;
   27804             : }
   27805             : 
   27806           0 : static PyObject *py_netr_LogonSamLogon_in_get_computer_name(PyObject *obj, void *closure)
   27807             : {
   27808           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27809           0 :         PyObject *py_computer_name;
   27810           0 :         if (object->in.computer_name == NULL) {
   27811           0 :                 Py_RETURN_NONE;
   27812             :         }
   27813           0 :         if (object->in.computer_name == NULL) {
   27814           0 :                 py_computer_name = Py_None;
   27815           0 :                 Py_INCREF(py_computer_name);
   27816             :         } else {
   27817           0 :                 if (object->in.computer_name == NULL) {
   27818           0 :                         py_computer_name = Py_None;
   27819           0 :                         Py_INCREF(py_computer_name);
   27820             :                 } else {
   27821           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   27822             :                 }
   27823             :         }
   27824           0 :         return py_computer_name;
   27825             : }
   27826             : 
   27827           0 : static int py_netr_LogonSamLogon_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   27828             : {
   27829           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27830           0 :         if (value == NULL) {
   27831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   27832           0 :                 return -1;
   27833             :         }
   27834           0 :         if (value == Py_None) {
   27835           0 :                 object->in.computer_name = NULL;
   27836             :         } else {
   27837           0 :                 object->in.computer_name = NULL;
   27838             :                 {
   27839           0 :                         const char *test_str;
   27840           0 :                         const char *talloc_str;
   27841           0 :                         PyObject *unicode = NULL;
   27842           0 :                         if (PyUnicode_Check(value)) {
   27843           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27844           0 :                                 if (unicode == NULL) {
   27845           0 :                                         PyErr_NoMemory();
   27846           0 :                                         return -1;
   27847             :                                 }
   27848           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27849           0 :                         } else if (PyBytes_Check(value)) {
   27850           0 :                                 test_str = PyBytes_AS_STRING(value);
   27851             :                         } else {
   27852           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27853           0 :                                 return -1;
   27854             :                         }
   27855           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27856           0 :                         if (unicode != NULL) {
   27857           0 :                                 Py_DECREF(unicode);
   27858             :                         }
   27859           0 :                         if (talloc_str == NULL) {
   27860           0 :                                 PyErr_NoMemory();
   27861           0 :                                 return -1;
   27862             :                         }
   27863           0 :                         object->in.computer_name = talloc_str;
   27864             :                 }
   27865             :         }
   27866           0 :         return 0;
   27867             : }
   27868             : 
   27869           0 : static PyObject *py_netr_LogonSamLogon_in_get_credential(PyObject *obj, void *closure)
   27870             : {
   27871           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27872           0 :         PyObject *py_credential;
   27873           0 :         if (object->in.credential == NULL) {
   27874           0 :                 Py_RETURN_NONE;
   27875             :         }
   27876           0 :         if (object->in.credential == NULL) {
   27877           0 :                 py_credential = Py_None;
   27878           0 :                 Py_INCREF(py_credential);
   27879             :         } else {
   27880           0 :                 py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   27881             :         }
   27882           0 :         return py_credential;
   27883             : }
   27884             : 
   27885           0 : static int py_netr_LogonSamLogon_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   27886             : {
   27887           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27888           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   27889           0 :         if (value == NULL) {
   27890           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   27891           0 :                 return -1;
   27892             :         }
   27893           0 :         if (value == Py_None) {
   27894           0 :                 object->in.credential = NULL;
   27895             :         } else {
   27896           0 :                 object->in.credential = NULL;
   27897           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   27898           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27899           0 :                         PyErr_NoMemory();
   27900           0 :                         return -1;
   27901             :                 }
   27902           0 :                 object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   27903             :         }
   27904           0 :         return 0;
   27905             : }
   27906             : 
   27907           0 : static PyObject *py_netr_LogonSamLogon_in_get_return_authenticator(PyObject *obj, void *closure)
   27908             : {
   27909           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27910           0 :         PyObject *py_return_authenticator;
   27911           0 :         if (object->in.return_authenticator == NULL) {
   27912           0 :                 Py_RETURN_NONE;
   27913             :         }
   27914           0 :         if (object->in.return_authenticator == NULL) {
   27915           0 :                 py_return_authenticator = Py_None;
   27916           0 :                 Py_INCREF(py_return_authenticator);
   27917             :         } else {
   27918           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   27919             :         }
   27920           0 :         return py_return_authenticator;
   27921             : }
   27922             : 
   27923           0 : static int py_netr_LogonSamLogon_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   27924             : {
   27925           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27926           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   27927           0 :         if (value == NULL) {
   27928           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   27929           0 :                 return -1;
   27930             :         }
   27931           0 :         if (value == Py_None) {
   27932           0 :                 object->in.return_authenticator = NULL;
   27933             :         } else {
   27934           0 :                 object->in.return_authenticator = NULL;
   27935           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   27936           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27937           0 :                         PyErr_NoMemory();
   27938           0 :                         return -1;
   27939             :                 }
   27940           0 :                 object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   27941             :         }
   27942           0 :         return 0;
   27943             : }
   27944             : 
   27945           0 : static PyObject *py_netr_LogonSamLogon_out_get_return_authenticator(PyObject *obj, void *closure)
   27946             : {
   27947           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27948           0 :         PyObject *py_return_authenticator;
   27949           0 :         if (object->out.return_authenticator == NULL) {
   27950           0 :                 Py_RETURN_NONE;
   27951             :         }
   27952           0 :         if (object->out.return_authenticator == NULL) {
   27953           0 :                 py_return_authenticator = Py_None;
   27954           0 :                 Py_INCREF(py_return_authenticator);
   27955             :         } else {
   27956           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   27957             :         }
   27958           0 :         return py_return_authenticator;
   27959             : }
   27960             : 
   27961           0 : static int py_netr_LogonSamLogon_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   27962             : {
   27963           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27964           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   27965           0 :         if (value == NULL) {
   27966           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   27967           0 :                 return -1;
   27968             :         }
   27969           0 :         if (value == Py_None) {
   27970           0 :                 object->out.return_authenticator = NULL;
   27971             :         } else {
   27972           0 :                 object->out.return_authenticator = NULL;
   27973           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   27974           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27975           0 :                         PyErr_NoMemory();
   27976           0 :                         return -1;
   27977             :                 }
   27978           0 :                 object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   27979             :         }
   27980           0 :         return 0;
   27981             : }
   27982             : 
   27983           0 : static PyObject *py_netr_LogonSamLogon_in_get_logon_level(PyObject *obj, void *closure)
   27984             : {
   27985           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27986           0 :         PyObject *py_logon_level;
   27987           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   27988           0 :         return py_logon_level;
   27989             : }
   27990             : 
   27991           0 : static int py_netr_LogonSamLogon_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   27992             : {
   27993           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27994           0 :         if (value == NULL) {
   27995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   27996           0 :                 return -1;
   27997             :         }
   27998             :         {
   27999           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   28000           0 :                 if (PyLong_Check(value)) {
   28001           0 :                         unsigned long long test_var;
   28002           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28003           0 :                         if (PyErr_Occurred() != NULL) {
   28004           0 :                                 return -1;
   28005             :                         }
   28006           0 :                         if (test_var > uint_max) {
   28007           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28008             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28009           0 :                                 return -1;
   28010             :                         }
   28011           0 :                         object->in.logon_level = test_var;
   28012             :                 } else {
   28013           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28014             :                           PyLong_Type.tp_name);
   28015           0 :                         return -1;
   28016             :                 }
   28017             :         }
   28018           0 :         return 0;
   28019             : }
   28020             : 
   28021           0 : static PyObject *py_netr_LogonSamLogon_in_get_logon(PyObject *obj, void *closure)
   28022             : {
   28023           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   28024           0 :         PyObject *py_logon;
   28025           0 :         if (object->in.logon == NULL) {
   28026           0 :                 Py_RETURN_NONE;
   28027             :         }
   28028           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
   28029           0 :         if (py_logon == NULL) {
   28030           0 :                 return NULL;
   28031             :         }
   28032           0 :         return py_logon;
   28033             : }
   28034             : 
   28035           0 : static int py_netr_LogonSamLogon_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   28036             : {
   28037           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28038           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
   28039           0 :         if (value == NULL) {
   28040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   28041           0 :                 return -1;
   28042             :         }
   28043           0 :         object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
   28044           0 :         if (object->in.logon == NULL) {
   28045           0 :                 PyErr_NoMemory();
   28046           0 :                 return -1;
   28047             :         }
   28048             :         {
   28049           0 :                 union netr_LogonLevel *logon_switch_1;
   28050           0 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(py_obj), object->in.logon_level, value, "union netr_LogonLevel");
   28051           0 :                 if (logon_switch_1 == NULL) {
   28052           0 :                         return -1;
   28053             :                 }
   28054           0 :                 object->in.logon = logon_switch_1;
   28055             :         }
   28056           0 :         return 0;
   28057             : }
   28058             : 
   28059           0 : static PyObject *py_netr_LogonSamLogon_in_get_validation_level(PyObject *obj, void *closure)
   28060             : {
   28061           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   28062           0 :         PyObject *py_validation_level;
   28063           0 :         py_validation_level = PyLong_FromLong((uint16_t)object->in.validation_level);
   28064           0 :         return py_validation_level;
   28065             : }
   28066             : 
   28067           0 : static int py_netr_LogonSamLogon_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   28068             : {
   28069           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28070           0 :         if (value == NULL) {
   28071           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.validation_level");
   28072           0 :                 return -1;
   28073             :         }
   28074             :         {
   28075           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   28076           0 :                 if (PyLong_Check(value)) {
   28077           0 :                         unsigned long long test_var;
   28078           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28079           0 :                         if (PyErr_Occurred() != NULL) {
   28080           0 :                                 return -1;
   28081             :                         }
   28082           0 :                         if (test_var > uint_max) {
   28083           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28084             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28085           0 :                                 return -1;
   28086             :                         }
   28087           0 :                         object->in.validation_level = test_var;
   28088             :                 } else {
   28089           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28090             :                           PyLong_Type.tp_name);
   28091           0 :                         return -1;
   28092             :                 }
   28093             :         }
   28094           0 :         return 0;
   28095             : }
   28096             : 
   28097           0 : static PyObject *py_netr_LogonSamLogon_out_get_validation(PyObject *obj, void *closure)
   28098             : {
   28099           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   28100           0 :         PyObject *py_validation;
   28101           0 :         if (object->out.validation == NULL) {
   28102           0 :                 Py_RETURN_NONE;
   28103             :         }
   28104           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
   28105           0 :         if (py_validation == NULL) {
   28106           0 :                 return NULL;
   28107             :         }
   28108           0 :         return py_validation;
   28109             : }
   28110             : 
   28111           0 : static int py_netr_LogonSamLogon_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   28112             : {
   28113           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28114           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   28115           0 :         if (value == NULL) {
   28116           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   28117           0 :                 return -1;
   28118             :         }
   28119           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   28120           0 :         if (object->out.validation == NULL) {
   28121           0 :                 PyErr_NoMemory();
   28122           0 :                 return -1;
   28123             :         }
   28124             :         {
   28125           0 :                 union netr_Validation *validation_switch_1;
   28126           0 :                 validation_switch_1 = (union netr_Validation *)pyrpc_export_union(&netr_Validation_Type, pytalloc_get_mem_ctx(py_obj), object->in.validation_level, value, "union netr_Validation");
   28127           0 :                 if (validation_switch_1 == NULL) {
   28128           0 :                         return -1;
   28129             :                 }
   28130           0 :                 object->out.validation = validation_switch_1;
   28131             :         }
   28132           0 :         return 0;
   28133             : }
   28134             : 
   28135           0 : static PyObject *py_netr_LogonSamLogon_out_get_authoritative(PyObject *obj, void *closure)
   28136             : {
   28137           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   28138           0 :         PyObject *py_authoritative;
   28139           0 :         if (object->out.authoritative == NULL) {
   28140           0 :                 Py_RETURN_NONE;
   28141             :         }
   28142           0 :         py_authoritative = PyLong_FromLong((uint16_t)*object->out.authoritative);
   28143           0 :         return py_authoritative;
   28144             : }
   28145             : 
   28146           0 : static int py_netr_LogonSamLogon_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   28147             : {
   28148           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28149           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   28150           0 :         if (value == NULL) {
   28151           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   28152           0 :                 return -1;
   28153             :         }
   28154           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   28155           0 :         if (object->out.authoritative == NULL) {
   28156           0 :                 PyErr_NoMemory();
   28157           0 :                 return -1;
   28158             :         }
   28159             :         {
   28160           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   28161           0 :                 if (PyLong_Check(value)) {
   28162           0 :                         unsigned long long test_var;
   28163           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28164           0 :                         if (PyErr_Occurred() != NULL) {
   28165           0 :                                 return -1;
   28166             :                         }
   28167           0 :                         if (test_var > uint_max) {
   28168           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28169             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28170           0 :                                 return -1;
   28171             :                         }
   28172           0 :                         *object->out.authoritative = test_var;
   28173             :                 } else {
   28174           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28175             :                           PyLong_Type.tp_name);
   28176           0 :                         return -1;
   28177             :                 }
   28178             :         }
   28179           0 :         return 0;
   28180             : }
   28181             : 
   28182           0 : static PyObject *py_netr_LogonSamLogon_get_result(PyObject *obj, void *closure)
   28183             : {
   28184           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   28185           0 :         PyObject *py_result;
   28186           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   28187           0 :         return py_result;
   28188             : }
   28189             : 
   28190           0 : static int py_netr_LogonSamLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
   28191             : {
   28192           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28193           0 :         if (value == NULL) {
   28194           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   28195           0 :                 return -1;
   28196             :         }
   28197           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   28198           0 :         return 0;
   28199             : }
   28200             : 
   28201             : static PyGetSetDef py_netr_LogonSamLogon_getsetters[] = {
   28202             :         {
   28203             :                 .name = discard_const_p(char, "in_server_name"),
   28204             :                 .get = py_netr_LogonSamLogon_in_get_server_name,
   28205             :                 .set = py_netr_LogonSamLogon_in_set_server_name,
   28206             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28207             :         },
   28208             :         {
   28209             :                 .name = discard_const_p(char, "in_computer_name"),
   28210             :                 .get = py_netr_LogonSamLogon_in_get_computer_name,
   28211             :                 .set = py_netr_LogonSamLogon_in_set_computer_name,
   28212             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28213             :         },
   28214             :         {
   28215             :                 .name = discard_const_p(char, "in_credential"),
   28216             :                 .get = py_netr_LogonSamLogon_in_get_credential,
   28217             :                 .set = py_netr_LogonSamLogon_in_set_credential,
   28218             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   28219             :         },
   28220             :         {
   28221             :                 .name = discard_const_p(char, "in_return_authenticator"),
   28222             :                 .get = py_netr_LogonSamLogon_in_get_return_authenticator,
   28223             :                 .set = py_netr_LogonSamLogon_in_set_return_authenticator,
   28224             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   28225             :         },
   28226             :         {
   28227             :                 .name = discard_const_p(char, "out_return_authenticator"),
   28228             :                 .get = py_netr_LogonSamLogon_out_get_return_authenticator,
   28229             :                 .set = py_netr_LogonSamLogon_out_set_return_authenticator,
   28230             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   28231             :         },
   28232             :         {
   28233             :                 .name = discard_const_p(char, "in_logon_level"),
   28234             :                 .get = py_netr_LogonSamLogon_in_get_logon_level,
   28235             :                 .set = py_netr_LogonSamLogon_in_set_logon_level,
   28236             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   28237             :         },
   28238             :         {
   28239             :                 .name = discard_const_p(char, "in_logon"),
   28240             :                 .get = py_netr_LogonSamLogon_in_get_logon,
   28241             :                 .set = py_netr_LogonSamLogon_in_set_logon,
   28242             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   28243             :         },
   28244             :         {
   28245             :                 .name = discard_const_p(char, "in_validation_level"),
   28246             :                 .get = py_netr_LogonSamLogon_in_get_validation_level,
   28247             :                 .set = py_netr_LogonSamLogon_in_set_validation_level,
   28248             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28249             :         },
   28250             :         {
   28251             :                 .name = discard_const_p(char, "out_validation"),
   28252             :                 .get = py_netr_LogonSamLogon_out_get_validation,
   28253             :                 .set = py_netr_LogonSamLogon_out_set_validation,
   28254             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   28255             :         },
   28256             :         {
   28257             :                 .name = discard_const_p(char, "out_authoritative"),
   28258             :                 .get = py_netr_LogonSamLogon_out_get_authoritative,
   28259             :                 .set = py_netr_LogonSamLogon_out_set_authoritative,
   28260             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   28261             :         },
   28262             :         {
   28263             :                 .name = discard_const_p(char, "result"),
   28264             :                 .get = py_netr_LogonSamLogon_get_result,
   28265             :                 .set = py_netr_LogonSamLogon_set_result,
   28266             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   28267             :         },
   28268             :         { .name = NULL }
   28269             : };
   28270             : 
   28271           0 : static PyObject *py_netr_LogonSamLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28272             : {
   28273           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogon, type);
   28274           0 :         struct netr_LogonSamLogon *_self = (struct netr_LogonSamLogon *)pytalloc_get_ptr(self);
   28275           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   28276           0 :         _self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
   28277           0 :         _self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
   28278           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   28279           0 :         return self;
   28280             : }
   28281             : 
   28282           0 : static PyObject *py_netr_LogonSamLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   28283             : {
   28284             : 
   28285             : 
   28286           0 :         return PyLong_FromLong(2);
   28287             : }
   28288             : 
   28289           0 : static PyObject *py_netr_LogonSamLogon_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   28290             : {
   28291           0 :         const struct ndr_interface_call *call = NULL;
   28292           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28293           0 :         PyObject *ret = NULL;
   28294           0 :         struct ndr_push *push = NULL;
   28295           0 :         DATA_BLOB blob;
   28296           0 :         enum ndr_err_code err;
   28297             : 
   28298           0 :         if (ndr_table_netlogon.num_calls < 3) {
   28299           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_pack");
   28300           0 :                 return NULL;
   28301             :         }
   28302           0 :         call = &ndr_table_netlogon.calls[2];
   28303             : 
   28304           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   28305           0 :         if (push == NULL) {
   28306           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   28307           0 :                 return NULL;
   28308             :         }
   28309             : 
   28310           0 :         push->flags |= ndr_push_flags;
   28311             : 
   28312           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   28313           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   28314           0 :                 TALLOC_FREE(push);
   28315           0 :                 PyErr_SetNdrError(err);
   28316           0 :                 return NULL;
   28317             :         }
   28318           0 :         blob = ndr_push_blob(push);
   28319           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   28320           0 :         TALLOC_FREE(push);
   28321           0 :         return ret;
   28322             : }
   28323             : 
   28324           0 : static PyObject *py_netr_LogonSamLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28325             : {
   28326           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   28327           0 :         PyObject *bigendian_obj = NULL;
   28328           0 :         PyObject *ndr64_obj = NULL;
   28329           0 :         libndr_flags ndr_push_flags = 0;
   28330             : 
   28331           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   28332             :                 discard_const_p(char *, kwnames),
   28333             :                 &bigendian_obj,
   28334             :                 &ndr64_obj)) {
   28335           0 :                 return NULL;
   28336             :         }
   28337             : 
   28338           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28339           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   28340             :         }
   28341           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28342           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   28343             :         }
   28344             : 
   28345           0 :         return py_netr_LogonSamLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   28346             : }
   28347             : 
   28348           0 : static PyObject *py_netr_LogonSamLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28349             : {
   28350           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   28351           0 :         PyObject *bigendian_obj = NULL;
   28352           0 :         PyObject *ndr64_obj = NULL;
   28353           0 :         libndr_flags ndr_push_flags = 0;
   28354             : 
   28355           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   28356             :                 discard_const_p(char *, kwnames),
   28357             :                 &bigendian_obj,
   28358             :                 &ndr64_obj)) {
   28359           0 :                 return NULL;
   28360             :         }
   28361             : 
   28362           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28363           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   28364             :         }
   28365           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28366           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   28367             :         }
   28368             : 
   28369           0 :         return py_netr_LogonSamLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   28370             : }
   28371             : 
   28372           0 : static PyObject *py_netr_LogonSamLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   28373             : {
   28374           0 :         const struct ndr_interface_call *call = NULL;
   28375           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28376           0 :         struct ndr_pull *pull = NULL;
   28377           0 :         enum ndr_err_code err;
   28378             : 
   28379           0 :         if (ndr_table_netlogon.num_calls < 3) {
   28380           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_unpack");
   28381           0 :                 return NULL;
   28382             :         }
   28383           0 :         call = &ndr_table_netlogon.calls[2];
   28384             : 
   28385           0 :         pull = ndr_pull_init_blob(blob, object);
   28386           0 :         if (pull == NULL) {
   28387           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   28388           0 :                 return NULL;
   28389             :         }
   28390             : 
   28391           0 :         pull->flags |= ndr_pull_flags;
   28392             : 
   28393           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   28394           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   28395           0 :                 TALLOC_FREE(pull);
   28396           0 :                 PyErr_SetNdrError(err);
   28397           0 :                 return NULL;
   28398             :         }
   28399           0 :         if (!allow_remaining) {
   28400           0 :                 uint32_t highest_ofs;
   28401             : 
   28402           0 :                 if (pull->offset > pull->relative_highest_offset) {
   28403           0 :                         highest_ofs = pull->offset;
   28404             :                 } else {
   28405           0 :                         highest_ofs = pull->relative_highest_offset;
   28406             :                 }
   28407           0 :                 if (highest_ofs < pull->data_size) {
   28408           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   28409             :                                 "not all bytes consumed ofs[%u] size[%u]",
   28410             :                                 highest_ofs, pull->data_size);
   28411           0 :                         TALLOC_FREE(pull);
   28412           0 :                         PyErr_SetNdrError(err);
   28413           0 :                         return NULL;
   28414             :                 }
   28415             :         }
   28416             : 
   28417           0 :         TALLOC_FREE(pull);
   28418           0 :         Py_RETURN_NONE;
   28419             : }
   28420             : 
   28421           0 : static PyObject *py_netr_LogonSamLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28422             : {
   28423           0 :         DATA_BLOB blob;
   28424           0 :         Py_ssize_t blob_length = 0;
   28425           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   28426           0 :         PyObject *bigendian_obj = NULL;
   28427           0 :         PyObject *ndr64_obj = NULL;
   28428           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   28429           0 :         PyObject *allow_remaining_obj = NULL;
   28430           0 :         bool allow_remaining = false;
   28431             : 
   28432           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   28433             :                 discard_const_p(char *, kwnames),
   28434             :                 &blob.data, &blob_length,
   28435             :                 &bigendian_obj,
   28436             :                 &ndr64_obj,
   28437             :                 &allow_remaining_obj)) {
   28438           0 :                 return NULL;
   28439             :         }
   28440           0 :         blob.length = blob_length;
   28441             : 
   28442           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28443           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   28444             :         }
   28445           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28446           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   28447             :         }
   28448             : 
   28449           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   28450           0 :                 allow_remaining = true;
   28451             :         }
   28452             : 
   28453           0 :         return py_netr_LogonSamLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   28454             : }
   28455             : 
   28456           0 : static PyObject *py_netr_LogonSamLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28457             : {
   28458           0 :         DATA_BLOB blob;
   28459           0 :         Py_ssize_t blob_length = 0;
   28460           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   28461           0 :         PyObject *bigendian_obj = NULL;
   28462           0 :         PyObject *ndr64_obj = NULL;
   28463           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   28464           0 :         PyObject *allow_remaining_obj = NULL;
   28465           0 :         bool allow_remaining = false;
   28466             : 
   28467           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   28468             :                 discard_const_p(char *, kwnames),
   28469             :                 &blob.data, &blob_length,
   28470             :                 &bigendian_obj,
   28471             :                 &ndr64_obj,
   28472             :                 &allow_remaining_obj)) {
   28473           0 :                 return NULL;
   28474             :         }
   28475           0 :         blob.length = blob_length;
   28476             : 
   28477           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28478           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   28479             :         }
   28480           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28481           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   28482             :         }
   28483             : 
   28484           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   28485           0 :                 allow_remaining = true;
   28486             :         }
   28487             : 
   28488           0 :         return py_netr_LogonSamLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   28489             : }
   28490             : 
   28491           0 : static PyObject *py_netr_LogonSamLogon_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   28492             : {
   28493           0 :         const struct ndr_interface_call *call = NULL;
   28494           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28495           0 :         PyObject *ret;
   28496           0 :         char *retstr;
   28497             : 
   28498           0 :         if (ndr_table_netlogon.num_calls < 3) {
   28499           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_print");
   28500           0 :                 return NULL;
   28501             :         }
   28502           0 :         call = &ndr_table_netlogon.calls[2];
   28503             : 
   28504           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   28505           0 :         ret = PyUnicode_FromString(retstr);
   28506           0 :         TALLOC_FREE(retstr);
   28507             : 
   28508           0 :         return ret;
   28509             : }
   28510             : 
   28511           0 : static PyObject *py_netr_LogonSamLogon_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   28512             : {
   28513           0 :         return py_netr_LogonSamLogon_ndr_print(py_obj, "netr_LogonSamLogon_in", NDR_IN);
   28514             : }
   28515             : 
   28516           0 : static PyObject *py_netr_LogonSamLogon_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   28517             : {
   28518           0 :         return py_netr_LogonSamLogon_ndr_print(py_obj, "netr_LogonSamLogon_out", NDR_OUT);
   28519             : }
   28520             : 
   28521             : static PyMethodDef py_netr_LogonSamLogon_methods[] = {
   28522             :         { "opnum", (PyCFunction)py_netr_LogonSamLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
   28523             :                 "netlogon.netr_LogonSamLogon.opnum() -> 2 (0x02) " },
   28524             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   28525             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   28526             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   28527             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   28528             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   28529             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   28530             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   28531             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   28532             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogon_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   28533             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogon_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   28534             :         { NULL, NULL, 0, NULL }
   28535             : };
   28536             : 
   28537             : 
   28538             : static PyTypeObject netr_LogonSamLogon_Type = {
   28539             :         PyVarObject_HEAD_INIT(NULL, 0)
   28540             :         .tp_name = "netlogon.netr_LogonSamLogon",
   28541             :         .tp_getset = py_netr_LogonSamLogon_getsetters,
   28542             :         .tp_methods = py_netr_LogonSamLogon_methods,
   28543             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28544             :         .tp_new = py_netr_LogonSamLogon_new,
   28545             : };
   28546             : 
   28547           0 : static bool pack_py_netr_LogonSamLogon_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogon *r)
   28548             : {
   28549           0 :         PyObject *py_server_name;
   28550           0 :         PyObject *py_computer_name;
   28551           0 :         PyObject *py_credential;
   28552           0 :         PyObject *py_return_authenticator;
   28553           0 :         PyObject *py_logon_level;
   28554           0 :         PyObject *py_logon;
   28555           0 :         PyObject *py_validation_level;
   28556           0 :         const char *kwnames[] = {
   28557             :                 "server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", "validation_level", NULL
   28558             :         };
   28559             : 
   28560           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:netr_LogonSamLogon", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_logon_level, &py_logon, &py_validation_level)) {
   28561           0 :                 return false;
   28562             :         }
   28563             : 
   28564           0 :         if (py_server_name == NULL) {
   28565           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   28566           0 :                 return false;
   28567             :         }
   28568           0 :         if (py_server_name == Py_None) {
   28569           0 :                 r->in.server_name = NULL;
   28570             :         } else {
   28571           0 :                 r->in.server_name = NULL;
   28572             :                 {
   28573           0 :                         const char *test_str;
   28574           0 :                         const char *talloc_str;
   28575           0 :                         PyObject *unicode = NULL;
   28576           0 :                         if (PyUnicode_Check(py_server_name)) {
   28577           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   28578           0 :                                 if (unicode == NULL) {
   28579           0 :                                         PyErr_NoMemory();
   28580           0 :                                         return false;
   28581             :                                 }
   28582           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28583           0 :                         } else if (PyBytes_Check(py_server_name)) {
   28584           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   28585             :                         } else {
   28586           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   28587           0 :                                 return false;
   28588             :                         }
   28589           0 :                         talloc_str = talloc_strdup(r, test_str);
   28590           0 :                         if (unicode != NULL) {
   28591           0 :                                 Py_DECREF(unicode);
   28592             :                         }
   28593           0 :                         if (talloc_str == NULL) {
   28594           0 :                                 PyErr_NoMemory();
   28595           0 :                                 return false;
   28596             :                         }
   28597           0 :                         r->in.server_name = talloc_str;
   28598             :                 }
   28599             :         }
   28600           0 :         if (py_computer_name == NULL) {
   28601           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   28602           0 :                 return false;
   28603             :         }
   28604           0 :         if (py_computer_name == Py_None) {
   28605           0 :                 r->in.computer_name = NULL;
   28606             :         } else {
   28607           0 :                 r->in.computer_name = NULL;
   28608             :                 {
   28609           0 :                         const char *test_str;
   28610           0 :                         const char *talloc_str;
   28611           0 :                         PyObject *unicode = NULL;
   28612           0 :                         if (PyUnicode_Check(py_computer_name)) {
   28613           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   28614           0 :                                 if (unicode == NULL) {
   28615           0 :                                         PyErr_NoMemory();
   28616           0 :                                         return false;
   28617             :                                 }
   28618           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28619           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   28620           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   28621             :                         } else {
   28622           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   28623           0 :                                 return false;
   28624             :                         }
   28625           0 :                         talloc_str = talloc_strdup(r, test_str);
   28626           0 :                         if (unicode != NULL) {
   28627           0 :                                 Py_DECREF(unicode);
   28628             :                         }
   28629           0 :                         if (talloc_str == NULL) {
   28630           0 :                                 PyErr_NoMemory();
   28631           0 :                                 return false;
   28632             :                         }
   28633           0 :                         r->in.computer_name = talloc_str;
   28634             :                 }
   28635             :         }
   28636           0 :         if (py_credential == NULL) {
   28637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   28638           0 :                 return false;
   28639             :         }
   28640           0 :         if (py_credential == Py_None) {
   28641           0 :                 r->in.credential = NULL;
   28642             :         } else {
   28643           0 :                 r->in.credential = NULL;
   28644           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   28645           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   28646           0 :                         PyErr_NoMemory();
   28647           0 :                         return false;
   28648             :                 }
   28649           0 :                 r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   28650             :         }
   28651           0 :         if (py_return_authenticator == NULL) {
   28652           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   28653           0 :                 return false;
   28654             :         }
   28655           0 :         if (py_return_authenticator == Py_None) {
   28656           0 :                 r->in.return_authenticator = NULL;
   28657             :         } else {
   28658           0 :                 r->in.return_authenticator = NULL;
   28659           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   28660           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   28661           0 :                         PyErr_NoMemory();
   28662           0 :                         return false;
   28663             :                 }
   28664           0 :                 r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   28665             :         }
   28666           0 :         if (py_logon_level == NULL) {
   28667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   28668           0 :                 return false;
   28669             :         }
   28670             :         {
   28671           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   28672           0 :                 if (PyLong_Check(py_logon_level)) {
   28673           0 :                         unsigned long long test_var;
   28674           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   28675           0 :                         if (PyErr_Occurred() != NULL) {
   28676           0 :                                 return false;
   28677             :                         }
   28678           0 :                         if (test_var > uint_max) {
   28679           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28680             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28681           0 :                                 return false;
   28682             :                         }
   28683           0 :                         r->in.logon_level = test_var;
   28684             :                 } else {
   28685           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28686             :                           PyLong_Type.tp_name);
   28687           0 :                         return false;
   28688             :                 }
   28689             :         }
   28690           0 :         if (py_logon == NULL) {
   28691           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   28692           0 :                 return false;
   28693             :         }
   28694           0 :         r->in.logon = talloc_ptrtype(r, r->in.logon);
   28695           0 :         if (r->in.logon == NULL) {
   28696           0 :                 PyErr_NoMemory();
   28697           0 :                 return false;
   28698             :         }
   28699             :         {
   28700           0 :                 union netr_LogonLevel *logon_switch_1;
   28701           0 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   28702           0 :                 if (logon_switch_1 == NULL) {
   28703           0 :                         return false;
   28704             :                 }
   28705           0 :                 r->in.logon = logon_switch_1;
   28706             :         }
   28707           0 :         if (py_validation_level == NULL) {
   28708           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.validation_level");
   28709           0 :                 return false;
   28710             :         }
   28711             :         {
   28712           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   28713           0 :                 if (PyLong_Check(py_validation_level)) {
   28714           0 :                         unsigned long long test_var;
   28715           0 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   28716           0 :                         if (PyErr_Occurred() != NULL) {
   28717           0 :                                 return false;
   28718             :                         }
   28719           0 :                         if (test_var > uint_max) {
   28720           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28721             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28722           0 :                                 return false;
   28723             :                         }
   28724           0 :                         r->in.validation_level = test_var;
   28725             :                 } else {
   28726           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28727             :                           PyLong_Type.tp_name);
   28728           0 :                         return false;
   28729             :                 }
   28730             :         }
   28731           0 :         return true;
   28732             : }
   28733             : 
   28734           0 : static PyObject *unpack_py_netr_LogonSamLogon_args_out(struct netr_LogonSamLogon *r)
   28735             : {
   28736           0 :         PyObject *result;
   28737           0 :         PyObject *py_return_authenticator;
   28738           0 :         PyObject *py_validation;
   28739           0 :         PyObject *py_authoritative;
   28740           0 :         result = PyTuple_New(3);
   28741           0 :         if (r->out.return_authenticator == NULL) {
   28742           0 :                 py_return_authenticator = Py_None;
   28743           0 :                 Py_INCREF(py_return_authenticator);
   28744             :         } else {
   28745           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   28746             :         }
   28747           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   28748           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
   28749           0 :         if (py_validation == NULL) {
   28750           0 :                 return NULL;
   28751             :         }
   28752           0 :         PyTuple_SetItem(result, 1, py_validation);
   28753           0 :         py_authoritative = PyLong_FromLong((uint16_t)*r->out.authoritative);
   28754           0 :         PyTuple_SetItem(result, 2, py_authoritative);
   28755           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   28756           0 :                 PyErr_SetNTSTATUS(r->out.result);
   28757           0 :                 return NULL;
   28758             :         }
   28759             : 
   28760           0 :         return result;
   28761             : }
   28762             : 
   28763             : 
   28764           0 : static PyObject *py_netr_LogonSamLogoff_in_get_server_name(PyObject *obj, void *closure)
   28765             : {
   28766           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28767           0 :         PyObject *py_server_name;
   28768           0 :         if (object->in.server_name == NULL) {
   28769           0 :                 Py_RETURN_NONE;
   28770             :         }
   28771           0 :         if (object->in.server_name == NULL) {
   28772           0 :                 py_server_name = Py_None;
   28773           0 :                 Py_INCREF(py_server_name);
   28774             :         } else {
   28775           0 :                 if (object->in.server_name == NULL) {
   28776           0 :                         py_server_name = Py_None;
   28777           0 :                         Py_INCREF(py_server_name);
   28778             :                 } else {
   28779           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   28780             :                 }
   28781             :         }
   28782           0 :         return py_server_name;
   28783             : }
   28784             : 
   28785           0 : static int py_netr_LogonSamLogoff_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   28786             : {
   28787           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28788           0 :         if (value == NULL) {
   28789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   28790           0 :                 return -1;
   28791             :         }
   28792           0 :         if (value == Py_None) {
   28793           0 :                 object->in.server_name = NULL;
   28794             :         } else {
   28795           0 :                 object->in.server_name = NULL;
   28796             :                 {
   28797           0 :                         const char *test_str;
   28798           0 :                         const char *talloc_str;
   28799           0 :                         PyObject *unicode = NULL;
   28800           0 :                         if (PyUnicode_Check(value)) {
   28801           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28802           0 :                                 if (unicode == NULL) {
   28803           0 :                                         PyErr_NoMemory();
   28804           0 :                                         return -1;
   28805             :                                 }
   28806           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28807           0 :                         } else if (PyBytes_Check(value)) {
   28808           0 :                                 test_str = PyBytes_AS_STRING(value);
   28809             :                         } else {
   28810           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28811           0 :                                 return -1;
   28812             :                         }
   28813           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28814           0 :                         if (unicode != NULL) {
   28815           0 :                                 Py_DECREF(unicode);
   28816             :                         }
   28817           0 :                         if (talloc_str == NULL) {
   28818           0 :                                 PyErr_NoMemory();
   28819           0 :                                 return -1;
   28820             :                         }
   28821           0 :                         object->in.server_name = talloc_str;
   28822             :                 }
   28823             :         }
   28824           0 :         return 0;
   28825             : }
   28826             : 
   28827           0 : static PyObject *py_netr_LogonSamLogoff_in_get_computer_name(PyObject *obj, void *closure)
   28828             : {
   28829           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28830           0 :         PyObject *py_computer_name;
   28831           0 :         if (object->in.computer_name == NULL) {
   28832           0 :                 Py_RETURN_NONE;
   28833             :         }
   28834           0 :         if (object->in.computer_name == NULL) {
   28835           0 :                 py_computer_name = Py_None;
   28836           0 :                 Py_INCREF(py_computer_name);
   28837             :         } else {
   28838           0 :                 if (object->in.computer_name == NULL) {
   28839           0 :                         py_computer_name = Py_None;
   28840           0 :                         Py_INCREF(py_computer_name);
   28841             :                 } else {
   28842           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   28843             :                 }
   28844             :         }
   28845           0 :         return py_computer_name;
   28846             : }
   28847             : 
   28848           0 : static int py_netr_LogonSamLogoff_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   28849             : {
   28850           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28851           0 :         if (value == NULL) {
   28852           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   28853           0 :                 return -1;
   28854             :         }
   28855           0 :         if (value == Py_None) {
   28856           0 :                 object->in.computer_name = NULL;
   28857             :         } else {
   28858           0 :                 object->in.computer_name = NULL;
   28859             :                 {
   28860           0 :                         const char *test_str;
   28861           0 :                         const char *talloc_str;
   28862           0 :                         PyObject *unicode = NULL;
   28863           0 :                         if (PyUnicode_Check(value)) {
   28864           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28865           0 :                                 if (unicode == NULL) {
   28866           0 :                                         PyErr_NoMemory();
   28867           0 :                                         return -1;
   28868             :                                 }
   28869           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28870           0 :                         } else if (PyBytes_Check(value)) {
   28871           0 :                                 test_str = PyBytes_AS_STRING(value);
   28872             :                         } else {
   28873           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28874           0 :                                 return -1;
   28875             :                         }
   28876           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28877           0 :                         if (unicode != NULL) {
   28878           0 :                                 Py_DECREF(unicode);
   28879             :                         }
   28880           0 :                         if (talloc_str == NULL) {
   28881           0 :                                 PyErr_NoMemory();
   28882           0 :                                 return -1;
   28883             :                         }
   28884           0 :                         object->in.computer_name = talloc_str;
   28885             :                 }
   28886             :         }
   28887           0 :         return 0;
   28888             : }
   28889             : 
   28890           0 : static PyObject *py_netr_LogonSamLogoff_in_get_credential(PyObject *obj, void *closure)
   28891             : {
   28892           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28893           0 :         PyObject *py_credential;
   28894           0 :         if (object->in.credential == NULL) {
   28895           0 :                 Py_RETURN_NONE;
   28896             :         }
   28897           0 :         if (object->in.credential == NULL) {
   28898           0 :                 py_credential = Py_None;
   28899           0 :                 Py_INCREF(py_credential);
   28900             :         } else {
   28901           0 :                 py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   28902             :         }
   28903           0 :         return py_credential;
   28904             : }
   28905             : 
   28906           0 : static int py_netr_LogonSamLogoff_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   28907             : {
   28908           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28909           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   28910           0 :         if (value == NULL) {
   28911           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   28912           0 :                 return -1;
   28913             :         }
   28914           0 :         if (value == Py_None) {
   28915           0 :                 object->in.credential = NULL;
   28916             :         } else {
   28917           0 :                 object->in.credential = NULL;
   28918           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   28919           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28920           0 :                         PyErr_NoMemory();
   28921           0 :                         return -1;
   28922             :                 }
   28923           0 :                 object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   28924             :         }
   28925           0 :         return 0;
   28926             : }
   28927             : 
   28928           0 : static PyObject *py_netr_LogonSamLogoff_in_get_return_authenticator(PyObject *obj, void *closure)
   28929             : {
   28930           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28931           0 :         PyObject *py_return_authenticator;
   28932           0 :         if (object->in.return_authenticator == NULL) {
   28933           0 :                 Py_RETURN_NONE;
   28934             :         }
   28935           0 :         if (object->in.return_authenticator == NULL) {
   28936           0 :                 py_return_authenticator = Py_None;
   28937           0 :                 Py_INCREF(py_return_authenticator);
   28938             :         } else {
   28939           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   28940             :         }
   28941           0 :         return py_return_authenticator;
   28942             : }
   28943             : 
   28944           0 : static int py_netr_LogonSamLogoff_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   28945             : {
   28946           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28947           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   28948           0 :         if (value == NULL) {
   28949           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   28950           0 :                 return -1;
   28951             :         }
   28952           0 :         if (value == Py_None) {
   28953           0 :                 object->in.return_authenticator = NULL;
   28954             :         } else {
   28955           0 :                 object->in.return_authenticator = NULL;
   28956           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   28957           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28958           0 :                         PyErr_NoMemory();
   28959           0 :                         return -1;
   28960             :                 }
   28961           0 :                 object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   28962             :         }
   28963           0 :         return 0;
   28964             : }
   28965             : 
   28966           0 : static PyObject *py_netr_LogonSamLogoff_out_get_return_authenticator(PyObject *obj, void *closure)
   28967             : {
   28968           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28969           0 :         PyObject *py_return_authenticator;
   28970           0 :         if (object->out.return_authenticator == NULL) {
   28971           0 :                 Py_RETURN_NONE;
   28972             :         }
   28973           0 :         if (object->out.return_authenticator == NULL) {
   28974           0 :                 py_return_authenticator = Py_None;
   28975           0 :                 Py_INCREF(py_return_authenticator);
   28976             :         } else {
   28977           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   28978             :         }
   28979           0 :         return py_return_authenticator;
   28980             : }
   28981             : 
   28982           0 : static int py_netr_LogonSamLogoff_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   28983             : {
   28984           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28985           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   28986           0 :         if (value == NULL) {
   28987           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   28988           0 :                 return -1;
   28989             :         }
   28990           0 :         if (value == Py_None) {
   28991           0 :                 object->out.return_authenticator = NULL;
   28992             :         } else {
   28993           0 :                 object->out.return_authenticator = NULL;
   28994           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   28995           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28996           0 :                         PyErr_NoMemory();
   28997           0 :                         return -1;
   28998             :                 }
   28999           0 :                 object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   29000             :         }
   29001           0 :         return 0;
   29002             : }
   29003             : 
   29004           0 : static PyObject *py_netr_LogonSamLogoff_in_get_logon_level(PyObject *obj, void *closure)
   29005             : {
   29006           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   29007           0 :         PyObject *py_logon_level;
   29008           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   29009           0 :         return py_logon_level;
   29010             : }
   29011             : 
   29012           0 : static int py_netr_LogonSamLogoff_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   29013             : {
   29014           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   29015           0 :         if (value == NULL) {
   29016           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   29017           0 :                 return -1;
   29018             :         }
   29019             :         {
   29020           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   29021           0 :                 if (PyLong_Check(value)) {
   29022           0 :                         unsigned long long test_var;
   29023           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29024           0 :                         if (PyErr_Occurred() != NULL) {
   29025           0 :                                 return -1;
   29026             :                         }
   29027           0 :                         if (test_var > uint_max) {
   29028           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29029             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29030           0 :                                 return -1;
   29031             :                         }
   29032           0 :                         object->in.logon_level = test_var;
   29033             :                 } else {
   29034           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29035             :                           PyLong_Type.tp_name);
   29036           0 :                         return -1;
   29037             :                 }
   29038             :         }
   29039           0 :         return 0;
   29040             : }
   29041             : 
   29042           0 : static PyObject *py_netr_LogonSamLogoff_in_get_logon(PyObject *obj, void *closure)
   29043             : {
   29044           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   29045           0 :         PyObject *py_logon;
   29046           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(obj), object->in.logon_level, &object->in.logon, "union netr_LogonLevel");
   29047           0 :         if (py_logon == NULL) {
   29048           0 :                 return NULL;
   29049             :         }
   29050           0 :         return py_logon;
   29051             : }
   29052             : 
   29053           0 : static int py_netr_LogonSamLogoff_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   29054             : {
   29055           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   29056           0 :         if (value == NULL) {
   29057           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   29058           0 :                 return -1;
   29059             :         }
   29060             :         {
   29061           0 :                 union netr_LogonLevel *logon_switch_0;
   29062           0 :                 logon_switch_0 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(py_obj), object->in.logon_level, value, "union netr_LogonLevel");
   29063           0 :                 if (logon_switch_0 == NULL) {
   29064           0 :                         return -1;
   29065             :                 }
   29066           0 :                 object->in.logon = *logon_switch_0;
   29067             :         }
   29068           0 :         return 0;
   29069             : }
   29070             : 
   29071           0 : static PyObject *py_netr_LogonSamLogoff_get_result(PyObject *obj, void *closure)
   29072             : {
   29073           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   29074           0 :         PyObject *py_result;
   29075           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   29076           0 :         return py_result;
   29077             : }
   29078             : 
   29079           0 : static int py_netr_LogonSamLogoff_set_result(PyObject *py_obj, PyObject *value, void *closure)
   29080             : {
   29081           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   29082           0 :         if (value == NULL) {
   29083           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   29084           0 :                 return -1;
   29085             :         }
   29086           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   29087           0 :         return 0;
   29088             : }
   29089             : 
   29090             : static PyGetSetDef py_netr_LogonSamLogoff_getsetters[] = {
   29091             :         {
   29092             :                 .name = discard_const_p(char, "in_server_name"),
   29093             :                 .get = py_netr_LogonSamLogoff_in_get_server_name,
   29094             :                 .set = py_netr_LogonSamLogoff_in_set_server_name,
   29095             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29096             :         },
   29097             :         {
   29098             :                 .name = discard_const_p(char, "in_computer_name"),
   29099             :                 .get = py_netr_LogonSamLogoff_in_get_computer_name,
   29100             :                 .set = py_netr_LogonSamLogoff_in_set_computer_name,
   29101             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29102             :         },
   29103             :         {
   29104             :                 .name = discard_const_p(char, "in_credential"),
   29105             :                 .get = py_netr_LogonSamLogoff_in_get_credential,
   29106             :                 .set = py_netr_LogonSamLogoff_in_set_credential,
   29107             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   29108             :         },
   29109             :         {
   29110             :                 .name = discard_const_p(char, "in_return_authenticator"),
   29111             :                 .get = py_netr_LogonSamLogoff_in_get_return_authenticator,
   29112             :                 .set = py_netr_LogonSamLogoff_in_set_return_authenticator,
   29113             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   29114             :         },
   29115             :         {
   29116             :                 .name = discard_const_p(char, "out_return_authenticator"),
   29117             :                 .get = py_netr_LogonSamLogoff_out_get_return_authenticator,
   29118             :                 .set = py_netr_LogonSamLogoff_out_set_return_authenticator,
   29119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   29120             :         },
   29121             :         {
   29122             :                 .name = discard_const_p(char, "in_logon_level"),
   29123             :                 .get = py_netr_LogonSamLogoff_in_get_logon_level,
   29124             :                 .set = py_netr_LogonSamLogoff_in_set_logon_level,
   29125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   29126             :         },
   29127             :         {
   29128             :                 .name = discard_const_p(char, "in_logon"),
   29129             :                 .get = py_netr_LogonSamLogoff_in_get_logon,
   29130             :                 .set = py_netr_LogonSamLogoff_in_set_logon,
   29131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   29132             :         },
   29133             :         {
   29134             :                 .name = discard_const_p(char, "result"),
   29135             :                 .get = py_netr_LogonSamLogoff_get_result,
   29136             :                 .set = py_netr_LogonSamLogoff_set_result,
   29137             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   29138             :         },
   29139             :         { .name = NULL }
   29140             : };
   29141             : 
   29142           0 : static PyObject *py_netr_LogonSamLogoff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29143             : {
   29144           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogoff, type);
   29145           0 :         return self;
   29146             : }
   29147             : 
   29148           0 : static PyObject *py_netr_LogonSamLogoff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   29149             : {
   29150             : 
   29151             : 
   29152           0 :         return PyLong_FromLong(3);
   29153             : }
   29154             : 
   29155           0 : static PyObject *py_netr_LogonSamLogoff_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   29156             : {
   29157           0 :         const struct ndr_interface_call *call = NULL;
   29158           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   29159           0 :         PyObject *ret = NULL;
   29160           0 :         struct ndr_push *push = NULL;
   29161           0 :         DATA_BLOB blob;
   29162           0 :         enum ndr_err_code err;
   29163             : 
   29164           0 :         if (ndr_table_netlogon.num_calls < 4) {
   29165           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_pack");
   29166           0 :                 return NULL;
   29167             :         }
   29168           0 :         call = &ndr_table_netlogon.calls[3];
   29169             : 
   29170           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   29171           0 :         if (push == NULL) {
   29172           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29173           0 :                 return NULL;
   29174             :         }
   29175             : 
   29176           0 :         push->flags |= ndr_push_flags;
   29177             : 
   29178           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   29179           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29180           0 :                 TALLOC_FREE(push);
   29181           0 :                 PyErr_SetNdrError(err);
   29182           0 :                 return NULL;
   29183             :         }
   29184           0 :         blob = ndr_push_blob(push);
   29185           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   29186           0 :         TALLOC_FREE(push);
   29187           0 :         return ret;
   29188             : }
   29189             : 
   29190           0 : static PyObject *py_netr_LogonSamLogoff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29191             : {
   29192           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29193           0 :         PyObject *bigendian_obj = NULL;
   29194           0 :         PyObject *ndr64_obj = NULL;
   29195           0 :         libndr_flags ndr_push_flags = 0;
   29196             : 
   29197           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   29198             :                 discard_const_p(char *, kwnames),
   29199             :                 &bigendian_obj,
   29200             :                 &ndr64_obj)) {
   29201           0 :                 return NULL;
   29202             :         }
   29203             : 
   29204           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29205           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29206             :         }
   29207           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29208           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29209             :         }
   29210             : 
   29211           0 :         return py_netr_LogonSamLogoff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   29212             : }
   29213             : 
   29214           0 : static PyObject *py_netr_LogonSamLogoff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29215             : {
   29216           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29217           0 :         PyObject *bigendian_obj = NULL;
   29218           0 :         PyObject *ndr64_obj = NULL;
   29219           0 :         libndr_flags ndr_push_flags = 0;
   29220             : 
   29221           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   29222             :                 discard_const_p(char *, kwnames),
   29223             :                 &bigendian_obj,
   29224             :                 &ndr64_obj)) {
   29225           0 :                 return NULL;
   29226             :         }
   29227             : 
   29228           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29229           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29230             :         }
   29231           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29232           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29233             :         }
   29234             : 
   29235           0 :         return py_netr_LogonSamLogoff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   29236             : }
   29237             : 
   29238           0 : static PyObject *py_netr_LogonSamLogoff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   29239             : {
   29240           0 :         const struct ndr_interface_call *call = NULL;
   29241           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   29242           0 :         struct ndr_pull *pull = NULL;
   29243           0 :         enum ndr_err_code err;
   29244             : 
   29245           0 :         if (ndr_table_netlogon.num_calls < 4) {
   29246           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_unpack");
   29247           0 :                 return NULL;
   29248             :         }
   29249           0 :         call = &ndr_table_netlogon.calls[3];
   29250             : 
   29251           0 :         pull = ndr_pull_init_blob(blob, object);
   29252           0 :         if (pull == NULL) {
   29253           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29254           0 :                 return NULL;
   29255             :         }
   29256             : 
   29257           0 :         pull->flags |= ndr_pull_flags;
   29258             : 
   29259           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   29260           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29261           0 :                 TALLOC_FREE(pull);
   29262           0 :                 PyErr_SetNdrError(err);
   29263           0 :                 return NULL;
   29264             :         }
   29265           0 :         if (!allow_remaining) {
   29266           0 :                 uint32_t highest_ofs;
   29267             : 
   29268           0 :                 if (pull->offset > pull->relative_highest_offset) {
   29269           0 :                         highest_ofs = pull->offset;
   29270             :                 } else {
   29271           0 :                         highest_ofs = pull->relative_highest_offset;
   29272             :                 }
   29273           0 :                 if (highest_ofs < pull->data_size) {
   29274           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   29275             :                                 "not all bytes consumed ofs[%u] size[%u]",
   29276             :                                 highest_ofs, pull->data_size);
   29277           0 :                         TALLOC_FREE(pull);
   29278           0 :                         PyErr_SetNdrError(err);
   29279           0 :                         return NULL;
   29280             :                 }
   29281             :         }
   29282             : 
   29283           0 :         TALLOC_FREE(pull);
   29284           0 :         Py_RETURN_NONE;
   29285             : }
   29286             : 
   29287           0 : static PyObject *py_netr_LogonSamLogoff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29288             : {
   29289           0 :         DATA_BLOB blob;
   29290           0 :         Py_ssize_t blob_length = 0;
   29291           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   29292           0 :         PyObject *bigendian_obj = NULL;
   29293           0 :         PyObject *ndr64_obj = NULL;
   29294           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   29295           0 :         PyObject *allow_remaining_obj = NULL;
   29296           0 :         bool allow_remaining = false;
   29297             : 
   29298           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   29299             :                 discard_const_p(char *, kwnames),
   29300             :                 &blob.data, &blob_length,
   29301             :                 &bigendian_obj,
   29302             :                 &ndr64_obj,
   29303             :                 &allow_remaining_obj)) {
   29304           0 :                 return NULL;
   29305             :         }
   29306           0 :         blob.length = blob_length;
   29307             : 
   29308           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29309           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   29310             :         }
   29311           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29312           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   29313             :         }
   29314             : 
   29315           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   29316           0 :                 allow_remaining = true;
   29317             :         }
   29318             : 
   29319           0 :         return py_netr_LogonSamLogoff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   29320             : }
   29321             : 
   29322           0 : static PyObject *py_netr_LogonSamLogoff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29323             : {
   29324           0 :         DATA_BLOB blob;
   29325           0 :         Py_ssize_t blob_length = 0;
   29326           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   29327           0 :         PyObject *bigendian_obj = NULL;
   29328           0 :         PyObject *ndr64_obj = NULL;
   29329           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   29330           0 :         PyObject *allow_remaining_obj = NULL;
   29331           0 :         bool allow_remaining = false;
   29332             : 
   29333           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   29334             :                 discard_const_p(char *, kwnames),
   29335             :                 &blob.data, &blob_length,
   29336             :                 &bigendian_obj,
   29337             :                 &ndr64_obj,
   29338             :                 &allow_remaining_obj)) {
   29339           0 :                 return NULL;
   29340             :         }
   29341           0 :         blob.length = blob_length;
   29342             : 
   29343           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29344           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   29345             :         }
   29346           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29347           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   29348             :         }
   29349             : 
   29350           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   29351           0 :                 allow_remaining = true;
   29352             :         }
   29353             : 
   29354           0 :         return py_netr_LogonSamLogoff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   29355             : }
   29356             : 
   29357           0 : static PyObject *py_netr_LogonSamLogoff_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   29358             : {
   29359           0 :         const struct ndr_interface_call *call = NULL;
   29360           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   29361           0 :         PyObject *ret;
   29362           0 :         char *retstr;
   29363             : 
   29364           0 :         if (ndr_table_netlogon.num_calls < 4) {
   29365           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_print");
   29366           0 :                 return NULL;
   29367             :         }
   29368           0 :         call = &ndr_table_netlogon.calls[3];
   29369             : 
   29370           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   29371           0 :         ret = PyUnicode_FromString(retstr);
   29372           0 :         TALLOC_FREE(retstr);
   29373             : 
   29374           0 :         return ret;
   29375             : }
   29376             : 
   29377           0 : static PyObject *py_netr_LogonSamLogoff_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   29378             : {
   29379           0 :         return py_netr_LogonSamLogoff_ndr_print(py_obj, "netr_LogonSamLogoff_in", NDR_IN);
   29380             : }
   29381             : 
   29382           0 : static PyObject *py_netr_LogonSamLogoff_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   29383             : {
   29384           0 :         return py_netr_LogonSamLogoff_ndr_print(py_obj, "netr_LogonSamLogoff_out", NDR_OUT);
   29385             : }
   29386             : 
   29387             : static PyMethodDef py_netr_LogonSamLogoff_methods[] = {
   29388             :         { "opnum", (PyCFunction)py_netr_LogonSamLogoff_ndr_opnum, METH_NOARGS|METH_CLASS,
   29389             :                 "netlogon.netr_LogonSamLogoff.opnum() -> 3 (0x03) " },
   29390             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   29391             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   29392             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   29393             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   29394             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   29395             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   29396             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   29397             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   29398             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogoff_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   29399             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogoff_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   29400             :         { NULL, NULL, 0, NULL }
   29401             : };
   29402             : 
   29403             : 
   29404             : static PyTypeObject netr_LogonSamLogoff_Type = {
   29405             :         PyVarObject_HEAD_INIT(NULL, 0)
   29406             :         .tp_name = "netlogon.netr_LogonSamLogoff",
   29407             :         .tp_getset = py_netr_LogonSamLogoff_getsetters,
   29408             :         .tp_methods = py_netr_LogonSamLogoff_methods,
   29409             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29410             :         .tp_new = py_netr_LogonSamLogoff_new,
   29411             : };
   29412             : 
   29413           0 : static bool pack_py_netr_LogonSamLogoff_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogoff *r)
   29414             : {
   29415           0 :         PyObject *py_server_name;
   29416           0 :         PyObject *py_computer_name;
   29417           0 :         PyObject *py_credential;
   29418           0 :         PyObject *py_return_authenticator;
   29419           0 :         PyObject *py_logon_level;
   29420           0 :         PyObject *py_logon;
   29421           0 :         const char *kwnames[] = {
   29422             :                 "server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", NULL
   29423             :         };
   29424             : 
   29425           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_LogonSamLogoff", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_logon_level, &py_logon)) {
   29426           0 :                 return false;
   29427             :         }
   29428             : 
   29429           0 :         if (py_server_name == NULL) {
   29430           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   29431           0 :                 return false;
   29432             :         }
   29433           0 :         if (py_server_name == Py_None) {
   29434           0 :                 r->in.server_name = NULL;
   29435             :         } else {
   29436           0 :                 r->in.server_name = NULL;
   29437             :                 {
   29438           0 :                         const char *test_str;
   29439           0 :                         const char *talloc_str;
   29440           0 :                         PyObject *unicode = NULL;
   29441           0 :                         if (PyUnicode_Check(py_server_name)) {
   29442           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   29443           0 :                                 if (unicode == NULL) {
   29444           0 :                                         PyErr_NoMemory();
   29445           0 :                                         return false;
   29446             :                                 }
   29447           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29448           0 :                         } else if (PyBytes_Check(py_server_name)) {
   29449           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   29450             :                         } else {
   29451           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   29452           0 :                                 return false;
   29453             :                         }
   29454           0 :                         talloc_str = talloc_strdup(r, test_str);
   29455           0 :                         if (unicode != NULL) {
   29456           0 :                                 Py_DECREF(unicode);
   29457             :                         }
   29458           0 :                         if (talloc_str == NULL) {
   29459           0 :                                 PyErr_NoMemory();
   29460           0 :                                 return false;
   29461             :                         }
   29462           0 :                         r->in.server_name = talloc_str;
   29463             :                 }
   29464             :         }
   29465           0 :         if (py_computer_name == NULL) {
   29466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   29467           0 :                 return false;
   29468             :         }
   29469           0 :         if (py_computer_name == Py_None) {
   29470           0 :                 r->in.computer_name = NULL;
   29471             :         } else {
   29472           0 :                 r->in.computer_name = NULL;
   29473             :                 {
   29474           0 :                         const char *test_str;
   29475           0 :                         const char *talloc_str;
   29476           0 :                         PyObject *unicode = NULL;
   29477           0 :                         if (PyUnicode_Check(py_computer_name)) {
   29478           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   29479           0 :                                 if (unicode == NULL) {
   29480           0 :                                         PyErr_NoMemory();
   29481           0 :                                         return false;
   29482             :                                 }
   29483           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29484           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   29485           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   29486             :                         } else {
   29487           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   29488           0 :                                 return false;
   29489             :                         }
   29490           0 :                         talloc_str = talloc_strdup(r, test_str);
   29491           0 :                         if (unicode != NULL) {
   29492           0 :                                 Py_DECREF(unicode);
   29493             :                         }
   29494           0 :                         if (talloc_str == NULL) {
   29495           0 :                                 PyErr_NoMemory();
   29496           0 :                                 return false;
   29497             :                         }
   29498           0 :                         r->in.computer_name = talloc_str;
   29499             :                 }
   29500             :         }
   29501           0 :         if (py_credential == NULL) {
   29502           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   29503           0 :                 return false;
   29504             :         }
   29505           0 :         if (py_credential == Py_None) {
   29506           0 :                 r->in.credential = NULL;
   29507             :         } else {
   29508           0 :                 r->in.credential = NULL;
   29509           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   29510           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   29511           0 :                         PyErr_NoMemory();
   29512           0 :                         return false;
   29513             :                 }
   29514           0 :                 r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   29515             :         }
   29516           0 :         if (py_return_authenticator == NULL) {
   29517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   29518           0 :                 return false;
   29519             :         }
   29520           0 :         if (py_return_authenticator == Py_None) {
   29521           0 :                 r->in.return_authenticator = NULL;
   29522             :         } else {
   29523           0 :                 r->in.return_authenticator = NULL;
   29524           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   29525           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   29526           0 :                         PyErr_NoMemory();
   29527           0 :                         return false;
   29528             :                 }
   29529           0 :                 r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   29530             :         }
   29531           0 :         if (py_logon_level == NULL) {
   29532           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   29533           0 :                 return false;
   29534             :         }
   29535             :         {
   29536           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   29537           0 :                 if (PyLong_Check(py_logon_level)) {
   29538           0 :                         unsigned long long test_var;
   29539           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   29540           0 :                         if (PyErr_Occurred() != NULL) {
   29541           0 :                                 return false;
   29542             :                         }
   29543           0 :                         if (test_var > uint_max) {
   29544           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29545             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29546           0 :                                 return false;
   29547             :                         }
   29548           0 :                         r->in.logon_level = test_var;
   29549             :                 } else {
   29550           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29551             :                           PyLong_Type.tp_name);
   29552           0 :                         return false;
   29553             :                 }
   29554             :         }
   29555           0 :         if (py_logon == NULL) {
   29556           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   29557           0 :                 return false;
   29558             :         }
   29559             :         {
   29560           0 :                 union netr_LogonLevel *logon_switch_0;
   29561           0 :                 logon_switch_0 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   29562           0 :                 if (logon_switch_0 == NULL) {
   29563           0 :                         return false;
   29564             :                 }
   29565           0 :                 r->in.logon = *logon_switch_0;
   29566             :         }
   29567           0 :         return true;
   29568             : }
   29569             : 
   29570           0 : static PyObject *unpack_py_netr_LogonSamLogoff_args_out(struct netr_LogonSamLogoff *r)
   29571             : {
   29572           0 :         PyObject *result;
   29573           0 :         PyObject *py_return_authenticator;
   29574           0 :         if (r->out.return_authenticator == NULL) {
   29575           0 :                 py_return_authenticator = Py_None;
   29576           0 :                 Py_INCREF(py_return_authenticator);
   29577             :         } else {
   29578           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   29579             :         }
   29580           0 :         result = py_return_authenticator;
   29581           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   29582           0 :                 PyErr_SetNTSTATUS(r->out.result);
   29583           0 :                 return NULL;
   29584             :         }
   29585             : 
   29586           0 :         return result;
   29587             : }
   29588             : 
   29589             : 
   29590           0 : static PyObject *py_netr_ServerReqChallenge_in_get_server_name(PyObject *obj, void *closure)
   29591             : {
   29592           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29593           0 :         PyObject *py_server_name;
   29594           0 :         if (object->in.server_name == NULL) {
   29595           0 :                 Py_RETURN_NONE;
   29596             :         }
   29597           0 :         if (object->in.server_name == NULL) {
   29598           0 :                 py_server_name = Py_None;
   29599           0 :                 Py_INCREF(py_server_name);
   29600             :         } else {
   29601           0 :                 if (object->in.server_name == NULL) {
   29602           0 :                         py_server_name = Py_None;
   29603           0 :                         Py_INCREF(py_server_name);
   29604             :                 } else {
   29605           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   29606             :                 }
   29607             :         }
   29608           0 :         return py_server_name;
   29609             : }
   29610             : 
   29611           0 : static int py_netr_ServerReqChallenge_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   29612             : {
   29613           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29614           0 :         if (value == NULL) {
   29615           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   29616           0 :                 return -1;
   29617             :         }
   29618           0 :         if (value == Py_None) {
   29619           0 :                 object->in.server_name = NULL;
   29620             :         } else {
   29621           0 :                 object->in.server_name = NULL;
   29622             :                 {
   29623           0 :                         const char *test_str;
   29624           0 :                         const char *talloc_str;
   29625           0 :                         PyObject *unicode = NULL;
   29626           0 :                         if (PyUnicode_Check(value)) {
   29627           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29628           0 :                                 if (unicode == NULL) {
   29629           0 :                                         PyErr_NoMemory();
   29630           0 :                                         return -1;
   29631             :                                 }
   29632           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29633           0 :                         } else if (PyBytes_Check(value)) {
   29634           0 :                                 test_str = PyBytes_AS_STRING(value);
   29635             :                         } else {
   29636           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29637           0 :                                 return -1;
   29638             :                         }
   29639           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29640           0 :                         if (unicode != NULL) {
   29641           0 :                                 Py_DECREF(unicode);
   29642             :                         }
   29643           0 :                         if (talloc_str == NULL) {
   29644           0 :                                 PyErr_NoMemory();
   29645           0 :                                 return -1;
   29646             :                         }
   29647           0 :                         object->in.server_name = talloc_str;
   29648             :                 }
   29649             :         }
   29650           0 :         return 0;
   29651             : }
   29652             : 
   29653           0 : static PyObject *py_netr_ServerReqChallenge_in_get_computer_name(PyObject *obj, void *closure)
   29654             : {
   29655           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29656           0 :         PyObject *py_computer_name;
   29657           0 :         if (object->in.computer_name == NULL) {
   29658           0 :                 Py_RETURN_NONE;
   29659             :         }
   29660           0 :         if (object->in.computer_name == NULL) {
   29661           0 :                 py_computer_name = Py_None;
   29662           0 :                 Py_INCREF(py_computer_name);
   29663             :         } else {
   29664           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   29665             :         }
   29666           0 :         return py_computer_name;
   29667             : }
   29668             : 
   29669           0 : static int py_netr_ServerReqChallenge_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   29670             : {
   29671           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29672           0 :         if (value == NULL) {
   29673           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   29674           0 :                 return -1;
   29675             :         }
   29676           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   29677           0 :         if (object->in.computer_name == NULL) {
   29678           0 :                 PyErr_NoMemory();
   29679           0 :                 return -1;
   29680             :         }
   29681             :         {
   29682           0 :                 const char *test_str;
   29683           0 :                 const char *talloc_str;
   29684           0 :                 PyObject *unicode = NULL;
   29685           0 :                 if (PyUnicode_Check(value)) {
   29686           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29687           0 :                         if (unicode == NULL) {
   29688           0 :                                 PyErr_NoMemory();
   29689           0 :                                 return -1;
   29690             :                         }
   29691           0 :                         test_str = PyBytes_AS_STRING(unicode);
   29692           0 :                 } else if (PyBytes_Check(value)) {
   29693           0 :                         test_str = PyBytes_AS_STRING(value);
   29694             :                 } else {
   29695           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29696           0 :                         return -1;
   29697             :                 }
   29698           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29699           0 :                 if (unicode != NULL) {
   29700           0 :                         Py_DECREF(unicode);
   29701             :                 }
   29702           0 :                 if (talloc_str == NULL) {
   29703           0 :                         PyErr_NoMemory();
   29704           0 :                         return -1;
   29705             :                 }
   29706           0 :                 object->in.computer_name = talloc_str;
   29707             :         }
   29708           0 :         return 0;
   29709             : }
   29710             : 
   29711           0 : static PyObject *py_netr_ServerReqChallenge_in_get_credentials(PyObject *obj, void *closure)
   29712             : {
   29713           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29714           0 :         PyObject *py_credentials;
   29715           0 :         if (object->in.credentials == NULL) {
   29716           0 :                 Py_RETURN_NONE;
   29717             :         }
   29718           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   29719           0 :         return py_credentials;
   29720             : }
   29721             : 
   29722           0 : static int py_netr_ServerReqChallenge_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   29723             : {
   29724           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29725           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   29726           0 :         if (value == NULL) {
   29727           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credentials");
   29728           0 :                 return -1;
   29729             :         }
   29730           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   29731           0 :         if (object->in.credentials == NULL) {
   29732           0 :                 PyErr_NoMemory();
   29733           0 :                 return -1;
   29734             :         }
   29735           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   29736           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29737           0 :                 PyErr_NoMemory();
   29738           0 :                 return -1;
   29739             :         }
   29740           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   29741           0 :         return 0;
   29742             : }
   29743             : 
   29744           0 : static PyObject *py_netr_ServerReqChallenge_out_get_return_credentials(PyObject *obj, void *closure)
   29745             : {
   29746           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29747           0 :         PyObject *py_return_credentials;
   29748           0 :         if (object->out.return_credentials == NULL) {
   29749           0 :                 Py_RETURN_NONE;
   29750             :         }
   29751           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   29752           0 :         return py_return_credentials;
   29753             : }
   29754             : 
   29755           0 : static int py_netr_ServerReqChallenge_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   29756             : {
   29757           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29758           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   29759           0 :         if (value == NULL) {
   29760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_credentials");
   29761           0 :                 return -1;
   29762             :         }
   29763           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   29764           0 :         if (object->out.return_credentials == NULL) {
   29765           0 :                 PyErr_NoMemory();
   29766           0 :                 return -1;
   29767             :         }
   29768           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   29769           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29770           0 :                 PyErr_NoMemory();
   29771           0 :                 return -1;
   29772             :         }
   29773           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   29774           0 :         return 0;
   29775             : }
   29776             : 
   29777           0 : static PyObject *py_netr_ServerReqChallenge_get_result(PyObject *obj, void *closure)
   29778             : {
   29779           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29780           0 :         PyObject *py_result;
   29781           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   29782           0 :         return py_result;
   29783             : }
   29784             : 
   29785           0 : static int py_netr_ServerReqChallenge_set_result(PyObject *py_obj, PyObject *value, void *closure)
   29786             : {
   29787           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29788           0 :         if (value == NULL) {
   29789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   29790           0 :                 return -1;
   29791             :         }
   29792           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   29793           0 :         return 0;
   29794             : }
   29795             : 
   29796             : static PyGetSetDef py_netr_ServerReqChallenge_getsetters[] = {
   29797             :         {
   29798             :                 .name = discard_const_p(char, "in_server_name"),
   29799             :                 .get = py_netr_ServerReqChallenge_in_get_server_name,
   29800             :                 .set = py_netr_ServerReqChallenge_in_set_server_name,
   29801             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29802             :         },
   29803             :         {
   29804             :                 .name = discard_const_p(char, "in_computer_name"),
   29805             :                 .get = py_netr_ServerReqChallenge_in_get_computer_name,
   29806             :                 .set = py_netr_ServerReqChallenge_in_set_computer_name,
   29807             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29808             :         },
   29809             :         {
   29810             :                 .name = discard_const_p(char, "in_credentials"),
   29811             :                 .get = py_netr_ServerReqChallenge_in_get_credentials,
   29812             :                 .set = py_netr_ServerReqChallenge_in_set_credentials,
   29813             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   29814             :         },
   29815             :         {
   29816             :                 .name = discard_const_p(char, "out_return_credentials"),
   29817             :                 .get = py_netr_ServerReqChallenge_out_get_return_credentials,
   29818             :                 .set = py_netr_ServerReqChallenge_out_set_return_credentials,
   29819             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   29820             :         },
   29821             :         {
   29822             :                 .name = discard_const_p(char, "result"),
   29823             :                 .get = py_netr_ServerReqChallenge_get_result,
   29824             :                 .set = py_netr_ServerReqChallenge_set_result,
   29825             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   29826             :         },
   29827             :         { .name = NULL }
   29828             : };
   29829             : 
   29830           0 : static PyObject *py_netr_ServerReqChallenge_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29831             : {
   29832           0 :         PyObject *self = pytalloc_new(struct netr_ServerReqChallenge, type);
   29833           0 :         struct netr_ServerReqChallenge *_self = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(self);
   29834           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   29835           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   29836           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   29837           0 :         return self;
   29838             : }
   29839             : 
   29840           0 : static PyObject *py_netr_ServerReqChallenge_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   29841             : {
   29842             : 
   29843             : 
   29844           0 :         return PyLong_FromLong(4);
   29845             : }
   29846             : 
   29847           0 : static PyObject *py_netr_ServerReqChallenge_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   29848             : {
   29849           0 :         const struct ndr_interface_call *call = NULL;
   29850           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29851           0 :         PyObject *ret = NULL;
   29852           0 :         struct ndr_push *push = NULL;
   29853           0 :         DATA_BLOB blob;
   29854           0 :         enum ndr_err_code err;
   29855             : 
   29856           0 :         if (ndr_table_netlogon.num_calls < 5) {
   29857           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_pack");
   29858           0 :                 return NULL;
   29859             :         }
   29860           0 :         call = &ndr_table_netlogon.calls[4];
   29861             : 
   29862           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   29863           0 :         if (push == NULL) {
   29864           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29865           0 :                 return NULL;
   29866             :         }
   29867             : 
   29868           0 :         push->flags |= ndr_push_flags;
   29869             : 
   29870           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   29871           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29872           0 :                 TALLOC_FREE(push);
   29873           0 :                 PyErr_SetNdrError(err);
   29874           0 :                 return NULL;
   29875             :         }
   29876           0 :         blob = ndr_push_blob(push);
   29877           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   29878           0 :         TALLOC_FREE(push);
   29879           0 :         return ret;
   29880             : }
   29881             : 
   29882           0 : static PyObject *py_netr_ServerReqChallenge_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29883             : {
   29884           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29885           0 :         PyObject *bigendian_obj = NULL;
   29886           0 :         PyObject *ndr64_obj = NULL;
   29887           0 :         libndr_flags ndr_push_flags = 0;
   29888             : 
   29889           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   29890             :                 discard_const_p(char *, kwnames),
   29891             :                 &bigendian_obj,
   29892             :                 &ndr64_obj)) {
   29893           0 :                 return NULL;
   29894             :         }
   29895             : 
   29896           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29897           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29898             :         }
   29899           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29900           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29901             :         }
   29902             : 
   29903           0 :         return py_netr_ServerReqChallenge_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   29904             : }
   29905             : 
   29906           0 : static PyObject *py_netr_ServerReqChallenge_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29907             : {
   29908           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29909           0 :         PyObject *bigendian_obj = NULL;
   29910           0 :         PyObject *ndr64_obj = NULL;
   29911           0 :         libndr_flags ndr_push_flags = 0;
   29912             : 
   29913           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   29914             :                 discard_const_p(char *, kwnames),
   29915             :                 &bigendian_obj,
   29916             :                 &ndr64_obj)) {
   29917           0 :                 return NULL;
   29918             :         }
   29919             : 
   29920           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29921           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29922             :         }
   29923           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29924           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29925             :         }
   29926             : 
   29927           0 :         return py_netr_ServerReqChallenge_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   29928             : }
   29929             : 
   29930           0 : static PyObject *py_netr_ServerReqChallenge_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   29931             : {
   29932           0 :         const struct ndr_interface_call *call = NULL;
   29933           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29934           0 :         struct ndr_pull *pull = NULL;
   29935           0 :         enum ndr_err_code err;
   29936             : 
   29937           0 :         if (ndr_table_netlogon.num_calls < 5) {
   29938           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_unpack");
   29939           0 :                 return NULL;
   29940             :         }
   29941           0 :         call = &ndr_table_netlogon.calls[4];
   29942             : 
   29943           0 :         pull = ndr_pull_init_blob(blob, object);
   29944           0 :         if (pull == NULL) {
   29945           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29946           0 :                 return NULL;
   29947             :         }
   29948             : 
   29949           0 :         pull->flags |= ndr_pull_flags;
   29950             : 
   29951           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   29952           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29953           0 :                 TALLOC_FREE(pull);
   29954           0 :                 PyErr_SetNdrError(err);
   29955           0 :                 return NULL;
   29956             :         }
   29957           0 :         if (!allow_remaining) {
   29958           0 :                 uint32_t highest_ofs;
   29959             : 
   29960           0 :                 if (pull->offset > pull->relative_highest_offset) {
   29961           0 :                         highest_ofs = pull->offset;
   29962             :                 } else {
   29963           0 :                         highest_ofs = pull->relative_highest_offset;
   29964             :                 }
   29965           0 :                 if (highest_ofs < pull->data_size) {
   29966           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   29967             :                                 "not all bytes consumed ofs[%u] size[%u]",
   29968             :                                 highest_ofs, pull->data_size);
   29969           0 :                         TALLOC_FREE(pull);
   29970           0 :                         PyErr_SetNdrError(err);
   29971           0 :                         return NULL;
   29972             :                 }
   29973             :         }
   29974             : 
   29975           0 :         TALLOC_FREE(pull);
   29976           0 :         Py_RETURN_NONE;
   29977             : }
   29978             : 
   29979           0 : static PyObject *py_netr_ServerReqChallenge_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29980             : {
   29981           0 :         DATA_BLOB blob;
   29982           0 :         Py_ssize_t blob_length = 0;
   29983           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   29984           0 :         PyObject *bigendian_obj = NULL;
   29985           0 :         PyObject *ndr64_obj = NULL;
   29986           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   29987           0 :         PyObject *allow_remaining_obj = NULL;
   29988           0 :         bool allow_remaining = false;
   29989             : 
   29990           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   29991             :                 discard_const_p(char *, kwnames),
   29992             :                 &blob.data, &blob_length,
   29993             :                 &bigendian_obj,
   29994             :                 &ndr64_obj,
   29995             :                 &allow_remaining_obj)) {
   29996           0 :                 return NULL;
   29997             :         }
   29998           0 :         blob.length = blob_length;
   29999             : 
   30000           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30001           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30002             :         }
   30003           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30004           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30005             :         }
   30006             : 
   30007           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30008           0 :                 allow_remaining = true;
   30009             :         }
   30010             : 
   30011           0 :         return py_netr_ServerReqChallenge_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   30012             : }
   30013             : 
   30014           0 : static PyObject *py_netr_ServerReqChallenge_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30015             : {
   30016           0 :         DATA_BLOB blob;
   30017           0 :         Py_ssize_t blob_length = 0;
   30018           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30019           0 :         PyObject *bigendian_obj = NULL;
   30020           0 :         PyObject *ndr64_obj = NULL;
   30021           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30022           0 :         PyObject *allow_remaining_obj = NULL;
   30023           0 :         bool allow_remaining = false;
   30024             : 
   30025           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   30026             :                 discard_const_p(char *, kwnames),
   30027             :                 &blob.data, &blob_length,
   30028             :                 &bigendian_obj,
   30029             :                 &ndr64_obj,
   30030             :                 &allow_remaining_obj)) {
   30031           0 :                 return NULL;
   30032             :         }
   30033           0 :         blob.length = blob_length;
   30034             : 
   30035           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30036           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30037             :         }
   30038           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30039           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30040             :         }
   30041             : 
   30042           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30043           0 :                 allow_remaining = true;
   30044             :         }
   30045             : 
   30046           0 :         return py_netr_ServerReqChallenge_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   30047             : }
   30048             : 
   30049           0 : static PyObject *py_netr_ServerReqChallenge_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   30050             : {
   30051           0 :         const struct ndr_interface_call *call = NULL;
   30052           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   30053           0 :         PyObject *ret;
   30054           0 :         char *retstr;
   30055             : 
   30056           0 :         if (ndr_table_netlogon.num_calls < 5) {
   30057           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_print");
   30058           0 :                 return NULL;
   30059             :         }
   30060           0 :         call = &ndr_table_netlogon.calls[4];
   30061             : 
   30062           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   30063           0 :         ret = PyUnicode_FromString(retstr);
   30064           0 :         TALLOC_FREE(retstr);
   30065             : 
   30066           0 :         return ret;
   30067             : }
   30068             : 
   30069           0 : static PyObject *py_netr_ServerReqChallenge_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30070             : {
   30071           0 :         return py_netr_ServerReqChallenge_ndr_print(py_obj, "netr_ServerReqChallenge_in", NDR_IN);
   30072             : }
   30073             : 
   30074           0 : static PyObject *py_netr_ServerReqChallenge_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30075             : {
   30076           0 :         return py_netr_ServerReqChallenge_ndr_print(py_obj, "netr_ServerReqChallenge_out", NDR_OUT);
   30077             : }
   30078             : 
   30079             : static PyMethodDef py_netr_ServerReqChallenge_methods[] = {
   30080             :         { "opnum", (PyCFunction)py_netr_ServerReqChallenge_ndr_opnum, METH_NOARGS|METH_CLASS,
   30081             :                 "netlogon.netr_ServerReqChallenge.opnum() -> 4 (0x04) " },
   30082             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   30083             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   30084             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   30085             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   30086             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   30087             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   30088             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   30089             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   30090             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerReqChallenge_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   30091             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerReqChallenge_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   30092             :         { NULL, NULL, 0, NULL }
   30093             : };
   30094             : 
   30095             : 
   30096             : static PyTypeObject netr_ServerReqChallenge_Type = {
   30097             :         PyVarObject_HEAD_INIT(NULL, 0)
   30098             :         .tp_name = "netlogon.netr_ServerReqChallenge",
   30099             :         .tp_getset = py_netr_ServerReqChallenge_getsetters,
   30100             :         .tp_methods = py_netr_ServerReqChallenge_methods,
   30101             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30102             :         .tp_new = py_netr_ServerReqChallenge_new,
   30103             : };
   30104             : 
   30105           4 : static bool pack_py_netr_ServerReqChallenge_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerReqChallenge *r)
   30106             : {
   30107           0 :         PyObject *py_server_name;
   30108           0 :         PyObject *py_computer_name;
   30109           0 :         PyObject *py_credentials;
   30110           4 :         const char *kwnames[] = {
   30111             :                 "server_name", "computer_name", "credentials", NULL
   30112             :         };
   30113             : 
   30114           4 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_ServerReqChallenge", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credentials)) {
   30115           0 :                 return false;
   30116             :         }
   30117             : 
   30118           4 :         if (py_server_name == NULL) {
   30119           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   30120           0 :                 return false;
   30121             :         }
   30122           4 :         if (py_server_name == Py_None) {
   30123           0 :                 r->in.server_name = NULL;
   30124             :         } else {
   30125           4 :                 r->in.server_name = NULL;
   30126             :                 {
   30127           0 :                         const char *test_str;
   30128           0 :                         const char *talloc_str;
   30129           4 :                         PyObject *unicode = NULL;
   30130           4 :                         if (PyUnicode_Check(py_server_name)) {
   30131           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   30132           4 :                                 if (unicode == NULL) {
   30133           0 :                                         PyErr_NoMemory();
   30134           0 :                                         return false;
   30135             :                                 }
   30136           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   30137           0 :                         } else if (PyBytes_Check(py_server_name)) {
   30138           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   30139             :                         } else {
   30140           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   30141           0 :                                 return false;
   30142             :                         }
   30143           4 :                         talloc_str = talloc_strdup(r, test_str);
   30144           4 :                         if (unicode != NULL) {
   30145           4 :                                 Py_DECREF(unicode);
   30146             :                         }
   30147           4 :                         if (talloc_str == NULL) {
   30148           0 :                                 PyErr_NoMemory();
   30149           0 :                                 return false;
   30150             :                         }
   30151           4 :                         r->in.server_name = talloc_str;
   30152             :                 }
   30153             :         }
   30154           4 :         if (py_computer_name == NULL) {
   30155           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   30156           0 :                 return false;
   30157             :         }
   30158           4 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   30159           4 :         if (r->in.computer_name == NULL) {
   30160           0 :                 PyErr_NoMemory();
   30161           0 :                 return false;
   30162             :         }
   30163             :         {
   30164           0 :                 const char *test_str;
   30165           0 :                 const char *talloc_str;
   30166           4 :                 PyObject *unicode = NULL;
   30167           4 :                 if (PyUnicode_Check(py_computer_name)) {
   30168           4 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   30169           4 :                         if (unicode == NULL) {
   30170           0 :                                 PyErr_NoMemory();
   30171           0 :                                 return false;
   30172             :                         }
   30173           4 :                         test_str = PyBytes_AS_STRING(unicode);
   30174           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   30175           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   30176             :                 } else {
   30177           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   30178           0 :                         return false;
   30179             :                 }
   30180           4 :                 talloc_str = talloc_strdup(r, test_str);
   30181           4 :                 if (unicode != NULL) {
   30182           4 :                         Py_DECREF(unicode);
   30183             :                 }
   30184           4 :                 if (talloc_str == NULL) {
   30185           0 :                         PyErr_NoMemory();
   30186           0 :                         return false;
   30187             :                 }
   30188           4 :                 r->in.computer_name = talloc_str;
   30189             :         }
   30190           4 :         if (py_credentials == NULL) {
   30191           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credentials");
   30192           0 :                 return false;
   30193             :         }
   30194           4 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   30195           4 :         if (r->in.credentials == NULL) {
   30196           0 :                 PyErr_NoMemory();
   30197           0 :                 return false;
   30198             :         }
   30199           4 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   30200           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   30201           0 :                 PyErr_NoMemory();
   30202           0 :                 return false;
   30203             :         }
   30204           4 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   30205           4 :         return true;
   30206             : }
   30207             : 
   30208           4 : static PyObject *unpack_py_netr_ServerReqChallenge_args_out(struct netr_ServerReqChallenge *r)
   30209             : {
   30210           0 :         PyObject *result;
   30211           0 :         PyObject *py_return_credentials;
   30212           4 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   30213           4 :         result = py_return_credentials;
   30214           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   30215           0 :                 PyErr_SetNTSTATUS(r->out.result);
   30216           0 :                 return NULL;
   30217             :         }
   30218             : 
   30219           4 :         return result;
   30220             : }
   30221             : 
   30222             : 
   30223           0 : static PyObject *py_netr_ServerAuthenticate_in_get_server_name(PyObject *obj, void *closure)
   30224             : {
   30225           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30226           0 :         PyObject *py_server_name;
   30227           0 :         if (object->in.server_name == NULL) {
   30228           0 :                 Py_RETURN_NONE;
   30229             :         }
   30230           0 :         if (object->in.server_name == NULL) {
   30231           0 :                 py_server_name = Py_None;
   30232           0 :                 Py_INCREF(py_server_name);
   30233             :         } else {
   30234           0 :                 if (object->in.server_name == NULL) {
   30235           0 :                         py_server_name = Py_None;
   30236           0 :                         Py_INCREF(py_server_name);
   30237             :                 } else {
   30238           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   30239             :                 }
   30240             :         }
   30241           0 :         return py_server_name;
   30242             : }
   30243             : 
   30244           0 : static int py_netr_ServerAuthenticate_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   30245             : {
   30246           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30247           0 :         if (value == NULL) {
   30248           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   30249           0 :                 return -1;
   30250             :         }
   30251           0 :         if (value == Py_None) {
   30252           0 :                 object->in.server_name = NULL;
   30253             :         } else {
   30254           0 :                 object->in.server_name = NULL;
   30255             :                 {
   30256           0 :                         const char *test_str;
   30257           0 :                         const char *talloc_str;
   30258           0 :                         PyObject *unicode = NULL;
   30259           0 :                         if (PyUnicode_Check(value)) {
   30260           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30261           0 :                                 if (unicode == NULL) {
   30262           0 :                                         PyErr_NoMemory();
   30263           0 :                                         return -1;
   30264             :                                 }
   30265           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30266           0 :                         } else if (PyBytes_Check(value)) {
   30267           0 :                                 test_str = PyBytes_AS_STRING(value);
   30268             :                         } else {
   30269           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30270           0 :                                 return -1;
   30271             :                         }
   30272           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30273           0 :                         if (unicode != NULL) {
   30274           0 :                                 Py_DECREF(unicode);
   30275             :                         }
   30276           0 :                         if (talloc_str == NULL) {
   30277           0 :                                 PyErr_NoMemory();
   30278           0 :                                 return -1;
   30279             :                         }
   30280           0 :                         object->in.server_name = talloc_str;
   30281             :                 }
   30282             :         }
   30283           0 :         return 0;
   30284             : }
   30285             : 
   30286           0 : static PyObject *py_netr_ServerAuthenticate_in_get_account_name(PyObject *obj, void *closure)
   30287             : {
   30288           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30289           0 :         PyObject *py_account_name;
   30290           0 :         if (object->in.account_name == NULL) {
   30291           0 :                 Py_RETURN_NONE;
   30292             :         }
   30293           0 :         if (object->in.account_name == NULL) {
   30294           0 :                 py_account_name = Py_None;
   30295           0 :                 Py_INCREF(py_account_name);
   30296             :         } else {
   30297           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   30298             :         }
   30299           0 :         return py_account_name;
   30300             : }
   30301             : 
   30302           0 : static int py_netr_ServerAuthenticate_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   30303             : {
   30304           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30305           0 :         if (value == NULL) {
   30306           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   30307           0 :                 return -1;
   30308             :         }
   30309           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   30310           0 :         if (object->in.account_name == NULL) {
   30311           0 :                 PyErr_NoMemory();
   30312           0 :                 return -1;
   30313             :         }
   30314             :         {
   30315           0 :                 const char *test_str;
   30316           0 :                 const char *talloc_str;
   30317           0 :                 PyObject *unicode = NULL;
   30318           0 :                 if (PyUnicode_Check(value)) {
   30319           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30320           0 :                         if (unicode == NULL) {
   30321           0 :                                 PyErr_NoMemory();
   30322           0 :                                 return -1;
   30323             :                         }
   30324           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30325           0 :                 } else if (PyBytes_Check(value)) {
   30326           0 :                         test_str = PyBytes_AS_STRING(value);
   30327             :                 } else {
   30328           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30329           0 :                         return -1;
   30330             :                 }
   30331           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30332           0 :                 if (unicode != NULL) {
   30333           0 :                         Py_DECREF(unicode);
   30334             :                 }
   30335           0 :                 if (talloc_str == NULL) {
   30336           0 :                         PyErr_NoMemory();
   30337           0 :                         return -1;
   30338             :                 }
   30339           0 :                 object->in.account_name = talloc_str;
   30340             :         }
   30341           0 :         return 0;
   30342             : }
   30343             : 
   30344           0 : static PyObject *py_netr_ServerAuthenticate_in_get_secure_channel_type(PyObject *obj, void *closure)
   30345             : {
   30346           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30347           0 :         PyObject *py_secure_channel_type;
   30348           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   30349           0 :         return py_secure_channel_type;
   30350             : }
   30351             : 
   30352           0 : static int py_netr_ServerAuthenticate_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   30353             : {
   30354           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30355           0 :         if (value == NULL) {
   30356           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   30357           0 :                 return -1;
   30358             :         }
   30359             :         {
   30360           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   30361           0 :                 if (PyLong_Check(value)) {
   30362           0 :                         unsigned long long test_var;
   30363           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30364           0 :                         if (PyErr_Occurred() != NULL) {
   30365           0 :                                 return -1;
   30366             :                         }
   30367           0 :                         if (test_var > uint_max) {
   30368           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30369             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30370           0 :                                 return -1;
   30371             :                         }
   30372           0 :                         object->in.secure_channel_type = test_var;
   30373             :                 } else {
   30374           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30375             :                           PyLong_Type.tp_name);
   30376           0 :                         return -1;
   30377             :                 }
   30378             :         }
   30379           0 :         return 0;
   30380             : }
   30381             : 
   30382           0 : static PyObject *py_netr_ServerAuthenticate_in_get_computer_name(PyObject *obj, void *closure)
   30383             : {
   30384           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30385           0 :         PyObject *py_computer_name;
   30386           0 :         if (object->in.computer_name == NULL) {
   30387           0 :                 Py_RETURN_NONE;
   30388             :         }
   30389           0 :         if (object->in.computer_name == NULL) {
   30390           0 :                 py_computer_name = Py_None;
   30391           0 :                 Py_INCREF(py_computer_name);
   30392             :         } else {
   30393           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   30394             :         }
   30395           0 :         return py_computer_name;
   30396             : }
   30397             : 
   30398           0 : static int py_netr_ServerAuthenticate_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   30399             : {
   30400           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30401           0 :         if (value == NULL) {
   30402           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   30403           0 :                 return -1;
   30404             :         }
   30405           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   30406           0 :         if (object->in.computer_name == NULL) {
   30407           0 :                 PyErr_NoMemory();
   30408           0 :                 return -1;
   30409             :         }
   30410             :         {
   30411           0 :                 const char *test_str;
   30412           0 :                 const char *talloc_str;
   30413           0 :                 PyObject *unicode = NULL;
   30414           0 :                 if (PyUnicode_Check(value)) {
   30415           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30416           0 :                         if (unicode == NULL) {
   30417           0 :                                 PyErr_NoMemory();
   30418           0 :                                 return -1;
   30419             :                         }
   30420           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30421           0 :                 } else if (PyBytes_Check(value)) {
   30422           0 :                         test_str = PyBytes_AS_STRING(value);
   30423             :                 } else {
   30424           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30425           0 :                         return -1;
   30426             :                 }
   30427           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30428           0 :                 if (unicode != NULL) {
   30429           0 :                         Py_DECREF(unicode);
   30430             :                 }
   30431           0 :                 if (talloc_str == NULL) {
   30432           0 :                         PyErr_NoMemory();
   30433           0 :                         return -1;
   30434             :                 }
   30435           0 :                 object->in.computer_name = talloc_str;
   30436             :         }
   30437           0 :         return 0;
   30438             : }
   30439             : 
   30440           0 : static PyObject *py_netr_ServerAuthenticate_in_get_credentials(PyObject *obj, void *closure)
   30441             : {
   30442           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30443           0 :         PyObject *py_credentials;
   30444           0 :         if (object->in.credentials == NULL) {
   30445           0 :                 Py_RETURN_NONE;
   30446             :         }
   30447           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   30448           0 :         return py_credentials;
   30449             : }
   30450             : 
   30451           0 : static int py_netr_ServerAuthenticate_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   30452             : {
   30453           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30454           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   30455           0 :         if (value == NULL) {
   30456           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credentials");
   30457           0 :                 return -1;
   30458             :         }
   30459           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   30460           0 :         if (object->in.credentials == NULL) {
   30461           0 :                 PyErr_NoMemory();
   30462           0 :                 return -1;
   30463             :         }
   30464           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   30465           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30466           0 :                 PyErr_NoMemory();
   30467           0 :                 return -1;
   30468             :         }
   30469           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   30470           0 :         return 0;
   30471             : }
   30472             : 
   30473           0 : static PyObject *py_netr_ServerAuthenticate_out_get_return_credentials(PyObject *obj, void *closure)
   30474             : {
   30475           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30476           0 :         PyObject *py_return_credentials;
   30477           0 :         if (object->out.return_credentials == NULL) {
   30478           0 :                 Py_RETURN_NONE;
   30479             :         }
   30480           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   30481           0 :         return py_return_credentials;
   30482             : }
   30483             : 
   30484           0 : static int py_netr_ServerAuthenticate_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   30485             : {
   30486           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30487           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   30488           0 :         if (value == NULL) {
   30489           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_credentials");
   30490           0 :                 return -1;
   30491             :         }
   30492           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   30493           0 :         if (object->out.return_credentials == NULL) {
   30494           0 :                 PyErr_NoMemory();
   30495           0 :                 return -1;
   30496             :         }
   30497           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   30498           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30499           0 :                 PyErr_NoMemory();
   30500           0 :                 return -1;
   30501             :         }
   30502           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   30503           0 :         return 0;
   30504             : }
   30505             : 
   30506           0 : static PyObject *py_netr_ServerAuthenticate_get_result(PyObject *obj, void *closure)
   30507             : {
   30508           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30509           0 :         PyObject *py_result;
   30510           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   30511           0 :         return py_result;
   30512             : }
   30513             : 
   30514           0 : static int py_netr_ServerAuthenticate_set_result(PyObject *py_obj, PyObject *value, void *closure)
   30515             : {
   30516           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30517           0 :         if (value == NULL) {
   30518           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   30519           0 :                 return -1;
   30520             :         }
   30521           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   30522           0 :         return 0;
   30523             : }
   30524             : 
   30525             : static PyGetSetDef py_netr_ServerAuthenticate_getsetters[] = {
   30526             :         {
   30527             :                 .name = discard_const_p(char, "in_server_name"),
   30528             :                 .get = py_netr_ServerAuthenticate_in_get_server_name,
   30529             :                 .set = py_netr_ServerAuthenticate_in_set_server_name,
   30530             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30531             :         },
   30532             :         {
   30533             :                 .name = discard_const_p(char, "in_account_name"),
   30534             :                 .get = py_netr_ServerAuthenticate_in_get_account_name,
   30535             :                 .set = py_netr_ServerAuthenticate_in_set_account_name,
   30536             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30537             :         },
   30538             :         {
   30539             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   30540             :                 .get = py_netr_ServerAuthenticate_in_get_secure_channel_type,
   30541             :                 .set = py_netr_ServerAuthenticate_in_set_secure_channel_type,
   30542             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   30543             :         },
   30544             :         {
   30545             :                 .name = discard_const_p(char, "in_computer_name"),
   30546             :                 .get = py_netr_ServerAuthenticate_in_get_computer_name,
   30547             :                 .set = py_netr_ServerAuthenticate_in_set_computer_name,
   30548             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30549             :         },
   30550             :         {
   30551             :                 .name = discard_const_p(char, "in_credentials"),
   30552             :                 .get = py_netr_ServerAuthenticate_in_get_credentials,
   30553             :                 .set = py_netr_ServerAuthenticate_in_set_credentials,
   30554             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   30555             :         },
   30556             :         {
   30557             :                 .name = discard_const_p(char, "out_return_credentials"),
   30558             :                 .get = py_netr_ServerAuthenticate_out_get_return_credentials,
   30559             :                 .set = py_netr_ServerAuthenticate_out_set_return_credentials,
   30560             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   30561             :         },
   30562             :         {
   30563             :                 .name = discard_const_p(char, "result"),
   30564             :                 .get = py_netr_ServerAuthenticate_get_result,
   30565             :                 .set = py_netr_ServerAuthenticate_set_result,
   30566             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   30567             :         },
   30568             :         { .name = NULL }
   30569             : };
   30570             : 
   30571           0 : static PyObject *py_netr_ServerAuthenticate_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30572             : {
   30573           0 :         PyObject *self = pytalloc_new(struct netr_ServerAuthenticate, type);
   30574           0 :         struct netr_ServerAuthenticate *_self = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(self);
   30575           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   30576           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   30577           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   30578           0 :         return self;
   30579             : }
   30580             : 
   30581           0 : static PyObject *py_netr_ServerAuthenticate_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   30582             : {
   30583             : 
   30584             : 
   30585           0 :         return PyLong_FromLong(5);
   30586             : }
   30587             : 
   30588           0 : static PyObject *py_netr_ServerAuthenticate_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   30589             : {
   30590           0 :         const struct ndr_interface_call *call = NULL;
   30591           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30592           0 :         PyObject *ret = NULL;
   30593           0 :         struct ndr_push *push = NULL;
   30594           0 :         DATA_BLOB blob;
   30595           0 :         enum ndr_err_code err;
   30596             : 
   30597           0 :         if (ndr_table_netlogon.num_calls < 6) {
   30598           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_pack");
   30599           0 :                 return NULL;
   30600             :         }
   30601           0 :         call = &ndr_table_netlogon.calls[5];
   30602             : 
   30603           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   30604           0 :         if (push == NULL) {
   30605           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30606           0 :                 return NULL;
   30607             :         }
   30608             : 
   30609           0 :         push->flags |= ndr_push_flags;
   30610             : 
   30611           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   30612           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30613           0 :                 TALLOC_FREE(push);
   30614           0 :                 PyErr_SetNdrError(err);
   30615           0 :                 return NULL;
   30616             :         }
   30617           0 :         blob = ndr_push_blob(push);
   30618           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   30619           0 :         TALLOC_FREE(push);
   30620           0 :         return ret;
   30621             : }
   30622             : 
   30623           0 : static PyObject *py_netr_ServerAuthenticate_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30624             : {
   30625           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30626           0 :         PyObject *bigendian_obj = NULL;
   30627           0 :         PyObject *ndr64_obj = NULL;
   30628           0 :         libndr_flags ndr_push_flags = 0;
   30629             : 
   30630           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   30631             :                 discard_const_p(char *, kwnames),
   30632             :                 &bigendian_obj,
   30633             :                 &ndr64_obj)) {
   30634           0 :                 return NULL;
   30635             :         }
   30636             : 
   30637           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30638           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30639             :         }
   30640           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30641           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30642             :         }
   30643             : 
   30644           0 :         return py_netr_ServerAuthenticate_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   30645             : }
   30646             : 
   30647           0 : static PyObject *py_netr_ServerAuthenticate_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30648             : {
   30649           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30650           0 :         PyObject *bigendian_obj = NULL;
   30651           0 :         PyObject *ndr64_obj = NULL;
   30652           0 :         libndr_flags ndr_push_flags = 0;
   30653             : 
   30654           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   30655             :                 discard_const_p(char *, kwnames),
   30656             :                 &bigendian_obj,
   30657             :                 &ndr64_obj)) {
   30658           0 :                 return NULL;
   30659             :         }
   30660             : 
   30661           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30662           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30663             :         }
   30664           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30665           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30666             :         }
   30667             : 
   30668           0 :         return py_netr_ServerAuthenticate_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   30669             : }
   30670             : 
   30671           0 : static PyObject *py_netr_ServerAuthenticate_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   30672             : {
   30673           0 :         const struct ndr_interface_call *call = NULL;
   30674           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30675           0 :         struct ndr_pull *pull = NULL;
   30676           0 :         enum ndr_err_code err;
   30677             : 
   30678           0 :         if (ndr_table_netlogon.num_calls < 6) {
   30679           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_unpack");
   30680           0 :                 return NULL;
   30681             :         }
   30682           0 :         call = &ndr_table_netlogon.calls[5];
   30683             : 
   30684           0 :         pull = ndr_pull_init_blob(blob, object);
   30685           0 :         if (pull == NULL) {
   30686           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30687           0 :                 return NULL;
   30688             :         }
   30689             : 
   30690           0 :         pull->flags |= ndr_pull_flags;
   30691             : 
   30692           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   30693           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30694           0 :                 TALLOC_FREE(pull);
   30695           0 :                 PyErr_SetNdrError(err);
   30696           0 :                 return NULL;
   30697             :         }
   30698           0 :         if (!allow_remaining) {
   30699           0 :                 uint32_t highest_ofs;
   30700             : 
   30701           0 :                 if (pull->offset > pull->relative_highest_offset) {
   30702           0 :                         highest_ofs = pull->offset;
   30703             :                 } else {
   30704           0 :                         highest_ofs = pull->relative_highest_offset;
   30705             :                 }
   30706           0 :                 if (highest_ofs < pull->data_size) {
   30707           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   30708             :                                 "not all bytes consumed ofs[%u] size[%u]",
   30709             :                                 highest_ofs, pull->data_size);
   30710           0 :                         TALLOC_FREE(pull);
   30711           0 :                         PyErr_SetNdrError(err);
   30712           0 :                         return NULL;
   30713             :                 }
   30714             :         }
   30715             : 
   30716           0 :         TALLOC_FREE(pull);
   30717           0 :         Py_RETURN_NONE;
   30718             : }
   30719             : 
   30720           0 : static PyObject *py_netr_ServerAuthenticate_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30721             : {
   30722           0 :         DATA_BLOB blob;
   30723           0 :         Py_ssize_t blob_length = 0;
   30724           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30725           0 :         PyObject *bigendian_obj = NULL;
   30726           0 :         PyObject *ndr64_obj = NULL;
   30727           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30728           0 :         PyObject *allow_remaining_obj = NULL;
   30729           0 :         bool allow_remaining = false;
   30730             : 
   30731           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   30732             :                 discard_const_p(char *, kwnames),
   30733             :                 &blob.data, &blob_length,
   30734             :                 &bigendian_obj,
   30735             :                 &ndr64_obj,
   30736             :                 &allow_remaining_obj)) {
   30737           0 :                 return NULL;
   30738             :         }
   30739           0 :         blob.length = blob_length;
   30740             : 
   30741           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30742           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30743             :         }
   30744           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30745           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30746             :         }
   30747             : 
   30748           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30749           0 :                 allow_remaining = true;
   30750             :         }
   30751             : 
   30752           0 :         return py_netr_ServerAuthenticate_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   30753             : }
   30754             : 
   30755           0 : static PyObject *py_netr_ServerAuthenticate_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30756             : {
   30757           0 :         DATA_BLOB blob;
   30758           0 :         Py_ssize_t blob_length = 0;
   30759           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30760           0 :         PyObject *bigendian_obj = NULL;
   30761           0 :         PyObject *ndr64_obj = NULL;
   30762           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30763           0 :         PyObject *allow_remaining_obj = NULL;
   30764           0 :         bool allow_remaining = false;
   30765             : 
   30766           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   30767             :                 discard_const_p(char *, kwnames),
   30768             :                 &blob.data, &blob_length,
   30769             :                 &bigendian_obj,
   30770             :                 &ndr64_obj,
   30771             :                 &allow_remaining_obj)) {
   30772           0 :                 return NULL;
   30773             :         }
   30774           0 :         blob.length = blob_length;
   30775             : 
   30776           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30777           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30778             :         }
   30779           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30780           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30781             :         }
   30782             : 
   30783           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30784           0 :                 allow_remaining = true;
   30785             :         }
   30786             : 
   30787           0 :         return py_netr_ServerAuthenticate_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   30788             : }
   30789             : 
   30790           0 : static PyObject *py_netr_ServerAuthenticate_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   30791             : {
   30792           0 :         const struct ndr_interface_call *call = NULL;
   30793           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30794           0 :         PyObject *ret;
   30795           0 :         char *retstr;
   30796             : 
   30797           0 :         if (ndr_table_netlogon.num_calls < 6) {
   30798           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_print");
   30799           0 :                 return NULL;
   30800             :         }
   30801           0 :         call = &ndr_table_netlogon.calls[5];
   30802             : 
   30803           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   30804           0 :         ret = PyUnicode_FromString(retstr);
   30805           0 :         TALLOC_FREE(retstr);
   30806             : 
   30807           0 :         return ret;
   30808             : }
   30809             : 
   30810           0 : static PyObject *py_netr_ServerAuthenticate_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30811             : {
   30812           0 :         return py_netr_ServerAuthenticate_ndr_print(py_obj, "netr_ServerAuthenticate_in", NDR_IN);
   30813             : }
   30814             : 
   30815           0 : static PyObject *py_netr_ServerAuthenticate_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30816             : {
   30817           0 :         return py_netr_ServerAuthenticate_ndr_print(py_obj, "netr_ServerAuthenticate_out", NDR_OUT);
   30818             : }
   30819             : 
   30820             : static PyMethodDef py_netr_ServerAuthenticate_methods[] = {
   30821             :         { "opnum", (PyCFunction)py_netr_ServerAuthenticate_ndr_opnum, METH_NOARGS|METH_CLASS,
   30822             :                 "netlogon.netr_ServerAuthenticate.opnum() -> 5 (0x05) " },
   30823             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   30824             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   30825             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   30826             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   30827             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   30828             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   30829             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   30830             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   30831             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerAuthenticate_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   30832             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerAuthenticate_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   30833             :         { NULL, NULL, 0, NULL }
   30834             : };
   30835             : 
   30836             : 
   30837             : static PyTypeObject netr_ServerAuthenticate_Type = {
   30838             :         PyVarObject_HEAD_INIT(NULL, 0)
   30839             :         .tp_name = "netlogon.netr_ServerAuthenticate",
   30840             :         .tp_getset = py_netr_ServerAuthenticate_getsetters,
   30841             :         .tp_methods = py_netr_ServerAuthenticate_methods,
   30842             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30843             :         .tp_new = py_netr_ServerAuthenticate_new,
   30844             : };
   30845             : 
   30846           0 : static bool pack_py_netr_ServerAuthenticate_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate *r)
   30847             : {
   30848           0 :         PyObject *py_server_name;
   30849           0 :         PyObject *py_account_name;
   30850           0 :         PyObject *py_secure_channel_type;
   30851           0 :         PyObject *py_computer_name;
   30852           0 :         PyObject *py_credentials;
   30853           0 :         const char *kwnames[] = {
   30854             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credentials", NULL
   30855             :         };
   30856             : 
   30857           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_ServerAuthenticate", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credentials)) {
   30858           0 :                 return false;
   30859             :         }
   30860             : 
   30861           0 :         if (py_server_name == NULL) {
   30862           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   30863           0 :                 return false;
   30864             :         }
   30865           0 :         if (py_server_name == Py_None) {
   30866           0 :                 r->in.server_name = NULL;
   30867             :         } else {
   30868           0 :                 r->in.server_name = NULL;
   30869             :                 {
   30870           0 :                         const char *test_str;
   30871           0 :                         const char *talloc_str;
   30872           0 :                         PyObject *unicode = NULL;
   30873           0 :                         if (PyUnicode_Check(py_server_name)) {
   30874           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   30875           0 :                                 if (unicode == NULL) {
   30876           0 :                                         PyErr_NoMemory();
   30877           0 :                                         return false;
   30878             :                                 }
   30879           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30880           0 :                         } else if (PyBytes_Check(py_server_name)) {
   30881           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   30882             :                         } else {
   30883           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   30884           0 :                                 return false;
   30885             :                         }
   30886           0 :                         talloc_str = talloc_strdup(r, test_str);
   30887           0 :                         if (unicode != NULL) {
   30888           0 :                                 Py_DECREF(unicode);
   30889             :                         }
   30890           0 :                         if (talloc_str == NULL) {
   30891           0 :                                 PyErr_NoMemory();
   30892           0 :                                 return false;
   30893             :                         }
   30894           0 :                         r->in.server_name = talloc_str;
   30895             :                 }
   30896             :         }
   30897           0 :         if (py_account_name == NULL) {
   30898           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   30899           0 :                 return false;
   30900             :         }
   30901           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   30902           0 :         if (r->in.account_name == NULL) {
   30903           0 :                 PyErr_NoMemory();
   30904           0 :                 return false;
   30905             :         }
   30906             :         {
   30907           0 :                 const char *test_str;
   30908           0 :                 const char *talloc_str;
   30909           0 :                 PyObject *unicode = NULL;
   30910           0 :                 if (PyUnicode_Check(py_account_name)) {
   30911           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   30912           0 :                         if (unicode == NULL) {
   30913           0 :                                 PyErr_NoMemory();
   30914           0 :                                 return false;
   30915             :                         }
   30916           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30917           0 :                 } else if (PyBytes_Check(py_account_name)) {
   30918           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   30919             :                 } else {
   30920           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   30921           0 :                         return false;
   30922             :                 }
   30923           0 :                 talloc_str = talloc_strdup(r, test_str);
   30924           0 :                 if (unicode != NULL) {
   30925           0 :                         Py_DECREF(unicode);
   30926             :                 }
   30927           0 :                 if (talloc_str == NULL) {
   30928           0 :                         PyErr_NoMemory();
   30929           0 :                         return false;
   30930             :                 }
   30931           0 :                 r->in.account_name = talloc_str;
   30932             :         }
   30933           0 :         if (py_secure_channel_type == NULL) {
   30934           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   30935           0 :                 return false;
   30936             :         }
   30937             :         {
   30938           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   30939           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   30940           0 :                         unsigned long long test_var;
   30941           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   30942           0 :                         if (PyErr_Occurred() != NULL) {
   30943           0 :                                 return false;
   30944             :                         }
   30945           0 :                         if (test_var > uint_max) {
   30946           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30947             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30948           0 :                                 return false;
   30949             :                         }
   30950           0 :                         r->in.secure_channel_type = test_var;
   30951             :                 } else {
   30952           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30953             :                           PyLong_Type.tp_name);
   30954           0 :                         return false;
   30955             :                 }
   30956             :         }
   30957           0 :         if (py_computer_name == NULL) {
   30958           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   30959           0 :                 return false;
   30960             :         }
   30961           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   30962           0 :         if (r->in.computer_name == NULL) {
   30963           0 :                 PyErr_NoMemory();
   30964           0 :                 return false;
   30965             :         }
   30966             :         {
   30967           0 :                 const char *test_str;
   30968           0 :                 const char *talloc_str;
   30969           0 :                 PyObject *unicode = NULL;
   30970           0 :                 if (PyUnicode_Check(py_computer_name)) {
   30971           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   30972           0 :                         if (unicode == NULL) {
   30973           0 :                                 PyErr_NoMemory();
   30974           0 :                                 return false;
   30975             :                         }
   30976           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30977           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   30978           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   30979             :                 } else {
   30980           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   30981           0 :                         return false;
   30982             :                 }
   30983           0 :                 talloc_str = talloc_strdup(r, test_str);
   30984           0 :                 if (unicode != NULL) {
   30985           0 :                         Py_DECREF(unicode);
   30986             :                 }
   30987           0 :                 if (talloc_str == NULL) {
   30988           0 :                         PyErr_NoMemory();
   30989           0 :                         return false;
   30990             :                 }
   30991           0 :                 r->in.computer_name = talloc_str;
   30992             :         }
   30993           0 :         if (py_credentials == NULL) {
   30994           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credentials");
   30995           0 :                 return false;
   30996             :         }
   30997           0 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   30998           0 :         if (r->in.credentials == NULL) {
   30999           0 :                 PyErr_NoMemory();
   31000           0 :                 return false;
   31001             :         }
   31002           0 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   31003           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   31004           0 :                 PyErr_NoMemory();
   31005           0 :                 return false;
   31006             :         }
   31007           0 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   31008           0 :         return true;
   31009             : }
   31010             : 
   31011           0 : static PyObject *unpack_py_netr_ServerAuthenticate_args_out(struct netr_ServerAuthenticate *r)
   31012             : {
   31013           0 :         PyObject *result;
   31014           0 :         PyObject *py_return_credentials;
   31015           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   31016           0 :         result = py_return_credentials;
   31017           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   31018           0 :                 PyErr_SetNTSTATUS(r->out.result);
   31019           0 :                 return NULL;
   31020             :         }
   31021             : 
   31022           0 :         return result;
   31023             : }
   31024             : 
   31025             : 
   31026           0 : static PyObject *py_netr_ServerPasswordSet_in_get_server_name(PyObject *obj, void *closure)
   31027             : {
   31028           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   31029           0 :         PyObject *py_server_name;
   31030           0 :         if (object->in.server_name == NULL) {
   31031           0 :                 Py_RETURN_NONE;
   31032             :         }
   31033           0 :         if (object->in.server_name == NULL) {
   31034           0 :                 py_server_name = Py_None;
   31035           0 :                 Py_INCREF(py_server_name);
   31036             :         } else {
   31037           0 :                 if (object->in.server_name == NULL) {
   31038           0 :                         py_server_name = Py_None;
   31039           0 :                         Py_INCREF(py_server_name);
   31040             :                 } else {
   31041           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   31042             :                 }
   31043             :         }
   31044           0 :         return py_server_name;
   31045             : }
   31046             : 
   31047           0 : static int py_netr_ServerPasswordSet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   31048             : {
   31049           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31050           0 :         if (value == NULL) {
   31051           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   31052           0 :                 return -1;
   31053             :         }
   31054           0 :         if (value == Py_None) {
   31055           0 :                 object->in.server_name = NULL;
   31056             :         } else {
   31057           0 :                 object->in.server_name = NULL;
   31058             :                 {
   31059           0 :                         const char *test_str;
   31060           0 :                         const char *talloc_str;
   31061           0 :                         PyObject *unicode = NULL;
   31062           0 :                         if (PyUnicode_Check(value)) {
   31063           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31064           0 :                                 if (unicode == NULL) {
   31065           0 :                                         PyErr_NoMemory();
   31066           0 :                                         return -1;
   31067             :                                 }
   31068           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31069           0 :                         } else if (PyBytes_Check(value)) {
   31070           0 :                                 test_str = PyBytes_AS_STRING(value);
   31071             :                         } else {
   31072           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31073           0 :                                 return -1;
   31074             :                         }
   31075           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31076           0 :                         if (unicode != NULL) {
   31077           0 :                                 Py_DECREF(unicode);
   31078             :                         }
   31079           0 :                         if (talloc_str == NULL) {
   31080           0 :                                 PyErr_NoMemory();
   31081           0 :                                 return -1;
   31082             :                         }
   31083           0 :                         object->in.server_name = talloc_str;
   31084             :                 }
   31085             :         }
   31086           0 :         return 0;
   31087             : }
   31088             : 
   31089           0 : static PyObject *py_netr_ServerPasswordSet_in_get_account_name(PyObject *obj, void *closure)
   31090             : {
   31091           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   31092           0 :         PyObject *py_account_name;
   31093           0 :         if (object->in.account_name == NULL) {
   31094           0 :                 Py_RETURN_NONE;
   31095             :         }
   31096           0 :         if (object->in.account_name == NULL) {
   31097           0 :                 py_account_name = Py_None;
   31098           0 :                 Py_INCREF(py_account_name);
   31099             :         } else {
   31100           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   31101             :         }
   31102           0 :         return py_account_name;
   31103             : }
   31104             : 
   31105           0 : static int py_netr_ServerPasswordSet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   31106             : {
   31107           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31108           0 :         if (value == NULL) {
   31109           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   31110           0 :                 return -1;
   31111             :         }
   31112           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   31113           0 :         if (object->in.account_name == NULL) {
   31114           0 :                 PyErr_NoMemory();
   31115           0 :                 return -1;
   31116             :         }
   31117             :         {
   31118           0 :                 const char *test_str;
   31119           0 :                 const char *talloc_str;
   31120           0 :                 PyObject *unicode = NULL;
   31121           0 :                 if (PyUnicode_Check(value)) {
   31122           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31123           0 :                         if (unicode == NULL) {
   31124           0 :                                 PyErr_NoMemory();
   31125           0 :                                 return -1;
   31126             :                         }
   31127           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31128           0 :                 } else if (PyBytes_Check(value)) {
   31129           0 :                         test_str = PyBytes_AS_STRING(value);
   31130             :                 } else {
   31131           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31132           0 :                         return -1;
   31133             :                 }
   31134           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31135           0 :                 if (unicode != NULL) {
   31136           0 :                         Py_DECREF(unicode);
   31137             :                 }
   31138           0 :                 if (talloc_str == NULL) {
   31139           0 :                         PyErr_NoMemory();
   31140           0 :                         return -1;
   31141             :                 }
   31142           0 :                 object->in.account_name = talloc_str;
   31143             :         }
   31144           0 :         return 0;
   31145             : }
   31146             : 
   31147           0 : static PyObject *py_netr_ServerPasswordSet_in_get_secure_channel_type(PyObject *obj, void *closure)
   31148             : {
   31149           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   31150           0 :         PyObject *py_secure_channel_type;
   31151           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   31152           0 :         return py_secure_channel_type;
   31153             : }
   31154             : 
   31155           0 : static int py_netr_ServerPasswordSet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   31156             : {
   31157           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31158           0 :         if (value == NULL) {
   31159           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   31160           0 :                 return -1;
   31161             :         }
   31162             :         {
   31163           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   31164           0 :                 if (PyLong_Check(value)) {
   31165           0 :                         unsigned long long test_var;
   31166           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31167           0 :                         if (PyErr_Occurred() != NULL) {
   31168           0 :                                 return -1;
   31169             :                         }
   31170           0 :                         if (test_var > uint_max) {
   31171           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31172             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31173           0 :                                 return -1;
   31174             :                         }
   31175           0 :                         object->in.secure_channel_type = test_var;
   31176             :                 } else {
   31177           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31178             :                           PyLong_Type.tp_name);
   31179           0 :                         return -1;
   31180             :                 }
   31181             :         }
   31182           0 :         return 0;
   31183             : }
   31184             : 
   31185           0 : static PyObject *py_netr_ServerPasswordSet_in_get_computer_name(PyObject *obj, void *closure)
   31186             : {
   31187           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   31188           0 :         PyObject *py_computer_name;
   31189           0 :         if (object->in.computer_name == NULL) {
   31190           0 :                 Py_RETURN_NONE;
   31191             :         }
   31192           0 :         if (object->in.computer_name == NULL) {
   31193           0 :                 py_computer_name = Py_None;
   31194           0 :                 Py_INCREF(py_computer_name);
   31195             :         } else {
   31196           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   31197             :         }
   31198           0 :         return py_computer_name;
   31199             : }
   31200             : 
   31201           0 : static int py_netr_ServerPasswordSet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   31202             : {
   31203           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31204           0 :         if (value == NULL) {
   31205           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   31206           0 :                 return -1;
   31207             :         }
   31208           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   31209           0 :         if (object->in.computer_name == NULL) {
   31210           0 :                 PyErr_NoMemory();
   31211           0 :                 return -1;
   31212             :         }
   31213             :         {
   31214           0 :                 const char *test_str;
   31215           0 :                 const char *talloc_str;
   31216           0 :                 PyObject *unicode = NULL;
   31217           0 :                 if (PyUnicode_Check(value)) {
   31218           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31219           0 :                         if (unicode == NULL) {
   31220           0 :                                 PyErr_NoMemory();
   31221           0 :                                 return -1;
   31222             :                         }
   31223           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31224           0 :                 } else if (PyBytes_Check(value)) {
   31225           0 :                         test_str = PyBytes_AS_STRING(value);
   31226             :                 } else {
   31227           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31228           0 :                         return -1;
   31229             :                 }
   31230           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31231           0 :                 if (unicode != NULL) {
   31232           0 :                         Py_DECREF(unicode);
   31233             :                 }
   31234           0 :                 if (talloc_str == NULL) {
   31235           0 :                         PyErr_NoMemory();
   31236           0 :                         return -1;
   31237             :                 }
   31238           0 :                 object->in.computer_name = talloc_str;
   31239             :         }
   31240           0 :         return 0;
   31241             : }
   31242             : 
   31243           0 : static PyObject *py_netr_ServerPasswordSet_in_get_credential(PyObject *obj, void *closure)
   31244             : {
   31245           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   31246           0 :         PyObject *py_credential;
   31247           0 :         if (object->in.credential == NULL) {
   31248           0 :                 Py_RETURN_NONE;
   31249             :         }
   31250           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   31251           0 :         return py_credential;
   31252             : }
   31253             : 
   31254           0 : static int py_netr_ServerPasswordSet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   31255             : {
   31256           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31257           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   31258           0 :         if (value == NULL) {
   31259           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   31260           0 :                 return -1;
   31261             :         }
   31262           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   31263           0 :         if (object->in.credential == NULL) {
   31264           0 :                 PyErr_NoMemory();
   31265           0 :                 return -1;
   31266             :         }
   31267           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   31268           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31269           0 :                 PyErr_NoMemory();
   31270           0 :                 return -1;
   31271             :         }
   31272           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   31273           0 :         return 0;
   31274             : }
   31275             : 
   31276           0 : static PyObject *py_netr_ServerPasswordSet_out_get_return_authenticator(PyObject *obj, void *closure)
   31277             : {
   31278           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   31279           0 :         PyObject *py_return_authenticator;
   31280           0 :         if (object->out.return_authenticator == NULL) {
   31281           0 :                 Py_RETURN_NONE;
   31282             :         }
   31283           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   31284           0 :         return py_return_authenticator;
   31285             : }
   31286             : 
   31287           0 : static int py_netr_ServerPasswordSet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   31288             : {
   31289           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31290           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   31291           0 :         if (value == NULL) {
   31292           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   31293           0 :                 return -1;
   31294             :         }
   31295           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   31296           0 :         if (object->out.return_authenticator == NULL) {
   31297           0 :                 PyErr_NoMemory();
   31298           0 :                 return -1;
   31299             :         }
   31300           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   31301           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31302           0 :                 PyErr_NoMemory();
   31303           0 :                 return -1;
   31304             :         }
   31305           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   31306           0 :         return 0;
   31307             : }
   31308             : 
   31309           0 : static PyObject *py_netr_ServerPasswordSet_in_get_new_password(PyObject *obj, void *closure)
   31310             : {
   31311           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   31312           0 :         PyObject *py_new_password;
   31313           0 :         if (object->in.new_password == NULL) {
   31314           0 :                 Py_RETURN_NONE;
   31315             :         }
   31316           0 :         py_new_password = pytalloc_reference_ex(samr_Password_Type, object->in.new_password, object->in.new_password);
   31317           0 :         return py_new_password;
   31318             : }
   31319             : 
   31320           0 : static int py_netr_ServerPasswordSet_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
   31321             : {
   31322           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31323           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.new_password));
   31324           0 :         if (value == NULL) {
   31325           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_password");
   31326           0 :                 return -1;
   31327             :         }
   31328           0 :         object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
   31329           0 :         if (object->in.new_password == NULL) {
   31330           0 :                 PyErr_NoMemory();
   31331           0 :                 return -1;
   31332             :         }
   31333           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   31334           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31335           0 :                 PyErr_NoMemory();
   31336           0 :                 return -1;
   31337             :         }
   31338           0 :         object->in.new_password = (struct samr_Password *)pytalloc_get_ptr(value);
   31339           0 :         return 0;
   31340             : }
   31341             : 
   31342           0 : static PyObject *py_netr_ServerPasswordSet_get_result(PyObject *obj, void *closure)
   31343             : {
   31344           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   31345           0 :         PyObject *py_result;
   31346           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   31347           0 :         return py_result;
   31348             : }
   31349             : 
   31350           0 : static int py_netr_ServerPasswordSet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   31351             : {
   31352           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31353           0 :         if (value == NULL) {
   31354           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   31355           0 :                 return -1;
   31356             :         }
   31357           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   31358           0 :         return 0;
   31359             : }
   31360             : 
   31361             : static PyGetSetDef py_netr_ServerPasswordSet_getsetters[] = {
   31362             :         {
   31363             :                 .name = discard_const_p(char, "in_server_name"),
   31364             :                 .get = py_netr_ServerPasswordSet_in_get_server_name,
   31365             :                 .set = py_netr_ServerPasswordSet_in_set_server_name,
   31366             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31367             :         },
   31368             :         {
   31369             :                 .name = discard_const_p(char, "in_account_name"),
   31370             :                 .get = py_netr_ServerPasswordSet_in_get_account_name,
   31371             :                 .set = py_netr_ServerPasswordSet_in_set_account_name,
   31372             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31373             :         },
   31374             :         {
   31375             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   31376             :                 .get = py_netr_ServerPasswordSet_in_get_secure_channel_type,
   31377             :                 .set = py_netr_ServerPasswordSet_in_set_secure_channel_type,
   31378             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   31379             :         },
   31380             :         {
   31381             :                 .name = discard_const_p(char, "in_computer_name"),
   31382             :                 .get = py_netr_ServerPasswordSet_in_get_computer_name,
   31383             :                 .set = py_netr_ServerPasswordSet_in_set_computer_name,
   31384             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31385             :         },
   31386             :         {
   31387             :                 .name = discard_const_p(char, "in_credential"),
   31388             :                 .get = py_netr_ServerPasswordSet_in_get_credential,
   31389             :                 .set = py_netr_ServerPasswordSet_in_set_credential,
   31390             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   31391             :         },
   31392             :         {
   31393             :                 .name = discard_const_p(char, "out_return_authenticator"),
   31394             :                 .get = py_netr_ServerPasswordSet_out_get_return_authenticator,
   31395             :                 .set = py_netr_ServerPasswordSet_out_set_return_authenticator,
   31396             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   31397             :         },
   31398             :         {
   31399             :                 .name = discard_const_p(char, "in_new_password"),
   31400             :                 .get = py_netr_ServerPasswordSet_in_get_new_password,
   31401             :                 .set = py_netr_ServerPasswordSet_in_set_new_password,
   31402             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   31403             :         },
   31404             :         {
   31405             :                 .name = discard_const_p(char, "result"),
   31406             :                 .get = py_netr_ServerPasswordSet_get_result,
   31407             :                 .set = py_netr_ServerPasswordSet_set_result,
   31408             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   31409             :         },
   31410             :         { .name = NULL }
   31411             : };
   31412             : 
   31413           0 : static PyObject *py_netr_ServerPasswordSet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   31414             : {
   31415           0 :         PyObject *self = pytalloc_new(struct netr_ServerPasswordSet, type);
   31416           0 :         struct netr_ServerPasswordSet *_self = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(self);
   31417           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   31418           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   31419           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   31420           0 :         _self->in.new_password = talloc_zero(mem_ctx, struct samr_Password);
   31421           0 :         return self;
   31422             : }
   31423             : 
   31424           0 : static PyObject *py_netr_ServerPasswordSet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   31425             : {
   31426             : 
   31427             : 
   31428           0 :         return PyLong_FromLong(6);
   31429             : }
   31430             : 
   31431           0 : static PyObject *py_netr_ServerPasswordSet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   31432             : {
   31433           0 :         const struct ndr_interface_call *call = NULL;
   31434           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31435           0 :         PyObject *ret = NULL;
   31436           0 :         struct ndr_push *push = NULL;
   31437           0 :         DATA_BLOB blob;
   31438           0 :         enum ndr_err_code err;
   31439             : 
   31440           0 :         if (ndr_table_netlogon.num_calls < 7) {
   31441           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_pack");
   31442           0 :                 return NULL;
   31443             :         }
   31444           0 :         call = &ndr_table_netlogon.calls[6];
   31445             : 
   31446           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   31447           0 :         if (push == NULL) {
   31448           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31449           0 :                 return NULL;
   31450             :         }
   31451             : 
   31452           0 :         push->flags |= ndr_push_flags;
   31453             : 
   31454           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   31455           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31456           0 :                 TALLOC_FREE(push);
   31457           0 :                 PyErr_SetNdrError(err);
   31458           0 :                 return NULL;
   31459             :         }
   31460           0 :         blob = ndr_push_blob(push);
   31461           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   31462           0 :         TALLOC_FREE(push);
   31463           0 :         return ret;
   31464             : }
   31465             : 
   31466           0 : static PyObject *py_netr_ServerPasswordSet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31467             : {
   31468           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31469           0 :         PyObject *bigendian_obj = NULL;
   31470           0 :         PyObject *ndr64_obj = NULL;
   31471           0 :         libndr_flags ndr_push_flags = 0;
   31472             : 
   31473           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   31474             :                 discard_const_p(char *, kwnames),
   31475             :                 &bigendian_obj,
   31476             :                 &ndr64_obj)) {
   31477           0 :                 return NULL;
   31478             :         }
   31479             : 
   31480           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31481           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31482             :         }
   31483           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31484           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31485             :         }
   31486             : 
   31487           0 :         return py_netr_ServerPasswordSet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   31488             : }
   31489             : 
   31490           0 : static PyObject *py_netr_ServerPasswordSet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31491             : {
   31492           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31493           0 :         PyObject *bigendian_obj = NULL;
   31494           0 :         PyObject *ndr64_obj = NULL;
   31495           0 :         libndr_flags ndr_push_flags = 0;
   31496             : 
   31497           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   31498             :                 discard_const_p(char *, kwnames),
   31499             :                 &bigendian_obj,
   31500             :                 &ndr64_obj)) {
   31501           0 :                 return NULL;
   31502             :         }
   31503             : 
   31504           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31505           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31506             :         }
   31507           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31508           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31509             :         }
   31510             : 
   31511           0 :         return py_netr_ServerPasswordSet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   31512             : }
   31513             : 
   31514           0 : static PyObject *py_netr_ServerPasswordSet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   31515             : {
   31516           0 :         const struct ndr_interface_call *call = NULL;
   31517           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31518           0 :         struct ndr_pull *pull = NULL;
   31519           0 :         enum ndr_err_code err;
   31520             : 
   31521           0 :         if (ndr_table_netlogon.num_calls < 7) {
   31522           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_unpack");
   31523           0 :                 return NULL;
   31524             :         }
   31525           0 :         call = &ndr_table_netlogon.calls[6];
   31526             : 
   31527           0 :         pull = ndr_pull_init_blob(blob, object);
   31528           0 :         if (pull == NULL) {
   31529           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31530           0 :                 return NULL;
   31531             :         }
   31532             : 
   31533           0 :         pull->flags |= ndr_pull_flags;
   31534             : 
   31535           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   31536           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31537           0 :                 TALLOC_FREE(pull);
   31538           0 :                 PyErr_SetNdrError(err);
   31539           0 :                 return NULL;
   31540             :         }
   31541           0 :         if (!allow_remaining) {
   31542           0 :                 uint32_t highest_ofs;
   31543             : 
   31544           0 :                 if (pull->offset > pull->relative_highest_offset) {
   31545           0 :                         highest_ofs = pull->offset;
   31546             :                 } else {
   31547           0 :                         highest_ofs = pull->relative_highest_offset;
   31548             :                 }
   31549           0 :                 if (highest_ofs < pull->data_size) {
   31550           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   31551             :                                 "not all bytes consumed ofs[%u] size[%u]",
   31552             :                                 highest_ofs, pull->data_size);
   31553           0 :                         TALLOC_FREE(pull);
   31554           0 :                         PyErr_SetNdrError(err);
   31555           0 :                         return NULL;
   31556             :                 }
   31557             :         }
   31558             : 
   31559           0 :         TALLOC_FREE(pull);
   31560           0 :         Py_RETURN_NONE;
   31561             : }
   31562             : 
   31563           0 : static PyObject *py_netr_ServerPasswordSet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31564             : {
   31565           0 :         DATA_BLOB blob;
   31566           0 :         Py_ssize_t blob_length = 0;
   31567           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31568           0 :         PyObject *bigendian_obj = NULL;
   31569           0 :         PyObject *ndr64_obj = NULL;
   31570           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31571           0 :         PyObject *allow_remaining_obj = NULL;
   31572           0 :         bool allow_remaining = false;
   31573             : 
   31574           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   31575             :                 discard_const_p(char *, kwnames),
   31576             :                 &blob.data, &blob_length,
   31577             :                 &bigendian_obj,
   31578             :                 &ndr64_obj,
   31579             :                 &allow_remaining_obj)) {
   31580           0 :                 return NULL;
   31581             :         }
   31582           0 :         blob.length = blob_length;
   31583             : 
   31584           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31585           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31586             :         }
   31587           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31588           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31589             :         }
   31590             : 
   31591           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31592           0 :                 allow_remaining = true;
   31593             :         }
   31594             : 
   31595           0 :         return py_netr_ServerPasswordSet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   31596             : }
   31597             : 
   31598           0 : static PyObject *py_netr_ServerPasswordSet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31599             : {
   31600           0 :         DATA_BLOB blob;
   31601           0 :         Py_ssize_t blob_length = 0;
   31602           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31603           0 :         PyObject *bigendian_obj = NULL;
   31604           0 :         PyObject *ndr64_obj = NULL;
   31605           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31606           0 :         PyObject *allow_remaining_obj = NULL;
   31607           0 :         bool allow_remaining = false;
   31608             : 
   31609           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   31610             :                 discard_const_p(char *, kwnames),
   31611             :                 &blob.data, &blob_length,
   31612             :                 &bigendian_obj,
   31613             :                 &ndr64_obj,
   31614             :                 &allow_remaining_obj)) {
   31615           0 :                 return NULL;
   31616             :         }
   31617           0 :         blob.length = blob_length;
   31618             : 
   31619           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31620           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31621             :         }
   31622           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31623           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31624             :         }
   31625             : 
   31626           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31627           0 :                 allow_remaining = true;
   31628             :         }
   31629             : 
   31630           0 :         return py_netr_ServerPasswordSet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   31631             : }
   31632             : 
   31633           0 : static PyObject *py_netr_ServerPasswordSet_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   31634             : {
   31635           0 :         const struct ndr_interface_call *call = NULL;
   31636           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31637           0 :         PyObject *ret;
   31638           0 :         char *retstr;
   31639             : 
   31640           0 :         if (ndr_table_netlogon.num_calls < 7) {
   31641           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_print");
   31642           0 :                 return NULL;
   31643             :         }
   31644           0 :         call = &ndr_table_netlogon.calls[6];
   31645             : 
   31646           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   31647           0 :         ret = PyUnicode_FromString(retstr);
   31648           0 :         TALLOC_FREE(retstr);
   31649             : 
   31650           0 :         return ret;
   31651             : }
   31652             : 
   31653           0 : static PyObject *py_netr_ServerPasswordSet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31654             : {
   31655           0 :         return py_netr_ServerPasswordSet_ndr_print(py_obj, "netr_ServerPasswordSet_in", NDR_IN);
   31656             : }
   31657             : 
   31658           0 : static PyObject *py_netr_ServerPasswordSet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31659             : {
   31660           0 :         return py_netr_ServerPasswordSet_ndr_print(py_obj, "netr_ServerPasswordSet_out", NDR_OUT);
   31661             : }
   31662             : 
   31663             : static PyMethodDef py_netr_ServerPasswordSet_methods[] = {
   31664             :         { "opnum", (PyCFunction)py_netr_ServerPasswordSet_ndr_opnum, METH_NOARGS|METH_CLASS,
   31665             :                 "netlogon.netr_ServerPasswordSet.opnum() -> 6 (0x06) " },
   31666             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   31667             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   31668             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   31669             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   31670             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   31671             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   31672             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   31673             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   31674             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerPasswordSet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   31675             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerPasswordSet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   31676             :         { NULL, NULL, 0, NULL }
   31677             : };
   31678             : 
   31679             : 
   31680             : static PyTypeObject netr_ServerPasswordSet_Type = {
   31681             :         PyVarObject_HEAD_INIT(NULL, 0)
   31682             :         .tp_name = "netlogon.netr_ServerPasswordSet",
   31683             :         .tp_getset = py_netr_ServerPasswordSet_getsetters,
   31684             :         .tp_methods = py_netr_ServerPasswordSet_methods,
   31685             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31686             :         .tp_new = py_netr_ServerPasswordSet_new,
   31687             : };
   31688             : 
   31689           0 : static bool pack_py_netr_ServerPasswordSet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordSet *r)
   31690             : {
   31691           0 :         PyObject *py_server_name;
   31692           0 :         PyObject *py_account_name;
   31693           0 :         PyObject *py_secure_channel_type;
   31694           0 :         PyObject *py_computer_name;
   31695           0 :         PyObject *py_credential;
   31696           0 :         PyObject *py_new_password;
   31697           0 :         const char *kwnames[] = {
   31698             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", "new_password", NULL
   31699             :         };
   31700             : 
   31701           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_ServerPasswordSet", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential, &py_new_password)) {
   31702           0 :                 return false;
   31703             :         }
   31704             : 
   31705           0 :         if (py_server_name == NULL) {
   31706           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   31707           0 :                 return false;
   31708             :         }
   31709           0 :         if (py_server_name == Py_None) {
   31710           0 :                 r->in.server_name = NULL;
   31711             :         } else {
   31712           0 :                 r->in.server_name = NULL;
   31713             :                 {
   31714           0 :                         const char *test_str;
   31715           0 :                         const char *talloc_str;
   31716           0 :                         PyObject *unicode = NULL;
   31717           0 :                         if (PyUnicode_Check(py_server_name)) {
   31718           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   31719           0 :                                 if (unicode == NULL) {
   31720           0 :                                         PyErr_NoMemory();
   31721           0 :                                         return false;
   31722             :                                 }
   31723           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31724           0 :                         } else if (PyBytes_Check(py_server_name)) {
   31725           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   31726             :                         } else {
   31727           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   31728           0 :                                 return false;
   31729             :                         }
   31730           0 :                         talloc_str = talloc_strdup(r, test_str);
   31731           0 :                         if (unicode != NULL) {
   31732           0 :                                 Py_DECREF(unicode);
   31733             :                         }
   31734           0 :                         if (talloc_str == NULL) {
   31735           0 :                                 PyErr_NoMemory();
   31736           0 :                                 return false;
   31737             :                         }
   31738           0 :                         r->in.server_name = talloc_str;
   31739             :                 }
   31740             :         }
   31741           0 :         if (py_account_name == NULL) {
   31742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   31743           0 :                 return false;
   31744             :         }
   31745           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   31746           0 :         if (r->in.account_name == NULL) {
   31747           0 :                 PyErr_NoMemory();
   31748           0 :                 return false;
   31749             :         }
   31750             :         {
   31751           0 :                 const char *test_str;
   31752           0 :                 const char *talloc_str;
   31753           0 :                 PyObject *unicode = NULL;
   31754           0 :                 if (PyUnicode_Check(py_account_name)) {
   31755           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   31756           0 :                         if (unicode == NULL) {
   31757           0 :                                 PyErr_NoMemory();
   31758           0 :                                 return false;
   31759             :                         }
   31760           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31761           0 :                 } else if (PyBytes_Check(py_account_name)) {
   31762           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   31763             :                 } else {
   31764           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   31765           0 :                         return false;
   31766             :                 }
   31767           0 :                 talloc_str = talloc_strdup(r, test_str);
   31768           0 :                 if (unicode != NULL) {
   31769           0 :                         Py_DECREF(unicode);
   31770             :                 }
   31771           0 :                 if (talloc_str == NULL) {
   31772           0 :                         PyErr_NoMemory();
   31773           0 :                         return false;
   31774             :                 }
   31775           0 :                 r->in.account_name = talloc_str;
   31776             :         }
   31777           0 :         if (py_secure_channel_type == NULL) {
   31778           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   31779           0 :                 return false;
   31780             :         }
   31781             :         {
   31782           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   31783           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   31784           0 :                         unsigned long long test_var;
   31785           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   31786           0 :                         if (PyErr_Occurred() != NULL) {
   31787           0 :                                 return false;
   31788             :                         }
   31789           0 :                         if (test_var > uint_max) {
   31790           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31791             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31792           0 :                                 return false;
   31793             :                         }
   31794           0 :                         r->in.secure_channel_type = test_var;
   31795             :                 } else {
   31796           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31797             :                           PyLong_Type.tp_name);
   31798           0 :                         return false;
   31799             :                 }
   31800             :         }
   31801           0 :         if (py_computer_name == NULL) {
   31802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   31803           0 :                 return false;
   31804             :         }
   31805           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   31806           0 :         if (r->in.computer_name == NULL) {
   31807           0 :                 PyErr_NoMemory();
   31808           0 :                 return false;
   31809             :         }
   31810             :         {
   31811           0 :                 const char *test_str;
   31812           0 :                 const char *talloc_str;
   31813           0 :                 PyObject *unicode = NULL;
   31814           0 :                 if (PyUnicode_Check(py_computer_name)) {
   31815           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   31816           0 :                         if (unicode == NULL) {
   31817           0 :                                 PyErr_NoMemory();
   31818           0 :                                 return false;
   31819             :                         }
   31820           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31821           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   31822           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   31823             :                 } else {
   31824           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   31825           0 :                         return false;
   31826             :                 }
   31827           0 :                 talloc_str = talloc_strdup(r, test_str);
   31828           0 :                 if (unicode != NULL) {
   31829           0 :                         Py_DECREF(unicode);
   31830             :                 }
   31831           0 :                 if (talloc_str == NULL) {
   31832           0 :                         PyErr_NoMemory();
   31833           0 :                         return false;
   31834             :                 }
   31835           0 :                 r->in.computer_name = talloc_str;
   31836             :         }
   31837           0 :         if (py_credential == NULL) {
   31838           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   31839           0 :                 return false;
   31840             :         }
   31841           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   31842           0 :         if (r->in.credential == NULL) {
   31843           0 :                 PyErr_NoMemory();
   31844           0 :                 return false;
   31845             :         }
   31846           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   31847           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   31848           0 :                 PyErr_NoMemory();
   31849           0 :                 return false;
   31850             :         }
   31851           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   31852           0 :         if (py_new_password == NULL) {
   31853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_password");
   31854           0 :                 return false;
   31855             :         }
   31856           0 :         r->in.new_password = talloc_ptrtype(r, r->in.new_password);
   31857           0 :         if (r->in.new_password == NULL) {
   31858           0 :                 PyErr_NoMemory();
   31859           0 :                 return false;
   31860             :         }
   31861           0 :         PY_CHECK_TYPE(samr_Password_Type, py_new_password, return false;);
   31862           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_new_password)) == NULL) {
   31863           0 :                 PyErr_NoMemory();
   31864           0 :                 return false;
   31865             :         }
   31866           0 :         r->in.new_password = (struct samr_Password *)pytalloc_get_ptr(py_new_password);
   31867           0 :         return true;
   31868             : }
   31869             : 
   31870           0 : static PyObject *unpack_py_netr_ServerPasswordSet_args_out(struct netr_ServerPasswordSet *r)
   31871             : {
   31872           0 :         PyObject *result;
   31873           0 :         PyObject *py_return_authenticator;
   31874           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   31875           0 :         result = py_return_authenticator;
   31876           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   31877           0 :                 PyErr_SetNTSTATUS(r->out.result);
   31878           0 :                 return NULL;
   31879             :         }
   31880             : 
   31881           0 :         return result;
   31882             : }
   31883             : 
   31884             : 
   31885           0 : static PyObject *py_netr_DatabaseDeltas_in_get_logon_server(PyObject *obj, void *closure)
   31886             : {
   31887           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31888           0 :         PyObject *py_logon_server;
   31889           0 :         if (object->in.logon_server == NULL) {
   31890           0 :                 Py_RETURN_NONE;
   31891             :         }
   31892           0 :         if (object->in.logon_server == NULL) {
   31893           0 :                 py_logon_server = Py_None;
   31894           0 :                 Py_INCREF(py_logon_server);
   31895             :         } else {
   31896           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   31897             :         }
   31898           0 :         return py_logon_server;
   31899             : }
   31900             : 
   31901           0 : static int py_netr_DatabaseDeltas_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   31902             : {
   31903           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31904           0 :         if (value == NULL) {
   31905           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   31906           0 :                 return -1;
   31907             :         }
   31908           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   31909           0 :         if (object->in.logon_server == NULL) {
   31910           0 :                 PyErr_NoMemory();
   31911           0 :                 return -1;
   31912             :         }
   31913             :         {
   31914           0 :                 const char *test_str;
   31915           0 :                 const char *talloc_str;
   31916           0 :                 PyObject *unicode = NULL;
   31917           0 :                 if (PyUnicode_Check(value)) {
   31918           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31919           0 :                         if (unicode == NULL) {
   31920           0 :                                 PyErr_NoMemory();
   31921           0 :                                 return -1;
   31922             :                         }
   31923           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31924           0 :                 } else if (PyBytes_Check(value)) {
   31925           0 :                         test_str = PyBytes_AS_STRING(value);
   31926             :                 } else {
   31927           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31928           0 :                         return -1;
   31929             :                 }
   31930           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31931           0 :                 if (unicode != NULL) {
   31932           0 :                         Py_DECREF(unicode);
   31933             :                 }
   31934           0 :                 if (talloc_str == NULL) {
   31935           0 :                         PyErr_NoMemory();
   31936           0 :                         return -1;
   31937             :                 }
   31938           0 :                 object->in.logon_server = talloc_str;
   31939             :         }
   31940           0 :         return 0;
   31941             : }
   31942             : 
   31943           0 : static PyObject *py_netr_DatabaseDeltas_in_get_computername(PyObject *obj, void *closure)
   31944             : {
   31945           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31946           0 :         PyObject *py_computername;
   31947           0 :         if (object->in.computername == NULL) {
   31948           0 :                 Py_RETURN_NONE;
   31949             :         }
   31950           0 :         if (object->in.computername == NULL) {
   31951           0 :                 py_computername = Py_None;
   31952           0 :                 Py_INCREF(py_computername);
   31953             :         } else {
   31954           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   31955             :         }
   31956           0 :         return py_computername;
   31957             : }
   31958             : 
   31959           0 : static int py_netr_DatabaseDeltas_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   31960             : {
   31961           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31962           0 :         if (value == NULL) {
   31963           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   31964           0 :                 return -1;
   31965             :         }
   31966           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   31967           0 :         if (object->in.computername == NULL) {
   31968           0 :                 PyErr_NoMemory();
   31969           0 :                 return -1;
   31970             :         }
   31971             :         {
   31972           0 :                 const char *test_str;
   31973           0 :                 const char *talloc_str;
   31974           0 :                 PyObject *unicode = NULL;
   31975           0 :                 if (PyUnicode_Check(value)) {
   31976           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31977           0 :                         if (unicode == NULL) {
   31978           0 :                                 PyErr_NoMemory();
   31979           0 :                                 return -1;
   31980             :                         }
   31981           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31982           0 :                 } else if (PyBytes_Check(value)) {
   31983           0 :                         test_str = PyBytes_AS_STRING(value);
   31984             :                 } else {
   31985           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31986           0 :                         return -1;
   31987             :                 }
   31988           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31989           0 :                 if (unicode != NULL) {
   31990           0 :                         Py_DECREF(unicode);
   31991             :                 }
   31992           0 :                 if (talloc_str == NULL) {
   31993           0 :                         PyErr_NoMemory();
   31994           0 :                         return -1;
   31995             :                 }
   31996           0 :                 object->in.computername = talloc_str;
   31997             :         }
   31998           0 :         return 0;
   31999             : }
   32000             : 
   32001           0 : static PyObject *py_netr_DatabaseDeltas_in_get_credential(PyObject *obj, void *closure)
   32002             : {
   32003           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   32004           0 :         PyObject *py_credential;
   32005           0 :         if (object->in.credential == NULL) {
   32006           0 :                 Py_RETURN_NONE;
   32007             :         }
   32008           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   32009           0 :         return py_credential;
   32010             : }
   32011             : 
   32012           0 : static int py_netr_DatabaseDeltas_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   32013             : {
   32014           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32015           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   32016           0 :         if (value == NULL) {
   32017           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   32018           0 :                 return -1;
   32019             :         }
   32020           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   32021           0 :         if (object->in.credential == NULL) {
   32022           0 :                 PyErr_NoMemory();
   32023           0 :                 return -1;
   32024             :         }
   32025           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   32026           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32027           0 :                 PyErr_NoMemory();
   32028           0 :                 return -1;
   32029             :         }
   32030           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   32031           0 :         return 0;
   32032             : }
   32033             : 
   32034           0 : static PyObject *py_netr_DatabaseDeltas_in_get_return_authenticator(PyObject *obj, void *closure)
   32035             : {
   32036           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   32037           0 :         PyObject *py_return_authenticator;
   32038           0 :         if (object->in.return_authenticator == NULL) {
   32039           0 :                 Py_RETURN_NONE;
   32040             :         }
   32041           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   32042           0 :         return py_return_authenticator;
   32043             : }
   32044             : 
   32045           0 : static int py_netr_DatabaseDeltas_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   32046             : {
   32047           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32048           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   32049           0 :         if (value == NULL) {
   32050           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   32051           0 :                 return -1;
   32052             :         }
   32053           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   32054           0 :         if (object->in.return_authenticator == NULL) {
   32055           0 :                 PyErr_NoMemory();
   32056           0 :                 return -1;
   32057             :         }
   32058           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   32059           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32060           0 :                 PyErr_NoMemory();
   32061           0 :                 return -1;
   32062             :         }
   32063           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   32064           0 :         return 0;
   32065             : }
   32066             : 
   32067           0 : static PyObject *py_netr_DatabaseDeltas_out_get_return_authenticator(PyObject *obj, void *closure)
   32068             : {
   32069           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   32070           0 :         PyObject *py_return_authenticator;
   32071           0 :         if (object->out.return_authenticator == NULL) {
   32072           0 :                 Py_RETURN_NONE;
   32073             :         }
   32074           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   32075           0 :         return py_return_authenticator;
   32076             : }
   32077             : 
   32078           0 : static int py_netr_DatabaseDeltas_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   32079             : {
   32080           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32081           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   32082           0 :         if (value == NULL) {
   32083           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   32084           0 :                 return -1;
   32085             :         }
   32086           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   32087           0 :         if (object->out.return_authenticator == NULL) {
   32088           0 :                 PyErr_NoMemory();
   32089           0 :                 return -1;
   32090             :         }
   32091           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   32092           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32093           0 :                 PyErr_NoMemory();
   32094           0 :                 return -1;
   32095             :         }
   32096           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   32097           0 :         return 0;
   32098             : }
   32099             : 
   32100           0 : static PyObject *py_netr_DatabaseDeltas_in_get_database_id(PyObject *obj, void *closure)
   32101             : {
   32102           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   32103           0 :         PyObject *py_database_id;
   32104           0 :         py_database_id = PyLong_FromUnsignedLongLong((uint32_t)object->in.database_id);
   32105           0 :         return py_database_id;
   32106             : }
   32107             : 
   32108           0 : static int py_netr_DatabaseDeltas_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
   32109             : {
   32110           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32111           0 :         if (value == NULL) {
   32112           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.database_id");
   32113           0 :                 return -1;
   32114             :         }
   32115             :         {
   32116           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
   32117           0 :                 if (PyLong_Check(value)) {
   32118           0 :                         unsigned long long test_var;
   32119           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32120           0 :                         if (PyErr_Occurred() != NULL) {
   32121           0 :                                 return -1;
   32122             :                         }
   32123           0 :                         if (test_var > uint_max) {
   32124           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32125             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32126           0 :                                 return -1;
   32127             :                         }
   32128           0 :                         object->in.database_id = test_var;
   32129             :                 } else {
   32130           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32131             :                           PyLong_Type.tp_name);
   32132           0 :                         return -1;
   32133             :                 }
   32134             :         }
   32135           0 :         return 0;
   32136             : }
   32137             : 
   32138           0 : static PyObject *py_netr_DatabaseDeltas_in_get_sequence_num(PyObject *obj, void *closure)
   32139             : {
   32140           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   32141           0 :         PyObject *py_sequence_num;
   32142           0 :         if (object->in.sequence_num == NULL) {
   32143           0 :                 Py_RETURN_NONE;
   32144             :         }
   32145           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(*object->in.sequence_num);
   32146           0 :         return py_sequence_num;
   32147             : }
   32148             : 
   32149           0 : static int py_netr_DatabaseDeltas_in_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
   32150             : {
   32151           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32152           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sequence_num));
   32153           0 :         if (value == NULL) {
   32154           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sequence_num");
   32155           0 :                 return -1;
   32156             :         }
   32157           0 :         object->in.sequence_num = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sequence_num);
   32158           0 :         if (object->in.sequence_num == NULL) {
   32159           0 :                 PyErr_NoMemory();
   32160           0 :                 return -1;
   32161             :         }
   32162             :         {
   32163           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sequence_num));
   32164           0 :                 if (PyLong_Check(value)) {
   32165           0 :                         unsigned long long test_var;
   32166           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32167           0 :                         if (PyErr_Occurred() != NULL) {
   32168           0 :                                 return -1;
   32169             :                         }
   32170           0 :                         if (test_var > uint_max) {
   32171           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32172             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32173           0 :                                 return -1;
   32174             :                         }
   32175           0 :                         *object->in.sequence_num = test_var;
   32176             :                 } else {
   32177           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32178             :                           PyLong_Type.tp_name);
   32179           0 :                         return -1;
   32180             :                 }
   32181             :         }
   32182           0 :         return 0;
   32183             : }
   32184             : 
   32185           0 : static PyObject *py_netr_DatabaseDeltas_out_get_sequence_num(PyObject *obj, void *closure)
   32186             : {
   32187           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   32188           0 :         PyObject *py_sequence_num;
   32189           0 :         if (object->out.sequence_num == NULL) {
   32190           0 :                 Py_RETURN_NONE;
   32191             :         }
   32192           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(*object->out.sequence_num);
   32193           0 :         return py_sequence_num;
   32194             : }
   32195             : 
   32196           0 : static int py_netr_DatabaseDeltas_out_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
   32197             : {
   32198           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32199           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sequence_num));
   32200           0 :         if (value == NULL) {
   32201           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sequence_num");
   32202           0 :                 return -1;
   32203             :         }
   32204           0 :         object->out.sequence_num = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sequence_num);
   32205           0 :         if (object->out.sequence_num == NULL) {
   32206           0 :                 PyErr_NoMemory();
   32207           0 :                 return -1;
   32208             :         }
   32209             :         {
   32210           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sequence_num));
   32211           0 :                 if (PyLong_Check(value)) {
   32212           0 :                         unsigned long long test_var;
   32213           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32214           0 :                         if (PyErr_Occurred() != NULL) {
   32215           0 :                                 return -1;
   32216             :                         }
   32217           0 :                         if (test_var > uint_max) {
   32218           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32219             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32220           0 :                                 return -1;
   32221             :                         }
   32222           0 :                         *object->out.sequence_num = test_var;
   32223             :                 } else {
   32224           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32225             :                           PyLong_Type.tp_name);
   32226           0 :                         return -1;
   32227             :                 }
   32228             :         }
   32229           0 :         return 0;
   32230             : }
   32231             : 
   32232           0 : static PyObject *py_netr_DatabaseDeltas_out_get_delta_enum_array(PyObject *obj, void *closure)
   32233             : {
   32234           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   32235           0 :         PyObject *py_delta_enum_array;
   32236           0 :         if (object->out.delta_enum_array == NULL) {
   32237           0 :                 Py_RETURN_NONE;
   32238             :         }
   32239           0 :         if (*object->out.delta_enum_array == NULL) {
   32240           0 :                 py_delta_enum_array = Py_None;
   32241           0 :                 Py_INCREF(py_delta_enum_array);
   32242             :         } else {
   32243           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   32244             :         }
   32245           0 :         return py_delta_enum_array;
   32246             : }
   32247             : 
   32248           0 : static int py_netr_DatabaseDeltas_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   32249             : {
   32250           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32251           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   32252           0 :         if (value == NULL) {
   32253           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.delta_enum_array");
   32254           0 :                 return -1;
   32255             :         }
   32256           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   32257           0 :         if (object->out.delta_enum_array == NULL) {
   32258           0 :                 PyErr_NoMemory();
   32259           0 :                 return -1;
   32260             :         }
   32261           0 :         if (value == Py_None) {
   32262           0 :                 *object->out.delta_enum_array = NULL;
   32263             :         } else {
   32264           0 :                 *object->out.delta_enum_array = NULL;
   32265           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   32266           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32267           0 :                         PyErr_NoMemory();
   32268           0 :                         return -1;
   32269             :                 }
   32270           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   32271             :         }
   32272           0 :         return 0;
   32273             : }
   32274             : 
   32275           0 : static PyObject *py_netr_DatabaseDeltas_in_get_preferredmaximumlength(PyObject *obj, void *closure)
   32276             : {
   32277           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   32278           0 :         PyObject *py_preferredmaximumlength;
   32279           0 :         py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)object->in.preferredmaximumlength);
   32280           0 :         return py_preferredmaximumlength;
   32281             : }
   32282             : 
   32283           0 : static int py_netr_DatabaseDeltas_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
   32284             : {
   32285           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32286           0 :         if (value == NULL) {
   32287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.preferredmaximumlength");
   32288           0 :                 return -1;
   32289             :         }
   32290             :         {
   32291           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
   32292           0 :                 if (PyLong_Check(value)) {
   32293           0 :                         unsigned long long test_var;
   32294           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32295           0 :                         if (PyErr_Occurred() != NULL) {
   32296           0 :                                 return -1;
   32297             :                         }
   32298           0 :                         if (test_var > uint_max) {
   32299           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32300             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32301           0 :                                 return -1;
   32302             :                         }
   32303           0 :                         object->in.preferredmaximumlength = test_var;
   32304             :                 } else {
   32305           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32306             :                           PyLong_Type.tp_name);
   32307           0 :                         return -1;
   32308             :                 }
   32309             :         }
   32310           0 :         return 0;
   32311             : }
   32312             : 
   32313           0 : static PyObject *py_netr_DatabaseDeltas_get_result(PyObject *obj, void *closure)
   32314             : {
   32315           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   32316           0 :         PyObject *py_result;
   32317           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   32318           0 :         return py_result;
   32319             : }
   32320             : 
   32321           0 : static int py_netr_DatabaseDeltas_set_result(PyObject *py_obj, PyObject *value, void *closure)
   32322             : {
   32323           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32324           0 :         if (value == NULL) {
   32325           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   32326           0 :                 return -1;
   32327             :         }
   32328           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   32329           0 :         return 0;
   32330             : }
   32331             : 
   32332             : static PyGetSetDef py_netr_DatabaseDeltas_getsetters[] = {
   32333             :         {
   32334             :                 .name = discard_const_p(char, "in_logon_server"),
   32335             :                 .get = py_netr_DatabaseDeltas_in_get_logon_server,
   32336             :                 .set = py_netr_DatabaseDeltas_in_set_logon_server,
   32337             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   32338             :         },
   32339             :         {
   32340             :                 .name = discard_const_p(char, "in_computername"),
   32341             :                 .get = py_netr_DatabaseDeltas_in_get_computername,
   32342             :                 .set = py_netr_DatabaseDeltas_in_set_computername,
   32343             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   32344             :         },
   32345             :         {
   32346             :                 .name = discard_const_p(char, "in_credential"),
   32347             :                 .get = py_netr_DatabaseDeltas_in_get_credential,
   32348             :                 .set = py_netr_DatabaseDeltas_in_set_credential,
   32349             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   32350             :         },
   32351             :         {
   32352             :                 .name = discard_const_p(char, "in_return_authenticator"),
   32353             :                 .get = py_netr_DatabaseDeltas_in_get_return_authenticator,
   32354             :                 .set = py_netr_DatabaseDeltas_in_set_return_authenticator,
   32355             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   32356             :         },
   32357             :         {
   32358             :                 .name = discard_const_p(char, "out_return_authenticator"),
   32359             :                 .get = py_netr_DatabaseDeltas_out_get_return_authenticator,
   32360             :                 .set = py_netr_DatabaseDeltas_out_set_return_authenticator,
   32361             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   32362             :         },
   32363             :         {
   32364             :                 .name = discard_const_p(char, "in_database_id"),
   32365             :                 .get = py_netr_DatabaseDeltas_in_get_database_id,
   32366             :                 .set = py_netr_DatabaseDeltas_in_set_database_id,
   32367             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
   32368             :         },
   32369             :         {
   32370             :                 .name = discard_const_p(char, "in_sequence_num"),
   32371             :                 .get = py_netr_DatabaseDeltas_in_get_sequence_num,
   32372             :                 .set = py_netr_DatabaseDeltas_in_set_sequence_num,
   32373             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   32374             :         },
   32375             :         {
   32376             :                 .name = discard_const_p(char, "out_sequence_num"),
   32377             :                 .get = py_netr_DatabaseDeltas_out_get_sequence_num,
   32378             :                 .set = py_netr_DatabaseDeltas_out_set_sequence_num,
   32379             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   32380             :         },
   32381             :         {
   32382             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   32383             :                 .get = py_netr_DatabaseDeltas_out_get_delta_enum_array,
   32384             :                 .set = py_netr_DatabaseDeltas_out_set_delta_enum_array,
   32385             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   32386             :         },
   32387             :         {
   32388             :                 .name = discard_const_p(char, "in_preferredmaximumlength"),
   32389             :                 .get = py_netr_DatabaseDeltas_in_get_preferredmaximumlength,
   32390             :                 .set = py_netr_DatabaseDeltas_in_set_preferredmaximumlength,
   32391             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32392             :         },
   32393             :         {
   32394             :                 .name = discard_const_p(char, "result"),
   32395             :                 .get = py_netr_DatabaseDeltas_get_result,
   32396             :                 .set = py_netr_DatabaseDeltas_set_result,
   32397             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   32398             :         },
   32399             :         { .name = NULL }
   32400             : };
   32401             : 
   32402           0 : static PyObject *py_netr_DatabaseDeltas_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32403             : {
   32404           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseDeltas, type);
   32405           0 :         struct netr_DatabaseDeltas *_self = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(self);
   32406           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   32407           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   32408           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   32409           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   32410           0 :         _self->in.sequence_num = talloc_zero(mem_ctx, uint64_t);
   32411           0 :         _self->out.sequence_num = talloc_zero(mem_ctx, uint64_t);
   32412             :         /* a pointer to a NULL pointer */
   32413           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   32414           0 :         return self;
   32415             : }
   32416             : 
   32417           0 : static PyObject *py_netr_DatabaseDeltas_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   32418             : {
   32419             : 
   32420             : 
   32421           0 :         return PyLong_FromLong(7);
   32422             : }
   32423             : 
   32424           0 : static PyObject *py_netr_DatabaseDeltas_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   32425             : {
   32426           0 :         const struct ndr_interface_call *call = NULL;
   32427           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32428           0 :         PyObject *ret = NULL;
   32429           0 :         struct ndr_push *push = NULL;
   32430           0 :         DATA_BLOB blob;
   32431           0 :         enum ndr_err_code err;
   32432             : 
   32433           0 :         if (ndr_table_netlogon.num_calls < 8) {
   32434           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_pack");
   32435           0 :                 return NULL;
   32436             :         }
   32437           0 :         call = &ndr_table_netlogon.calls[7];
   32438             : 
   32439           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   32440           0 :         if (push == NULL) {
   32441           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32442           0 :                 return NULL;
   32443             :         }
   32444             : 
   32445           0 :         push->flags |= ndr_push_flags;
   32446             : 
   32447           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   32448           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32449           0 :                 TALLOC_FREE(push);
   32450           0 :                 PyErr_SetNdrError(err);
   32451           0 :                 return NULL;
   32452             :         }
   32453           0 :         blob = ndr_push_blob(push);
   32454           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   32455           0 :         TALLOC_FREE(push);
   32456           0 :         return ret;
   32457             : }
   32458             : 
   32459           0 : static PyObject *py_netr_DatabaseDeltas_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32460             : {
   32461           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32462           0 :         PyObject *bigendian_obj = NULL;
   32463           0 :         PyObject *ndr64_obj = NULL;
   32464           0 :         libndr_flags ndr_push_flags = 0;
   32465             : 
   32466           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   32467             :                 discard_const_p(char *, kwnames),
   32468             :                 &bigendian_obj,
   32469             :                 &ndr64_obj)) {
   32470           0 :                 return NULL;
   32471             :         }
   32472             : 
   32473           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32474           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32475             :         }
   32476           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32477           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32478             :         }
   32479             : 
   32480           0 :         return py_netr_DatabaseDeltas_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   32481             : }
   32482             : 
   32483           0 : static PyObject *py_netr_DatabaseDeltas_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32484             : {
   32485           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32486           0 :         PyObject *bigendian_obj = NULL;
   32487           0 :         PyObject *ndr64_obj = NULL;
   32488           0 :         libndr_flags ndr_push_flags = 0;
   32489             : 
   32490           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   32491             :                 discard_const_p(char *, kwnames),
   32492             :                 &bigendian_obj,
   32493             :                 &ndr64_obj)) {
   32494           0 :                 return NULL;
   32495             :         }
   32496             : 
   32497           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32498           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32499             :         }
   32500           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32501           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32502             :         }
   32503             : 
   32504           0 :         return py_netr_DatabaseDeltas_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   32505             : }
   32506             : 
   32507           0 : static PyObject *py_netr_DatabaseDeltas_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   32508             : {
   32509           0 :         const struct ndr_interface_call *call = NULL;
   32510           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32511           0 :         struct ndr_pull *pull = NULL;
   32512           0 :         enum ndr_err_code err;
   32513             : 
   32514           0 :         if (ndr_table_netlogon.num_calls < 8) {
   32515           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_unpack");
   32516           0 :                 return NULL;
   32517             :         }
   32518           0 :         call = &ndr_table_netlogon.calls[7];
   32519             : 
   32520           0 :         pull = ndr_pull_init_blob(blob, object);
   32521           0 :         if (pull == NULL) {
   32522           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32523           0 :                 return NULL;
   32524             :         }
   32525             : 
   32526           0 :         pull->flags |= ndr_pull_flags;
   32527             : 
   32528           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   32529           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32530           0 :                 TALLOC_FREE(pull);
   32531           0 :                 PyErr_SetNdrError(err);
   32532           0 :                 return NULL;
   32533             :         }
   32534           0 :         if (!allow_remaining) {
   32535           0 :                 uint32_t highest_ofs;
   32536             : 
   32537           0 :                 if (pull->offset > pull->relative_highest_offset) {
   32538           0 :                         highest_ofs = pull->offset;
   32539             :                 } else {
   32540           0 :                         highest_ofs = pull->relative_highest_offset;
   32541             :                 }
   32542           0 :                 if (highest_ofs < pull->data_size) {
   32543           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   32544             :                                 "not all bytes consumed ofs[%u] size[%u]",
   32545             :                                 highest_ofs, pull->data_size);
   32546           0 :                         TALLOC_FREE(pull);
   32547           0 :                         PyErr_SetNdrError(err);
   32548           0 :                         return NULL;
   32549             :                 }
   32550             :         }
   32551             : 
   32552           0 :         TALLOC_FREE(pull);
   32553           0 :         Py_RETURN_NONE;
   32554             : }
   32555             : 
   32556           0 : static PyObject *py_netr_DatabaseDeltas_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32557             : {
   32558           0 :         DATA_BLOB blob;
   32559           0 :         Py_ssize_t blob_length = 0;
   32560           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32561           0 :         PyObject *bigendian_obj = NULL;
   32562           0 :         PyObject *ndr64_obj = NULL;
   32563           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32564           0 :         PyObject *allow_remaining_obj = NULL;
   32565           0 :         bool allow_remaining = false;
   32566             : 
   32567           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   32568             :                 discard_const_p(char *, kwnames),
   32569             :                 &blob.data, &blob_length,
   32570             :                 &bigendian_obj,
   32571             :                 &ndr64_obj,
   32572             :                 &allow_remaining_obj)) {
   32573           0 :                 return NULL;
   32574             :         }
   32575           0 :         blob.length = blob_length;
   32576             : 
   32577           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32578           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32579             :         }
   32580           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32581           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32582             :         }
   32583             : 
   32584           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32585           0 :                 allow_remaining = true;
   32586             :         }
   32587             : 
   32588           0 :         return py_netr_DatabaseDeltas_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   32589             : }
   32590             : 
   32591           0 : static PyObject *py_netr_DatabaseDeltas_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32592             : {
   32593           0 :         DATA_BLOB blob;
   32594           0 :         Py_ssize_t blob_length = 0;
   32595           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32596           0 :         PyObject *bigendian_obj = NULL;
   32597           0 :         PyObject *ndr64_obj = NULL;
   32598           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32599           0 :         PyObject *allow_remaining_obj = NULL;
   32600           0 :         bool allow_remaining = false;
   32601             : 
   32602           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   32603             :                 discard_const_p(char *, kwnames),
   32604             :                 &blob.data, &blob_length,
   32605             :                 &bigendian_obj,
   32606             :                 &ndr64_obj,
   32607             :                 &allow_remaining_obj)) {
   32608           0 :                 return NULL;
   32609             :         }
   32610           0 :         blob.length = blob_length;
   32611             : 
   32612           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32613           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32614             :         }
   32615           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32616           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32617             :         }
   32618             : 
   32619           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32620           0 :                 allow_remaining = true;
   32621             :         }
   32622             : 
   32623           0 :         return py_netr_DatabaseDeltas_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   32624             : }
   32625             : 
   32626           0 : static PyObject *py_netr_DatabaseDeltas_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   32627             : {
   32628           0 :         const struct ndr_interface_call *call = NULL;
   32629           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32630           0 :         PyObject *ret;
   32631           0 :         char *retstr;
   32632             : 
   32633           0 :         if (ndr_table_netlogon.num_calls < 8) {
   32634           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_print");
   32635           0 :                 return NULL;
   32636             :         }
   32637           0 :         call = &ndr_table_netlogon.calls[7];
   32638             : 
   32639           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   32640           0 :         ret = PyUnicode_FromString(retstr);
   32641           0 :         TALLOC_FREE(retstr);
   32642             : 
   32643           0 :         return ret;
   32644             : }
   32645             : 
   32646           0 : static PyObject *py_netr_DatabaseDeltas_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32647             : {
   32648           0 :         return py_netr_DatabaseDeltas_ndr_print(py_obj, "netr_DatabaseDeltas_in", NDR_IN);
   32649             : }
   32650             : 
   32651           0 : static PyObject *py_netr_DatabaseDeltas_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32652             : {
   32653           0 :         return py_netr_DatabaseDeltas_ndr_print(py_obj, "netr_DatabaseDeltas_out", NDR_OUT);
   32654             : }
   32655             : 
   32656             : static PyMethodDef py_netr_DatabaseDeltas_methods[] = {
   32657             :         { "opnum", (PyCFunction)py_netr_DatabaseDeltas_ndr_opnum, METH_NOARGS|METH_CLASS,
   32658             :                 "netlogon.netr_DatabaseDeltas.opnum() -> 7 (0x07) " },
   32659             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   32660             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   32661             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   32662             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   32663             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   32664             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   32665             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   32666             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   32667             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseDeltas_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   32668             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseDeltas_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   32669             :         { NULL, NULL, 0, NULL }
   32670             : };
   32671             : 
   32672             : 
   32673             : static PyTypeObject netr_DatabaseDeltas_Type = {
   32674             :         PyVarObject_HEAD_INIT(NULL, 0)
   32675             :         .tp_name = "netlogon.netr_DatabaseDeltas",
   32676             :         .tp_getset = py_netr_DatabaseDeltas_getsetters,
   32677             :         .tp_methods = py_netr_DatabaseDeltas_methods,
   32678             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32679             :         .tp_new = py_netr_DatabaseDeltas_new,
   32680             : };
   32681             : 
   32682           0 : static bool pack_py_netr_DatabaseDeltas_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseDeltas *r)
   32683             : {
   32684           0 :         PyObject *py_logon_server;
   32685           0 :         PyObject *py_computername;
   32686           0 :         PyObject *py_credential;
   32687           0 :         PyObject *py_return_authenticator;
   32688           0 :         PyObject *py_database_id;
   32689           0 :         PyObject *py_sequence_num;
   32690           0 :         PyObject *py_preferredmaximumlength;
   32691           0 :         const char *kwnames[] = {
   32692             :                 "logon_server", "computername", "credential", "return_authenticator", "database_id", "sequence_num", "preferredmaximumlength", NULL
   32693             :         };
   32694             : 
   32695           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:netr_DatabaseDeltas", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_database_id, &py_sequence_num, &py_preferredmaximumlength)) {
   32696           0 :                 return false;
   32697             :         }
   32698             : 
   32699           0 :         if (py_logon_server == NULL) {
   32700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   32701           0 :                 return false;
   32702             :         }
   32703           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   32704           0 :         if (r->in.logon_server == NULL) {
   32705           0 :                 PyErr_NoMemory();
   32706           0 :                 return false;
   32707             :         }
   32708             :         {
   32709           0 :                 const char *test_str;
   32710           0 :                 const char *talloc_str;
   32711           0 :                 PyObject *unicode = NULL;
   32712           0 :                 if (PyUnicode_Check(py_logon_server)) {
   32713           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   32714           0 :                         if (unicode == NULL) {
   32715           0 :                                 PyErr_NoMemory();
   32716           0 :                                 return false;
   32717             :                         }
   32718           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32719           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   32720           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   32721             :                 } else {
   32722           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   32723           0 :                         return false;
   32724             :                 }
   32725           0 :                 talloc_str = talloc_strdup(r, test_str);
   32726           0 :                 if (unicode != NULL) {
   32727           0 :                         Py_DECREF(unicode);
   32728             :                 }
   32729           0 :                 if (talloc_str == NULL) {
   32730           0 :                         PyErr_NoMemory();
   32731           0 :                         return false;
   32732             :                 }
   32733           0 :                 r->in.logon_server = talloc_str;
   32734             :         }
   32735           0 :         if (py_computername == NULL) {
   32736           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   32737           0 :                 return false;
   32738             :         }
   32739           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   32740           0 :         if (r->in.computername == NULL) {
   32741           0 :                 PyErr_NoMemory();
   32742           0 :                 return false;
   32743             :         }
   32744             :         {
   32745           0 :                 const char *test_str;
   32746           0 :                 const char *talloc_str;
   32747           0 :                 PyObject *unicode = NULL;
   32748           0 :                 if (PyUnicode_Check(py_computername)) {
   32749           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   32750           0 :                         if (unicode == NULL) {
   32751           0 :                                 PyErr_NoMemory();
   32752           0 :                                 return false;
   32753             :                         }
   32754           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32755           0 :                 } else if (PyBytes_Check(py_computername)) {
   32756           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   32757             :                 } else {
   32758           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   32759           0 :                         return false;
   32760             :                 }
   32761           0 :                 talloc_str = talloc_strdup(r, test_str);
   32762           0 :                 if (unicode != NULL) {
   32763           0 :                         Py_DECREF(unicode);
   32764             :                 }
   32765           0 :                 if (talloc_str == NULL) {
   32766           0 :                         PyErr_NoMemory();
   32767           0 :                         return false;
   32768             :                 }
   32769           0 :                 r->in.computername = talloc_str;
   32770             :         }
   32771           0 :         if (py_credential == NULL) {
   32772           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   32773           0 :                 return false;
   32774             :         }
   32775           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   32776           0 :         if (r->in.credential == NULL) {
   32777           0 :                 PyErr_NoMemory();
   32778           0 :                 return false;
   32779             :         }
   32780           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   32781           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   32782           0 :                 PyErr_NoMemory();
   32783           0 :                 return false;
   32784             :         }
   32785           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   32786           0 :         if (py_return_authenticator == NULL) {
   32787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   32788           0 :                 return false;
   32789             :         }
   32790           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   32791           0 :         if (r->in.return_authenticator == NULL) {
   32792           0 :                 PyErr_NoMemory();
   32793           0 :                 return false;
   32794             :         }
   32795           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   32796           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   32797           0 :                 PyErr_NoMemory();
   32798           0 :                 return false;
   32799             :         }
   32800           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   32801           0 :         if (py_database_id == NULL) {
   32802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.database_id");
   32803           0 :                 return false;
   32804             :         }
   32805             :         {
   32806           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
   32807           0 :                 if (PyLong_Check(py_database_id)) {
   32808           0 :                         unsigned long long test_var;
   32809           0 :                         test_var = PyLong_AsUnsignedLongLong(py_database_id);
   32810           0 :                         if (PyErr_Occurred() != NULL) {
   32811           0 :                                 return false;
   32812             :                         }
   32813           0 :                         if (test_var > uint_max) {
   32814           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32815             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32816           0 :                                 return false;
   32817             :                         }
   32818           0 :                         r->in.database_id = test_var;
   32819             :                 } else {
   32820           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32821             :                           PyLong_Type.tp_name);
   32822           0 :                         return false;
   32823             :                 }
   32824             :         }
   32825           0 :         if (py_sequence_num == NULL) {
   32826           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sequence_num");
   32827           0 :                 return false;
   32828             :         }
   32829           0 :         r->in.sequence_num = talloc_ptrtype(r, r->in.sequence_num);
   32830           0 :         if (r->in.sequence_num == NULL) {
   32831           0 :                 PyErr_NoMemory();
   32832           0 :                 return false;
   32833             :         }
   32834             :         {
   32835           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sequence_num));
   32836           0 :                 if (PyLong_Check(py_sequence_num)) {
   32837           0 :                         unsigned long long test_var;
   32838           0 :                         test_var = PyLong_AsUnsignedLongLong(py_sequence_num);
   32839           0 :                         if (PyErr_Occurred() != NULL) {
   32840           0 :                                 return false;
   32841             :                         }
   32842           0 :                         if (test_var > uint_max) {
   32843           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32844             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32845           0 :                                 return false;
   32846             :                         }
   32847           0 :                         *r->in.sequence_num = test_var;
   32848             :                 } else {
   32849           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32850             :                           PyLong_Type.tp_name);
   32851           0 :                         return false;
   32852             :                 }
   32853             :         }
   32854           0 :         if (py_preferredmaximumlength == NULL) {
   32855           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.preferredmaximumlength");
   32856           0 :                 return false;
   32857             :         }
   32858             :         {
   32859           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
   32860           0 :                 if (PyLong_Check(py_preferredmaximumlength)) {
   32861           0 :                         unsigned long long test_var;
   32862           0 :                         test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
   32863           0 :                         if (PyErr_Occurred() != NULL) {
   32864           0 :                                 return false;
   32865             :                         }
   32866           0 :                         if (test_var > uint_max) {
   32867           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32868             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32869           0 :                                 return false;
   32870             :                         }
   32871           0 :                         r->in.preferredmaximumlength = test_var;
   32872             :                 } else {
   32873           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32874             :                           PyLong_Type.tp_name);
   32875           0 :                         return false;
   32876             :                 }
   32877             :         }
   32878           0 :         return true;
   32879             : }
   32880             : 
   32881           0 : static PyObject *unpack_py_netr_DatabaseDeltas_args_out(struct netr_DatabaseDeltas *r)
   32882             : {
   32883           0 :         PyObject *result;
   32884           0 :         PyObject *py_return_authenticator;
   32885           0 :         PyObject *py_sequence_num;
   32886           0 :         PyObject *py_delta_enum_array;
   32887           0 :         result = PyTuple_New(3);
   32888           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   32889           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   32890           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(*r->out.sequence_num);
   32891           0 :         PyTuple_SetItem(result, 1, py_sequence_num);
   32892           0 :         if (*r->out.delta_enum_array == NULL) {
   32893           0 :                 py_delta_enum_array = Py_None;
   32894           0 :                 Py_INCREF(py_delta_enum_array);
   32895             :         } else {
   32896           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   32897             :         }
   32898           0 :         PyTuple_SetItem(result, 2, py_delta_enum_array);
   32899           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   32900           0 :                 PyErr_SetNTSTATUS(r->out.result);
   32901           0 :                 return NULL;
   32902             :         }
   32903             : 
   32904           0 :         return result;
   32905             : }
   32906             : 
   32907             : 
   32908           0 : static PyObject *py_netr_DatabaseSync_in_get_logon_server(PyObject *obj, void *closure)
   32909             : {
   32910           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32911           0 :         PyObject *py_logon_server;
   32912           0 :         if (object->in.logon_server == NULL) {
   32913           0 :                 Py_RETURN_NONE;
   32914             :         }
   32915           0 :         if (object->in.logon_server == NULL) {
   32916           0 :                 py_logon_server = Py_None;
   32917           0 :                 Py_INCREF(py_logon_server);
   32918             :         } else {
   32919           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   32920             :         }
   32921           0 :         return py_logon_server;
   32922             : }
   32923             : 
   32924           0 : static int py_netr_DatabaseSync_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   32925             : {
   32926           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32927           0 :         if (value == NULL) {
   32928           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   32929           0 :                 return -1;
   32930             :         }
   32931           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   32932           0 :         if (object->in.logon_server == NULL) {
   32933           0 :                 PyErr_NoMemory();
   32934           0 :                 return -1;
   32935             :         }
   32936             :         {
   32937           0 :                 const char *test_str;
   32938           0 :                 const char *talloc_str;
   32939           0 :                 PyObject *unicode = NULL;
   32940           0 :                 if (PyUnicode_Check(value)) {
   32941           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32942           0 :                         if (unicode == NULL) {
   32943           0 :                                 PyErr_NoMemory();
   32944           0 :                                 return -1;
   32945             :                         }
   32946           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32947           0 :                 } else if (PyBytes_Check(value)) {
   32948           0 :                         test_str = PyBytes_AS_STRING(value);
   32949             :                 } else {
   32950           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32951           0 :                         return -1;
   32952             :                 }
   32953           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32954           0 :                 if (unicode != NULL) {
   32955           0 :                         Py_DECREF(unicode);
   32956             :                 }
   32957           0 :                 if (talloc_str == NULL) {
   32958           0 :                         PyErr_NoMemory();
   32959           0 :                         return -1;
   32960             :                 }
   32961           0 :                 object->in.logon_server = talloc_str;
   32962             :         }
   32963           0 :         return 0;
   32964             : }
   32965             : 
   32966           0 : static PyObject *py_netr_DatabaseSync_in_get_computername(PyObject *obj, void *closure)
   32967             : {
   32968           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32969           0 :         PyObject *py_computername;
   32970           0 :         if (object->in.computername == NULL) {
   32971           0 :                 Py_RETURN_NONE;
   32972             :         }
   32973           0 :         if (object->in.computername == NULL) {
   32974           0 :                 py_computername = Py_None;
   32975           0 :                 Py_INCREF(py_computername);
   32976             :         } else {
   32977           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   32978             :         }
   32979           0 :         return py_computername;
   32980             : }
   32981             : 
   32982           0 : static int py_netr_DatabaseSync_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   32983             : {
   32984           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32985           0 :         if (value == NULL) {
   32986           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   32987           0 :                 return -1;
   32988             :         }
   32989           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   32990           0 :         if (object->in.computername == NULL) {
   32991           0 :                 PyErr_NoMemory();
   32992           0 :                 return -1;
   32993             :         }
   32994             :         {
   32995           0 :                 const char *test_str;
   32996           0 :                 const char *talloc_str;
   32997           0 :                 PyObject *unicode = NULL;
   32998           0 :                 if (PyUnicode_Check(value)) {
   32999           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33000           0 :                         if (unicode == NULL) {
   33001           0 :                                 PyErr_NoMemory();
   33002           0 :                                 return -1;
   33003             :                         }
   33004           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33005           0 :                 } else if (PyBytes_Check(value)) {
   33006           0 :                         test_str = PyBytes_AS_STRING(value);
   33007             :                 } else {
   33008           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33009           0 :                         return -1;
   33010             :                 }
   33011           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33012           0 :                 if (unicode != NULL) {
   33013           0 :                         Py_DECREF(unicode);
   33014             :                 }
   33015           0 :                 if (talloc_str == NULL) {
   33016           0 :                         PyErr_NoMemory();
   33017           0 :                         return -1;
   33018             :                 }
   33019           0 :                 object->in.computername = talloc_str;
   33020             :         }
   33021           0 :         return 0;
   33022             : }
   33023             : 
   33024           0 : static PyObject *py_netr_DatabaseSync_in_get_credential(PyObject *obj, void *closure)
   33025             : {
   33026           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   33027           0 :         PyObject *py_credential;
   33028           0 :         if (object->in.credential == NULL) {
   33029           0 :                 Py_RETURN_NONE;
   33030             :         }
   33031           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   33032           0 :         return py_credential;
   33033             : }
   33034             : 
   33035           0 : static int py_netr_DatabaseSync_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   33036             : {
   33037           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33038           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   33039           0 :         if (value == NULL) {
   33040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   33041           0 :                 return -1;
   33042             :         }
   33043           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   33044           0 :         if (object->in.credential == NULL) {
   33045           0 :                 PyErr_NoMemory();
   33046           0 :                 return -1;
   33047             :         }
   33048           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   33049           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33050           0 :                 PyErr_NoMemory();
   33051           0 :                 return -1;
   33052             :         }
   33053           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   33054           0 :         return 0;
   33055             : }
   33056             : 
   33057           0 : static PyObject *py_netr_DatabaseSync_in_get_return_authenticator(PyObject *obj, void *closure)
   33058             : {
   33059           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   33060           0 :         PyObject *py_return_authenticator;
   33061           0 :         if (object->in.return_authenticator == NULL) {
   33062           0 :                 Py_RETURN_NONE;
   33063             :         }
   33064           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   33065           0 :         return py_return_authenticator;
   33066             : }
   33067             : 
   33068           0 : static int py_netr_DatabaseSync_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   33069             : {
   33070           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33071           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   33072           0 :         if (value == NULL) {
   33073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   33074           0 :                 return -1;
   33075             :         }
   33076           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   33077           0 :         if (object->in.return_authenticator == NULL) {
   33078           0 :                 PyErr_NoMemory();
   33079           0 :                 return -1;
   33080             :         }
   33081           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   33082           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33083           0 :                 PyErr_NoMemory();
   33084           0 :                 return -1;
   33085             :         }
   33086           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   33087           0 :         return 0;
   33088             : }
   33089             : 
   33090           0 : static PyObject *py_netr_DatabaseSync_out_get_return_authenticator(PyObject *obj, void *closure)
   33091             : {
   33092           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   33093           0 :         PyObject *py_return_authenticator;
   33094           0 :         if (object->out.return_authenticator == NULL) {
   33095           0 :                 Py_RETURN_NONE;
   33096             :         }
   33097           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   33098           0 :         return py_return_authenticator;
   33099             : }
   33100             : 
   33101           0 : static int py_netr_DatabaseSync_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   33102             : {
   33103           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33104           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   33105           0 :         if (value == NULL) {
   33106           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   33107           0 :                 return -1;
   33108             :         }
   33109           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   33110           0 :         if (object->out.return_authenticator == NULL) {
   33111           0 :                 PyErr_NoMemory();
   33112           0 :                 return -1;
   33113             :         }
   33114           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   33115           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33116           0 :                 PyErr_NoMemory();
   33117           0 :                 return -1;
   33118             :         }
   33119           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   33120           0 :         return 0;
   33121             : }
   33122             : 
   33123           0 : static PyObject *py_netr_DatabaseSync_in_get_database_id(PyObject *obj, void *closure)
   33124             : {
   33125           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   33126           0 :         PyObject *py_database_id;
   33127           0 :         py_database_id = PyLong_FromUnsignedLongLong((uint32_t)object->in.database_id);
   33128           0 :         return py_database_id;
   33129             : }
   33130             : 
   33131           0 : static int py_netr_DatabaseSync_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
   33132             : {
   33133           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33134           0 :         if (value == NULL) {
   33135           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.database_id");
   33136           0 :                 return -1;
   33137             :         }
   33138             :         {
   33139           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
   33140           0 :                 if (PyLong_Check(value)) {
   33141           0 :                         unsigned long long test_var;
   33142           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33143           0 :                         if (PyErr_Occurred() != NULL) {
   33144           0 :                                 return -1;
   33145             :                         }
   33146           0 :                         if (test_var > uint_max) {
   33147           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33148             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33149           0 :                                 return -1;
   33150             :                         }
   33151           0 :                         object->in.database_id = test_var;
   33152             :                 } else {
   33153           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33154             :                           PyLong_Type.tp_name);
   33155           0 :                         return -1;
   33156             :                 }
   33157             :         }
   33158           0 :         return 0;
   33159             : }
   33160             : 
   33161           0 : static PyObject *py_netr_DatabaseSync_in_get_sync_context(PyObject *obj, void *closure)
   33162             : {
   33163           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   33164           0 :         PyObject *py_sync_context;
   33165           0 :         if (object->in.sync_context == NULL) {
   33166           0 :                 Py_RETURN_NONE;
   33167             :         }
   33168           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*object->in.sync_context);
   33169           0 :         return py_sync_context;
   33170             : }
   33171             : 
   33172           0 : static int py_netr_DatabaseSync_in_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   33173             : {
   33174           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33175           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sync_context));
   33176           0 :         if (value == NULL) {
   33177           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sync_context");
   33178           0 :                 return -1;
   33179             :         }
   33180           0 :         object->in.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sync_context);
   33181           0 :         if (object->in.sync_context == NULL) {
   33182           0 :                 PyErr_NoMemory();
   33183           0 :                 return -1;
   33184             :         }
   33185             :         {
   33186           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sync_context));
   33187           0 :                 if (PyLong_Check(value)) {
   33188           0 :                         unsigned long long test_var;
   33189           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33190           0 :                         if (PyErr_Occurred() != NULL) {
   33191           0 :                                 return -1;
   33192             :                         }
   33193           0 :                         if (test_var > uint_max) {
   33194           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33195             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33196           0 :                                 return -1;
   33197             :                         }
   33198           0 :                         *object->in.sync_context = test_var;
   33199             :                 } else {
   33200           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33201             :                           PyLong_Type.tp_name);
   33202           0 :                         return -1;
   33203             :                 }
   33204             :         }
   33205           0 :         return 0;
   33206             : }
   33207             : 
   33208           0 : static PyObject *py_netr_DatabaseSync_out_get_sync_context(PyObject *obj, void *closure)
   33209             : {
   33210           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   33211           0 :         PyObject *py_sync_context;
   33212           0 :         if (object->out.sync_context == NULL) {
   33213           0 :                 Py_RETURN_NONE;
   33214             :         }
   33215           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*object->out.sync_context);
   33216           0 :         return py_sync_context;
   33217             : }
   33218             : 
   33219           0 : static int py_netr_DatabaseSync_out_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   33220             : {
   33221           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33222           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sync_context));
   33223           0 :         if (value == NULL) {
   33224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sync_context");
   33225           0 :                 return -1;
   33226             :         }
   33227           0 :         object->out.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sync_context);
   33228           0 :         if (object->out.sync_context == NULL) {
   33229           0 :                 PyErr_NoMemory();
   33230           0 :                 return -1;
   33231             :         }
   33232             :         {
   33233           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sync_context));
   33234           0 :                 if (PyLong_Check(value)) {
   33235           0 :                         unsigned long long test_var;
   33236           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33237           0 :                         if (PyErr_Occurred() != NULL) {
   33238           0 :                                 return -1;
   33239             :                         }
   33240           0 :                         if (test_var > uint_max) {
   33241           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33242             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33243           0 :                                 return -1;
   33244             :                         }
   33245           0 :                         *object->out.sync_context = test_var;
   33246             :                 } else {
   33247           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33248             :                           PyLong_Type.tp_name);
   33249           0 :                         return -1;
   33250             :                 }
   33251             :         }
   33252           0 :         return 0;
   33253             : }
   33254             : 
   33255           0 : static PyObject *py_netr_DatabaseSync_out_get_delta_enum_array(PyObject *obj, void *closure)
   33256             : {
   33257           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   33258           0 :         PyObject *py_delta_enum_array;
   33259           0 :         if (object->out.delta_enum_array == NULL) {
   33260           0 :                 Py_RETURN_NONE;
   33261             :         }
   33262           0 :         if (*object->out.delta_enum_array == NULL) {
   33263           0 :                 py_delta_enum_array = Py_None;
   33264           0 :                 Py_INCREF(py_delta_enum_array);
   33265             :         } else {
   33266           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   33267             :         }
   33268           0 :         return py_delta_enum_array;
   33269             : }
   33270             : 
   33271           0 : static int py_netr_DatabaseSync_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   33272             : {
   33273           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33274           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   33275           0 :         if (value == NULL) {
   33276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.delta_enum_array");
   33277           0 :                 return -1;
   33278             :         }
   33279           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   33280           0 :         if (object->out.delta_enum_array == NULL) {
   33281           0 :                 PyErr_NoMemory();
   33282           0 :                 return -1;
   33283             :         }
   33284           0 :         if (value == Py_None) {
   33285           0 :                 *object->out.delta_enum_array = NULL;
   33286             :         } else {
   33287           0 :                 *object->out.delta_enum_array = NULL;
   33288           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   33289           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33290           0 :                         PyErr_NoMemory();
   33291           0 :                         return -1;
   33292             :                 }
   33293           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   33294             :         }
   33295           0 :         return 0;
   33296             : }
   33297             : 
   33298           0 : static PyObject *py_netr_DatabaseSync_in_get_preferredmaximumlength(PyObject *obj, void *closure)
   33299             : {
   33300           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   33301           0 :         PyObject *py_preferredmaximumlength;
   33302           0 :         py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)object->in.preferredmaximumlength);
   33303           0 :         return py_preferredmaximumlength;
   33304             : }
   33305             : 
   33306           0 : static int py_netr_DatabaseSync_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
   33307             : {
   33308           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33309           0 :         if (value == NULL) {
   33310           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.preferredmaximumlength");
   33311           0 :                 return -1;
   33312             :         }
   33313             :         {
   33314           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
   33315           0 :                 if (PyLong_Check(value)) {
   33316           0 :                         unsigned long long test_var;
   33317           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33318           0 :                         if (PyErr_Occurred() != NULL) {
   33319           0 :                                 return -1;
   33320             :                         }
   33321           0 :                         if (test_var > uint_max) {
   33322           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33323             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33324           0 :                                 return -1;
   33325             :                         }
   33326           0 :                         object->in.preferredmaximumlength = test_var;
   33327             :                 } else {
   33328           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33329             :                           PyLong_Type.tp_name);
   33330           0 :                         return -1;
   33331             :                 }
   33332             :         }
   33333           0 :         return 0;
   33334             : }
   33335             : 
   33336           0 : static PyObject *py_netr_DatabaseSync_get_result(PyObject *obj, void *closure)
   33337             : {
   33338           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   33339           0 :         PyObject *py_result;
   33340           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   33341           0 :         return py_result;
   33342             : }
   33343             : 
   33344           0 : static int py_netr_DatabaseSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
   33345             : {
   33346           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33347           0 :         if (value == NULL) {
   33348           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   33349           0 :                 return -1;
   33350             :         }
   33351           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   33352           0 :         return 0;
   33353             : }
   33354             : 
   33355             : static PyGetSetDef py_netr_DatabaseSync_getsetters[] = {
   33356             :         {
   33357             :                 .name = discard_const_p(char, "in_logon_server"),
   33358             :                 .get = py_netr_DatabaseSync_in_get_logon_server,
   33359             :                 .set = py_netr_DatabaseSync_in_set_logon_server,
   33360             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33361             :         },
   33362             :         {
   33363             :                 .name = discard_const_p(char, "in_computername"),
   33364             :                 .get = py_netr_DatabaseSync_in_get_computername,
   33365             :                 .set = py_netr_DatabaseSync_in_set_computername,
   33366             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33367             :         },
   33368             :         {
   33369             :                 .name = discard_const_p(char, "in_credential"),
   33370             :                 .get = py_netr_DatabaseSync_in_get_credential,
   33371             :                 .set = py_netr_DatabaseSync_in_set_credential,
   33372             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   33373             :         },
   33374             :         {
   33375             :                 .name = discard_const_p(char, "in_return_authenticator"),
   33376             :                 .get = py_netr_DatabaseSync_in_get_return_authenticator,
   33377             :                 .set = py_netr_DatabaseSync_in_set_return_authenticator,
   33378             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   33379             :         },
   33380             :         {
   33381             :                 .name = discard_const_p(char, "out_return_authenticator"),
   33382             :                 .get = py_netr_DatabaseSync_out_get_return_authenticator,
   33383             :                 .set = py_netr_DatabaseSync_out_set_return_authenticator,
   33384             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   33385             :         },
   33386             :         {
   33387             :                 .name = discard_const_p(char, "in_database_id"),
   33388             :                 .get = py_netr_DatabaseSync_in_get_database_id,
   33389             :                 .set = py_netr_DatabaseSync_in_set_database_id,
   33390             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
   33391             :         },
   33392             :         {
   33393             :                 .name = discard_const_p(char, "in_sync_context"),
   33394             :                 .get = py_netr_DatabaseSync_in_get_sync_context,
   33395             :                 .set = py_netr_DatabaseSync_in_set_sync_context,
   33396             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33397             :         },
   33398             :         {
   33399             :                 .name = discard_const_p(char, "out_sync_context"),
   33400             :                 .get = py_netr_DatabaseSync_out_get_sync_context,
   33401             :                 .set = py_netr_DatabaseSync_out_set_sync_context,
   33402             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33403             :         },
   33404             :         {
   33405             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   33406             :                 .get = py_netr_DatabaseSync_out_get_delta_enum_array,
   33407             :                 .set = py_netr_DatabaseSync_out_set_delta_enum_array,
   33408             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   33409             :         },
   33410             :         {
   33411             :                 .name = discard_const_p(char, "in_preferredmaximumlength"),
   33412             :                 .get = py_netr_DatabaseSync_in_get_preferredmaximumlength,
   33413             :                 .set = py_netr_DatabaseSync_in_set_preferredmaximumlength,
   33414             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33415             :         },
   33416             :         {
   33417             :                 .name = discard_const_p(char, "result"),
   33418             :                 .get = py_netr_DatabaseSync_get_result,
   33419             :                 .set = py_netr_DatabaseSync_set_result,
   33420             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   33421             :         },
   33422             :         { .name = NULL }
   33423             : };
   33424             : 
   33425           0 : static PyObject *py_netr_DatabaseSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33426             : {
   33427           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseSync, type);
   33428           0 :         struct netr_DatabaseSync *_self = (struct netr_DatabaseSync *)pytalloc_get_ptr(self);
   33429           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   33430           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   33431           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   33432           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   33433           0 :         _self->in.sync_context = talloc_zero(mem_ctx, uint32_t);
   33434           0 :         _self->out.sync_context = talloc_zero(mem_ctx, uint32_t);
   33435             :         /* a pointer to a NULL pointer */
   33436           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   33437           0 :         return self;
   33438             : }
   33439             : 
   33440           0 : static PyObject *py_netr_DatabaseSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   33441             : {
   33442             : 
   33443             : 
   33444           0 :         return PyLong_FromLong(8);
   33445             : }
   33446             : 
   33447           0 : static PyObject *py_netr_DatabaseSync_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   33448             : {
   33449           0 :         const struct ndr_interface_call *call = NULL;
   33450           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33451           0 :         PyObject *ret = NULL;
   33452           0 :         struct ndr_push *push = NULL;
   33453           0 :         DATA_BLOB blob;
   33454           0 :         enum ndr_err_code err;
   33455             : 
   33456           0 :         if (ndr_table_netlogon.num_calls < 9) {
   33457           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_pack");
   33458           0 :                 return NULL;
   33459             :         }
   33460           0 :         call = &ndr_table_netlogon.calls[8];
   33461             : 
   33462           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   33463           0 :         if (push == NULL) {
   33464           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33465           0 :                 return NULL;
   33466             :         }
   33467             : 
   33468           0 :         push->flags |= ndr_push_flags;
   33469             : 
   33470           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   33471           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33472           0 :                 TALLOC_FREE(push);
   33473           0 :                 PyErr_SetNdrError(err);
   33474           0 :                 return NULL;
   33475             :         }
   33476           0 :         blob = ndr_push_blob(push);
   33477           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   33478           0 :         TALLOC_FREE(push);
   33479           0 :         return ret;
   33480             : }
   33481             : 
   33482           0 : static PyObject *py_netr_DatabaseSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33483             : {
   33484           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33485           0 :         PyObject *bigendian_obj = NULL;
   33486           0 :         PyObject *ndr64_obj = NULL;
   33487           0 :         libndr_flags ndr_push_flags = 0;
   33488             : 
   33489           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   33490             :                 discard_const_p(char *, kwnames),
   33491             :                 &bigendian_obj,
   33492             :                 &ndr64_obj)) {
   33493           0 :                 return NULL;
   33494             :         }
   33495             : 
   33496           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33497           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33498             :         }
   33499           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33500           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33501             :         }
   33502             : 
   33503           0 :         return py_netr_DatabaseSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   33504             : }
   33505             : 
   33506           0 : static PyObject *py_netr_DatabaseSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33507             : {
   33508           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33509           0 :         PyObject *bigendian_obj = NULL;
   33510           0 :         PyObject *ndr64_obj = NULL;
   33511           0 :         libndr_flags ndr_push_flags = 0;
   33512             : 
   33513           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   33514             :                 discard_const_p(char *, kwnames),
   33515             :                 &bigendian_obj,
   33516             :                 &ndr64_obj)) {
   33517           0 :                 return NULL;
   33518             :         }
   33519             : 
   33520           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33521           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33522             :         }
   33523           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33524           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33525             :         }
   33526             : 
   33527           0 :         return py_netr_DatabaseSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   33528             : }
   33529             : 
   33530           0 : static PyObject *py_netr_DatabaseSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   33531             : {
   33532           0 :         const struct ndr_interface_call *call = NULL;
   33533           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33534           0 :         struct ndr_pull *pull = NULL;
   33535           0 :         enum ndr_err_code err;
   33536             : 
   33537           0 :         if (ndr_table_netlogon.num_calls < 9) {
   33538           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_unpack");
   33539           0 :                 return NULL;
   33540             :         }
   33541           0 :         call = &ndr_table_netlogon.calls[8];
   33542             : 
   33543           0 :         pull = ndr_pull_init_blob(blob, object);
   33544           0 :         if (pull == NULL) {
   33545           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33546           0 :                 return NULL;
   33547             :         }
   33548             : 
   33549           0 :         pull->flags |= ndr_pull_flags;
   33550             : 
   33551           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   33552           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33553           0 :                 TALLOC_FREE(pull);
   33554           0 :                 PyErr_SetNdrError(err);
   33555           0 :                 return NULL;
   33556             :         }
   33557           0 :         if (!allow_remaining) {
   33558           0 :                 uint32_t highest_ofs;
   33559             : 
   33560           0 :                 if (pull->offset > pull->relative_highest_offset) {
   33561           0 :                         highest_ofs = pull->offset;
   33562             :                 } else {
   33563           0 :                         highest_ofs = pull->relative_highest_offset;
   33564             :                 }
   33565           0 :                 if (highest_ofs < pull->data_size) {
   33566           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   33567             :                                 "not all bytes consumed ofs[%u] size[%u]",
   33568             :                                 highest_ofs, pull->data_size);
   33569           0 :                         TALLOC_FREE(pull);
   33570           0 :                         PyErr_SetNdrError(err);
   33571           0 :                         return NULL;
   33572             :                 }
   33573             :         }
   33574             : 
   33575           0 :         TALLOC_FREE(pull);
   33576           0 :         Py_RETURN_NONE;
   33577             : }
   33578             : 
   33579           0 : static PyObject *py_netr_DatabaseSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33580             : {
   33581           0 :         DATA_BLOB blob;
   33582           0 :         Py_ssize_t blob_length = 0;
   33583           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33584           0 :         PyObject *bigendian_obj = NULL;
   33585           0 :         PyObject *ndr64_obj = NULL;
   33586           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33587           0 :         PyObject *allow_remaining_obj = NULL;
   33588           0 :         bool allow_remaining = false;
   33589             : 
   33590           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   33591             :                 discard_const_p(char *, kwnames),
   33592             :                 &blob.data, &blob_length,
   33593             :                 &bigendian_obj,
   33594             :                 &ndr64_obj,
   33595             :                 &allow_remaining_obj)) {
   33596           0 :                 return NULL;
   33597             :         }
   33598           0 :         blob.length = blob_length;
   33599             : 
   33600           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33601           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33602             :         }
   33603           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33604           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33605             :         }
   33606             : 
   33607           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33608           0 :                 allow_remaining = true;
   33609             :         }
   33610             : 
   33611           0 :         return py_netr_DatabaseSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   33612             : }
   33613             : 
   33614           0 : static PyObject *py_netr_DatabaseSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33615             : {
   33616           0 :         DATA_BLOB blob;
   33617           0 :         Py_ssize_t blob_length = 0;
   33618           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33619           0 :         PyObject *bigendian_obj = NULL;
   33620           0 :         PyObject *ndr64_obj = NULL;
   33621           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33622           0 :         PyObject *allow_remaining_obj = NULL;
   33623           0 :         bool allow_remaining = false;
   33624             : 
   33625           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   33626             :                 discard_const_p(char *, kwnames),
   33627             :                 &blob.data, &blob_length,
   33628             :                 &bigendian_obj,
   33629             :                 &ndr64_obj,
   33630             :                 &allow_remaining_obj)) {
   33631           0 :                 return NULL;
   33632             :         }
   33633           0 :         blob.length = blob_length;
   33634             : 
   33635           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33636           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33637             :         }
   33638           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33639           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33640             :         }
   33641             : 
   33642           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33643           0 :                 allow_remaining = true;
   33644             :         }
   33645             : 
   33646           0 :         return py_netr_DatabaseSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   33647             : }
   33648             : 
   33649           0 : static PyObject *py_netr_DatabaseSync_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   33650             : {
   33651           0 :         const struct ndr_interface_call *call = NULL;
   33652           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33653           0 :         PyObject *ret;
   33654           0 :         char *retstr;
   33655             : 
   33656           0 :         if (ndr_table_netlogon.num_calls < 9) {
   33657           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_print");
   33658           0 :                 return NULL;
   33659             :         }
   33660           0 :         call = &ndr_table_netlogon.calls[8];
   33661             : 
   33662           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   33663           0 :         ret = PyUnicode_FromString(retstr);
   33664           0 :         TALLOC_FREE(retstr);
   33665             : 
   33666           0 :         return ret;
   33667             : }
   33668             : 
   33669           0 : static PyObject *py_netr_DatabaseSync_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33670             : {
   33671           0 :         return py_netr_DatabaseSync_ndr_print(py_obj, "netr_DatabaseSync_in", NDR_IN);
   33672             : }
   33673             : 
   33674           0 : static PyObject *py_netr_DatabaseSync_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33675             : {
   33676           0 :         return py_netr_DatabaseSync_ndr_print(py_obj, "netr_DatabaseSync_out", NDR_OUT);
   33677             : }
   33678             : 
   33679             : static PyMethodDef py_netr_DatabaseSync_methods[] = {
   33680             :         { "opnum", (PyCFunction)py_netr_DatabaseSync_ndr_opnum, METH_NOARGS|METH_CLASS,
   33681             :                 "netlogon.netr_DatabaseSync.opnum() -> 8 (0x08) " },
   33682             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   33683             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   33684             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   33685             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   33686             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   33687             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   33688             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   33689             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   33690             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseSync_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   33691             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseSync_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   33692             :         { NULL, NULL, 0, NULL }
   33693             : };
   33694             : 
   33695             : 
   33696             : static PyTypeObject netr_DatabaseSync_Type = {
   33697             :         PyVarObject_HEAD_INIT(NULL, 0)
   33698             :         .tp_name = "netlogon.netr_DatabaseSync",
   33699             :         .tp_getset = py_netr_DatabaseSync_getsetters,
   33700             :         .tp_methods = py_netr_DatabaseSync_methods,
   33701             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33702             :         .tp_new = py_netr_DatabaseSync_new,
   33703             : };
   33704             : 
   33705           0 : static bool pack_py_netr_DatabaseSync_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseSync *r)
   33706             : {
   33707           0 :         PyObject *py_logon_server;
   33708           0 :         PyObject *py_computername;
   33709           0 :         PyObject *py_credential;
   33710           0 :         PyObject *py_return_authenticator;
   33711           0 :         PyObject *py_database_id;
   33712           0 :         PyObject *py_sync_context;
   33713           0 :         PyObject *py_preferredmaximumlength;
   33714           0 :         const char *kwnames[] = {
   33715             :                 "logon_server", "computername", "credential", "return_authenticator", "database_id", "sync_context", "preferredmaximumlength", NULL
   33716             :         };
   33717             : 
   33718           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:netr_DatabaseSync", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_database_id, &py_sync_context, &py_preferredmaximumlength)) {
   33719           0 :                 return false;
   33720             :         }
   33721             : 
   33722           0 :         if (py_logon_server == NULL) {
   33723           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   33724           0 :                 return false;
   33725             :         }
   33726           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   33727           0 :         if (r->in.logon_server == NULL) {
   33728           0 :                 PyErr_NoMemory();
   33729           0 :                 return false;
   33730             :         }
   33731             :         {
   33732           0 :                 const char *test_str;
   33733           0 :                 const char *talloc_str;
   33734           0 :                 PyObject *unicode = NULL;
   33735           0 :                 if (PyUnicode_Check(py_logon_server)) {
   33736           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   33737           0 :                         if (unicode == NULL) {
   33738           0 :                                 PyErr_NoMemory();
   33739           0 :                                 return false;
   33740             :                         }
   33741           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33742           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   33743           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   33744             :                 } else {
   33745           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   33746           0 :                         return false;
   33747             :                 }
   33748           0 :                 talloc_str = talloc_strdup(r, test_str);
   33749           0 :                 if (unicode != NULL) {
   33750           0 :                         Py_DECREF(unicode);
   33751             :                 }
   33752           0 :                 if (talloc_str == NULL) {
   33753           0 :                         PyErr_NoMemory();
   33754           0 :                         return false;
   33755             :                 }
   33756           0 :                 r->in.logon_server = talloc_str;
   33757             :         }
   33758           0 :         if (py_computername == NULL) {
   33759           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   33760           0 :                 return false;
   33761             :         }
   33762           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   33763           0 :         if (r->in.computername == NULL) {
   33764           0 :                 PyErr_NoMemory();
   33765           0 :                 return false;
   33766             :         }
   33767             :         {
   33768           0 :                 const char *test_str;
   33769           0 :                 const char *talloc_str;
   33770           0 :                 PyObject *unicode = NULL;
   33771           0 :                 if (PyUnicode_Check(py_computername)) {
   33772           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   33773           0 :                         if (unicode == NULL) {
   33774           0 :                                 PyErr_NoMemory();
   33775           0 :                                 return false;
   33776             :                         }
   33777           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33778           0 :                 } else if (PyBytes_Check(py_computername)) {
   33779           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   33780             :                 } else {
   33781           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   33782           0 :                         return false;
   33783             :                 }
   33784           0 :                 talloc_str = talloc_strdup(r, test_str);
   33785           0 :                 if (unicode != NULL) {
   33786           0 :                         Py_DECREF(unicode);
   33787             :                 }
   33788           0 :                 if (talloc_str == NULL) {
   33789           0 :                         PyErr_NoMemory();
   33790           0 :                         return false;
   33791             :                 }
   33792           0 :                 r->in.computername = talloc_str;
   33793             :         }
   33794           0 :         if (py_credential == NULL) {
   33795           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   33796           0 :                 return false;
   33797             :         }
   33798           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   33799           0 :         if (r->in.credential == NULL) {
   33800           0 :                 PyErr_NoMemory();
   33801           0 :                 return false;
   33802             :         }
   33803           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   33804           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   33805           0 :                 PyErr_NoMemory();
   33806           0 :                 return false;
   33807             :         }
   33808           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   33809           0 :         if (py_return_authenticator == NULL) {
   33810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   33811           0 :                 return false;
   33812             :         }
   33813           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   33814           0 :         if (r->in.return_authenticator == NULL) {
   33815           0 :                 PyErr_NoMemory();
   33816           0 :                 return false;
   33817             :         }
   33818           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   33819           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   33820           0 :                 PyErr_NoMemory();
   33821           0 :                 return false;
   33822             :         }
   33823           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   33824           0 :         if (py_database_id == NULL) {
   33825           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.database_id");
   33826           0 :                 return false;
   33827             :         }
   33828             :         {
   33829           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
   33830           0 :                 if (PyLong_Check(py_database_id)) {
   33831           0 :                         unsigned long long test_var;
   33832           0 :                         test_var = PyLong_AsUnsignedLongLong(py_database_id);
   33833           0 :                         if (PyErr_Occurred() != NULL) {
   33834           0 :                                 return false;
   33835             :                         }
   33836           0 :                         if (test_var > uint_max) {
   33837           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33838             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33839           0 :                                 return false;
   33840             :                         }
   33841           0 :                         r->in.database_id = test_var;
   33842             :                 } else {
   33843           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33844             :                           PyLong_Type.tp_name);
   33845           0 :                         return false;
   33846             :                 }
   33847             :         }
   33848           0 :         if (py_sync_context == NULL) {
   33849           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sync_context");
   33850           0 :                 return false;
   33851             :         }
   33852           0 :         r->in.sync_context = talloc_ptrtype(r, r->in.sync_context);
   33853           0 :         if (r->in.sync_context == NULL) {
   33854           0 :                 PyErr_NoMemory();
   33855           0 :                 return false;
   33856             :         }
   33857             :         {
   33858           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sync_context));
   33859           0 :                 if (PyLong_Check(py_sync_context)) {
   33860           0 :                         unsigned long long test_var;
   33861           0 :                         test_var = PyLong_AsUnsignedLongLong(py_sync_context);
   33862           0 :                         if (PyErr_Occurred() != NULL) {
   33863           0 :                                 return false;
   33864             :                         }
   33865           0 :                         if (test_var > uint_max) {
   33866           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33867             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33868           0 :                                 return false;
   33869             :                         }
   33870           0 :                         *r->in.sync_context = test_var;
   33871             :                 } else {
   33872           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33873             :                           PyLong_Type.tp_name);
   33874           0 :                         return false;
   33875             :                 }
   33876             :         }
   33877           0 :         if (py_preferredmaximumlength == NULL) {
   33878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.preferredmaximumlength");
   33879           0 :                 return false;
   33880             :         }
   33881             :         {
   33882           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
   33883           0 :                 if (PyLong_Check(py_preferredmaximumlength)) {
   33884           0 :                         unsigned long long test_var;
   33885           0 :                         test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
   33886           0 :                         if (PyErr_Occurred() != NULL) {
   33887           0 :                                 return false;
   33888             :                         }
   33889           0 :                         if (test_var > uint_max) {
   33890           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33891             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33892           0 :                                 return false;
   33893             :                         }
   33894           0 :                         r->in.preferredmaximumlength = test_var;
   33895             :                 } else {
   33896           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33897             :                           PyLong_Type.tp_name);
   33898           0 :                         return false;
   33899             :                 }
   33900             :         }
   33901           0 :         return true;
   33902             : }
   33903             : 
   33904           0 : static PyObject *unpack_py_netr_DatabaseSync_args_out(struct netr_DatabaseSync *r)
   33905             : {
   33906           0 :         PyObject *result;
   33907           0 :         PyObject *py_return_authenticator;
   33908           0 :         PyObject *py_sync_context;
   33909           0 :         PyObject *py_delta_enum_array;
   33910           0 :         result = PyTuple_New(3);
   33911           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   33912           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   33913           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*r->out.sync_context);
   33914           0 :         PyTuple_SetItem(result, 1, py_sync_context);
   33915           0 :         if (*r->out.delta_enum_array == NULL) {
   33916           0 :                 py_delta_enum_array = Py_None;
   33917           0 :                 Py_INCREF(py_delta_enum_array);
   33918             :         } else {
   33919           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   33920             :         }
   33921           0 :         PyTuple_SetItem(result, 2, py_delta_enum_array);
   33922           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   33923           0 :                 PyErr_SetNTSTATUS(r->out.result);
   33924           0 :                 return NULL;
   33925             :         }
   33926             : 
   33927           0 :         return result;
   33928             : }
   33929             : 
   33930             : 
   33931           0 : static PyObject *py_netr_AccountDeltas_in_get_logon_server(PyObject *obj, void *closure)
   33932             : {
   33933           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33934           0 :         PyObject *py_logon_server;
   33935           0 :         if (object->in.logon_server == NULL) {
   33936           0 :                 Py_RETURN_NONE;
   33937             :         }
   33938           0 :         if (object->in.logon_server == NULL) {
   33939           0 :                 py_logon_server = Py_None;
   33940           0 :                 Py_INCREF(py_logon_server);
   33941             :         } else {
   33942           0 :                 if (object->in.logon_server == NULL) {
   33943           0 :                         py_logon_server = Py_None;
   33944           0 :                         Py_INCREF(py_logon_server);
   33945             :                 } else {
   33946           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   33947             :                 }
   33948             :         }
   33949           0 :         return py_logon_server;
   33950             : }
   33951             : 
   33952           0 : static int py_netr_AccountDeltas_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   33953             : {
   33954           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33955           0 :         if (value == NULL) {
   33956           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   33957           0 :                 return -1;
   33958             :         }
   33959           0 :         if (value == Py_None) {
   33960           0 :                 object->in.logon_server = NULL;
   33961             :         } else {
   33962           0 :                 object->in.logon_server = NULL;
   33963             :                 {
   33964           0 :                         const char *test_str;
   33965           0 :                         const char *talloc_str;
   33966           0 :                         PyObject *unicode = NULL;
   33967           0 :                         if (PyUnicode_Check(value)) {
   33968           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33969           0 :                                 if (unicode == NULL) {
   33970           0 :                                         PyErr_NoMemory();
   33971           0 :                                         return -1;
   33972             :                                 }
   33973           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   33974           0 :                         } else if (PyBytes_Check(value)) {
   33975           0 :                                 test_str = PyBytes_AS_STRING(value);
   33976             :                         } else {
   33977           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33978           0 :                                 return -1;
   33979             :                         }
   33980           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33981           0 :                         if (unicode != NULL) {
   33982           0 :                                 Py_DECREF(unicode);
   33983             :                         }
   33984           0 :                         if (talloc_str == NULL) {
   33985           0 :                                 PyErr_NoMemory();
   33986           0 :                                 return -1;
   33987             :                         }
   33988           0 :                         object->in.logon_server = talloc_str;
   33989             :                 }
   33990             :         }
   33991           0 :         return 0;
   33992             : }
   33993             : 
   33994           0 : static PyObject *py_netr_AccountDeltas_in_get_computername(PyObject *obj, void *closure)
   33995             : {
   33996           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33997           0 :         PyObject *py_computername;
   33998           0 :         if (object->in.computername == NULL) {
   33999           0 :                 Py_RETURN_NONE;
   34000             :         }
   34001           0 :         if (object->in.computername == NULL) {
   34002           0 :                 py_computername = Py_None;
   34003           0 :                 Py_INCREF(py_computername);
   34004             :         } else {
   34005           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   34006             :         }
   34007           0 :         return py_computername;
   34008             : }
   34009             : 
   34010           0 : static int py_netr_AccountDeltas_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   34011             : {
   34012           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34013           0 :         if (value == NULL) {
   34014           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   34015           0 :                 return -1;
   34016             :         }
   34017           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   34018           0 :         if (object->in.computername == NULL) {
   34019           0 :                 PyErr_NoMemory();
   34020           0 :                 return -1;
   34021             :         }
   34022             :         {
   34023           0 :                 const char *test_str;
   34024           0 :                 const char *talloc_str;
   34025           0 :                 PyObject *unicode = NULL;
   34026           0 :                 if (PyUnicode_Check(value)) {
   34027           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34028           0 :                         if (unicode == NULL) {
   34029           0 :                                 PyErr_NoMemory();
   34030           0 :                                 return -1;
   34031             :                         }
   34032           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34033           0 :                 } else if (PyBytes_Check(value)) {
   34034           0 :                         test_str = PyBytes_AS_STRING(value);
   34035             :                 } else {
   34036           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34037           0 :                         return -1;
   34038             :                 }
   34039           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34040           0 :                 if (unicode != NULL) {
   34041           0 :                         Py_DECREF(unicode);
   34042             :                 }
   34043           0 :                 if (talloc_str == NULL) {
   34044           0 :                         PyErr_NoMemory();
   34045           0 :                         return -1;
   34046             :                 }
   34047           0 :                 object->in.computername = talloc_str;
   34048             :         }
   34049           0 :         return 0;
   34050             : }
   34051             : 
   34052           0 : static PyObject *py_netr_AccountDeltas_in_get_credential(PyObject *obj, void *closure)
   34053             : {
   34054           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34055           0 :         PyObject *py_credential;
   34056           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, pytalloc_get_mem_ctx(obj), &object->in.credential);
   34057           0 :         return py_credential;
   34058             : }
   34059             : 
   34060           0 : static int py_netr_AccountDeltas_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   34061             : {
   34062           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34063           0 :         if (value == NULL) {
   34064           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   34065           0 :                 return -1;
   34066             :         }
   34067           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   34068           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34069           0 :                 PyErr_NoMemory();
   34070           0 :                 return -1;
   34071             :         }
   34072           0 :         object->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(value);
   34073           0 :         return 0;
   34074             : }
   34075             : 
   34076           0 : static PyObject *py_netr_AccountDeltas_in_get_return_authenticator(PyObject *obj, void *closure)
   34077             : {
   34078           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34079           0 :         PyObject *py_return_authenticator;
   34080           0 :         if (object->in.return_authenticator == NULL) {
   34081           0 :                 Py_RETURN_NONE;
   34082             :         }
   34083           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   34084           0 :         return py_return_authenticator;
   34085             : }
   34086             : 
   34087           0 : static int py_netr_AccountDeltas_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   34088             : {
   34089           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34090           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   34091           0 :         if (value == NULL) {
   34092           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   34093           0 :                 return -1;
   34094             :         }
   34095           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   34096           0 :         if (object->in.return_authenticator == NULL) {
   34097           0 :                 PyErr_NoMemory();
   34098           0 :                 return -1;
   34099             :         }
   34100           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   34101           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34102           0 :                 PyErr_NoMemory();
   34103           0 :                 return -1;
   34104             :         }
   34105           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   34106           0 :         return 0;
   34107             : }
   34108             : 
   34109           0 : static PyObject *py_netr_AccountDeltas_out_get_return_authenticator(PyObject *obj, void *closure)
   34110             : {
   34111           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34112           0 :         PyObject *py_return_authenticator;
   34113           0 :         if (object->out.return_authenticator == NULL) {
   34114           0 :                 Py_RETURN_NONE;
   34115             :         }
   34116           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   34117           0 :         return py_return_authenticator;
   34118             : }
   34119             : 
   34120           0 : static int py_netr_AccountDeltas_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   34121             : {
   34122           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34123           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   34124           0 :         if (value == NULL) {
   34125           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   34126           0 :                 return -1;
   34127             :         }
   34128           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   34129           0 :         if (object->out.return_authenticator == NULL) {
   34130           0 :                 PyErr_NoMemory();
   34131           0 :                 return -1;
   34132             :         }
   34133           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   34134           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34135           0 :                 PyErr_NoMemory();
   34136           0 :                 return -1;
   34137             :         }
   34138           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   34139           0 :         return 0;
   34140             : }
   34141             : 
   34142           0 : static PyObject *py_netr_AccountDeltas_in_get_uas(PyObject *obj, void *closure)
   34143             : {
   34144           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34145           0 :         PyObject *py_uas;
   34146           0 :         py_uas = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, pytalloc_get_mem_ctx(obj), &object->in.uas);
   34147           0 :         return py_uas;
   34148             : }
   34149             : 
   34150           0 : static int py_netr_AccountDeltas_in_set_uas(PyObject *py_obj, PyObject *value, void *closure)
   34151             : {
   34152           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34153           0 :         if (value == NULL) {
   34154           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.uas");
   34155           0 :                 return -1;
   34156             :         }
   34157           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   34158           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34159           0 :                 PyErr_NoMemory();
   34160           0 :                 return -1;
   34161             :         }
   34162           0 :         object->in.uas = *(struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   34163           0 :         return 0;
   34164             : }
   34165             : 
   34166           0 : static PyObject *py_netr_AccountDeltas_in_get_count(PyObject *obj, void *closure)
   34167             : {
   34168           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34169           0 :         PyObject *py_count;
   34170           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->in.count);
   34171           0 :         return py_count;
   34172             : }
   34173             : 
   34174           0 : static int py_netr_AccountDeltas_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
   34175             : {
   34176           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34177           0 :         if (value == NULL) {
   34178           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.count");
   34179           0 :                 return -1;
   34180             :         }
   34181             :         {
   34182           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
   34183           0 :                 if (PyLong_Check(value)) {
   34184           0 :                         unsigned long long test_var;
   34185           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34186           0 :                         if (PyErr_Occurred() != NULL) {
   34187           0 :                                 return -1;
   34188             :                         }
   34189           0 :                         if (test_var > uint_max) {
   34190           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34191             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34192           0 :                                 return -1;
   34193             :                         }
   34194           0 :                         object->in.count = test_var;
   34195             :                 } else {
   34196           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34197             :                           PyLong_Type.tp_name);
   34198           0 :                         return -1;
   34199             :                 }
   34200             :         }
   34201           0 :         return 0;
   34202             : }
   34203             : 
   34204           0 : static PyObject *py_netr_AccountDeltas_in_get_level(PyObject *obj, void *closure)
   34205             : {
   34206           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34207           0 :         PyObject *py_level;
   34208           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   34209           0 :         return py_level;
   34210             : }
   34211             : 
   34212           0 : static int py_netr_AccountDeltas_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   34213             : {
   34214           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34215           0 :         if (value == NULL) {
   34216           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   34217           0 :                 return -1;
   34218             :         }
   34219             :         {
   34220           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   34221           0 :                 if (PyLong_Check(value)) {
   34222           0 :                         unsigned long long test_var;
   34223           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34224           0 :                         if (PyErr_Occurred() != NULL) {
   34225           0 :                                 return -1;
   34226             :                         }
   34227           0 :                         if (test_var > uint_max) {
   34228           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34229             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34230           0 :                                 return -1;
   34231             :                         }
   34232           0 :                         object->in.level = test_var;
   34233             :                 } else {
   34234           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34235             :                           PyLong_Type.tp_name);
   34236           0 :                         return -1;
   34237             :                 }
   34238             :         }
   34239           0 :         return 0;
   34240             : }
   34241             : 
   34242           0 : static PyObject *py_netr_AccountDeltas_in_get_buffersize(PyObject *obj, void *closure)
   34243             : {
   34244           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34245           0 :         PyObject *py_buffersize;
   34246           0 :         py_buffersize = PyLong_FromUnsignedLongLong((uint32_t)object->in.buffersize);
   34247           0 :         return py_buffersize;
   34248             : }
   34249             : 
   34250           0 : static int py_netr_AccountDeltas_in_set_buffersize(PyObject *py_obj, PyObject *value, void *closure)
   34251             : {
   34252           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34253           0 :         if (value == NULL) {
   34254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.buffersize");
   34255           0 :                 return -1;
   34256             :         }
   34257             :         {
   34258           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffersize));
   34259           0 :                 if (PyLong_Check(value)) {
   34260           0 :                         unsigned long long test_var;
   34261           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34262           0 :                         if (PyErr_Occurred() != NULL) {
   34263           0 :                                 return -1;
   34264             :                         }
   34265           0 :                         if (test_var > uint_max) {
   34266           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34267             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34268           0 :                                 return -1;
   34269             :                         }
   34270           0 :                         object->in.buffersize = test_var;
   34271             :                 } else {
   34272           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34273             :                           PyLong_Type.tp_name);
   34274           0 :                         return -1;
   34275             :                 }
   34276             :         }
   34277           0 :         return 0;
   34278             : }
   34279             : 
   34280           0 : static PyObject *py_netr_AccountDeltas_out_get_buffer(PyObject *obj, void *closure)
   34281             : {
   34282           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34283           0 :         PyObject *py_buffer;
   34284           0 :         if (object->out.buffer == NULL) {
   34285           0 :                 Py_RETURN_NONE;
   34286             :         }
   34287           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, object->out.buffer, object->out.buffer);
   34288           0 :         return py_buffer;
   34289             : }
   34290             : 
   34291           0 : static int py_netr_AccountDeltas_out_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   34292             : {
   34293           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34294           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.buffer));
   34295           0 :         if (value == NULL) {
   34296           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.buffer");
   34297           0 :                 return -1;
   34298             :         }
   34299           0 :         object->out.buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.buffer);
   34300           0 :         if (object->out.buffer == NULL) {
   34301           0 :                 PyErr_NoMemory();
   34302           0 :                 return -1;
   34303             :         }
   34304           0 :         PY_CHECK_TYPE(&netr_AccountBuffer_Type, value, return -1;);
   34305           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34306           0 :                 PyErr_NoMemory();
   34307           0 :                 return -1;
   34308             :         }
   34309           0 :         object->out.buffer = (struct netr_AccountBuffer *)pytalloc_get_ptr(value);
   34310           0 :         return 0;
   34311             : }
   34312             : 
   34313           0 : static PyObject *py_netr_AccountDeltas_out_get_count_returned(PyObject *obj, void *closure)
   34314             : {
   34315           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34316           0 :         PyObject *py_count_returned;
   34317           0 :         if (object->out.count_returned == NULL) {
   34318           0 :                 Py_RETURN_NONE;
   34319             :         }
   34320           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)*object->out.count_returned);
   34321           0 :         return py_count_returned;
   34322             : }
   34323             : 
   34324           0 : static int py_netr_AccountDeltas_out_set_count_returned(PyObject *py_obj, PyObject *value, void *closure)
   34325             : {
   34326           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34327           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.count_returned));
   34328           0 :         if (value == NULL) {
   34329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.count_returned");
   34330           0 :                 return -1;
   34331             :         }
   34332           0 :         object->out.count_returned = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.count_returned);
   34333           0 :         if (object->out.count_returned == NULL) {
   34334           0 :                 PyErr_NoMemory();
   34335           0 :                 return -1;
   34336             :         }
   34337             :         {
   34338           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.count_returned));
   34339           0 :                 if (PyLong_Check(value)) {
   34340           0 :                         unsigned long long test_var;
   34341           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34342           0 :                         if (PyErr_Occurred() != NULL) {
   34343           0 :                                 return -1;
   34344             :                         }
   34345           0 :                         if (test_var > uint_max) {
   34346           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34347             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34348           0 :                                 return -1;
   34349             :                         }
   34350           0 :                         *object->out.count_returned = test_var;
   34351             :                 } else {
   34352           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34353             :                           PyLong_Type.tp_name);
   34354           0 :                         return -1;
   34355             :                 }
   34356             :         }
   34357           0 :         return 0;
   34358             : }
   34359             : 
   34360           0 : static PyObject *py_netr_AccountDeltas_out_get_total_entries(PyObject *obj, void *closure)
   34361             : {
   34362           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34363           0 :         PyObject *py_total_entries;
   34364           0 :         if (object->out.total_entries == NULL) {
   34365           0 :                 Py_RETURN_NONE;
   34366             :         }
   34367           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.total_entries);
   34368           0 :         return py_total_entries;
   34369             : }
   34370             : 
   34371           0 : static int py_netr_AccountDeltas_out_set_total_entries(PyObject *py_obj, PyObject *value, void *closure)
   34372             : {
   34373           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34374           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total_entries));
   34375           0 :         if (value == NULL) {
   34376           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.total_entries");
   34377           0 :                 return -1;
   34378             :         }
   34379           0 :         object->out.total_entries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total_entries);
   34380           0 :         if (object->out.total_entries == NULL) {
   34381           0 :                 PyErr_NoMemory();
   34382           0 :                 return -1;
   34383             :         }
   34384             :         {
   34385           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total_entries));
   34386           0 :                 if (PyLong_Check(value)) {
   34387           0 :                         unsigned long long test_var;
   34388           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34389           0 :                         if (PyErr_Occurred() != NULL) {
   34390           0 :                                 return -1;
   34391             :                         }
   34392           0 :                         if (test_var > uint_max) {
   34393           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34394             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34395           0 :                                 return -1;
   34396             :                         }
   34397           0 :                         *object->out.total_entries = test_var;
   34398             :                 } else {
   34399           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34400             :                           PyLong_Type.tp_name);
   34401           0 :                         return -1;
   34402             :                 }
   34403             :         }
   34404           0 :         return 0;
   34405             : }
   34406             : 
   34407           0 : static PyObject *py_netr_AccountDeltas_out_get_recordid(PyObject *obj, void *closure)
   34408             : {
   34409           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34410           0 :         PyObject *py_recordid;
   34411           0 :         if (object->out.recordid == NULL) {
   34412           0 :                 Py_RETURN_NONE;
   34413             :         }
   34414           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->out.recordid, object->out.recordid);
   34415           0 :         return py_recordid;
   34416             : }
   34417             : 
   34418           0 : static int py_netr_AccountDeltas_out_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
   34419             : {
   34420           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34421           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.recordid));
   34422           0 :         if (value == NULL) {
   34423           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.recordid");
   34424           0 :                 return -1;
   34425             :         }
   34426           0 :         object->out.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.recordid);
   34427           0 :         if (object->out.recordid == NULL) {
   34428           0 :                 PyErr_NoMemory();
   34429           0 :                 return -1;
   34430             :         }
   34431           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   34432           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34433           0 :                 PyErr_NoMemory();
   34434           0 :                 return -1;
   34435             :         }
   34436           0 :         object->out.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   34437           0 :         return 0;
   34438             : }
   34439             : 
   34440           0 : static PyObject *py_netr_AccountDeltas_get_result(PyObject *obj, void *closure)
   34441             : {
   34442           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34443           0 :         PyObject *py_result;
   34444           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   34445           0 :         return py_result;
   34446             : }
   34447             : 
   34448           0 : static int py_netr_AccountDeltas_set_result(PyObject *py_obj, PyObject *value, void *closure)
   34449             : {
   34450           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34451           0 :         if (value == NULL) {
   34452           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   34453           0 :                 return -1;
   34454             :         }
   34455           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   34456           0 :         return 0;
   34457             : }
   34458             : 
   34459             : static PyGetSetDef py_netr_AccountDeltas_getsetters[] = {
   34460             :         {
   34461             :                 .name = discard_const_p(char, "in_logon_server"),
   34462             :                 .get = py_netr_AccountDeltas_in_get_logon_server,
   34463             :                 .set = py_netr_AccountDeltas_in_set_logon_server,
   34464             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34465             :         },
   34466             :         {
   34467             :                 .name = discard_const_p(char, "in_computername"),
   34468             :                 .get = py_netr_AccountDeltas_in_get_computername,
   34469             :                 .set = py_netr_AccountDeltas_in_set_computername,
   34470             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34471             :         },
   34472             :         {
   34473             :                 .name = discard_const_p(char, "in_credential"),
   34474             :                 .get = py_netr_AccountDeltas_in_get_credential,
   34475             :                 .set = py_netr_AccountDeltas_in_set_credential,
   34476             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   34477             :         },
   34478             :         {
   34479             :                 .name = discard_const_p(char, "in_return_authenticator"),
   34480             :                 .get = py_netr_AccountDeltas_in_get_return_authenticator,
   34481             :                 .set = py_netr_AccountDeltas_in_set_return_authenticator,
   34482             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   34483             :         },
   34484             :         {
   34485             :                 .name = discard_const_p(char, "out_return_authenticator"),
   34486             :                 .get = py_netr_AccountDeltas_out_get_return_authenticator,
   34487             :                 .set = py_netr_AccountDeltas_out_set_return_authenticator,
   34488             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   34489             :         },
   34490             :         {
   34491             :                 .name = discard_const_p(char, "in_uas"),
   34492             :                 .get = py_netr_AccountDeltas_in_get_uas,
   34493             :                 .set = py_netr_AccountDeltas_in_set_uas,
   34494             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   34495             :         },
   34496             :         {
   34497             :                 .name = discard_const_p(char, "in_count"),
   34498             :                 .get = py_netr_AccountDeltas_in_get_count,
   34499             :                 .set = py_netr_AccountDeltas_in_set_count,
   34500             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34501             :         },
   34502             :         {
   34503             :                 .name = discard_const_p(char, "in_level"),
   34504             :                 .get = py_netr_AccountDeltas_in_get_level,
   34505             :                 .set = py_netr_AccountDeltas_in_set_level,
   34506             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34507             :         },
   34508             :         {
   34509             :                 .name = discard_const_p(char, "in_buffersize"),
   34510             :                 .get = py_netr_AccountDeltas_in_get_buffersize,
   34511             :                 .set = py_netr_AccountDeltas_in_set_buffersize,
   34512             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34513             :         },
   34514             :         {
   34515             :                 .name = discard_const_p(char, "out_buffer"),
   34516             :                 .get = py_netr_AccountDeltas_out_get_buffer,
   34517             :                 .set = py_netr_AccountDeltas_out_set_buffer,
   34518             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_AccountBuffer")
   34519             :         },
   34520             :         {
   34521             :                 .name = discard_const_p(char, "out_count_returned"),
   34522             :                 .get = py_netr_AccountDeltas_out_get_count_returned,
   34523             :                 .set = py_netr_AccountDeltas_out_set_count_returned,
   34524             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34525             :         },
   34526             :         {
   34527             :                 .name = discard_const_p(char, "out_total_entries"),
   34528             :                 .get = py_netr_AccountDeltas_out_get_total_entries,
   34529             :                 .set = py_netr_AccountDeltas_out_set_total_entries,
   34530             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34531             :         },
   34532             :         {
   34533             :                 .name = discard_const_p(char, "out_recordid"),
   34534             :                 .get = py_netr_AccountDeltas_out_get_recordid,
   34535             :                 .set = py_netr_AccountDeltas_out_set_recordid,
   34536             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   34537             :         },
   34538             :         {
   34539             :                 .name = discard_const_p(char, "result"),
   34540             :                 .get = py_netr_AccountDeltas_get_result,
   34541             :                 .set = py_netr_AccountDeltas_set_result,
   34542             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   34543             :         },
   34544             :         { .name = NULL }
   34545             : };
   34546             : 
   34547           0 : static PyObject *py_netr_AccountDeltas_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   34548             : {
   34549           0 :         PyObject *self = pytalloc_new(struct netr_AccountDeltas, type);
   34550           0 :         struct netr_AccountDeltas *_self = (struct netr_AccountDeltas *)pytalloc_get_ptr(self);
   34551           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   34552           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   34553           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   34554           0 :         _self->out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer);
   34555           0 :         _self->out.count_returned = talloc_zero(mem_ctx, uint32_t);
   34556           0 :         _self->out.total_entries = talloc_zero(mem_ctx, uint32_t);
   34557           0 :         _self->out.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
   34558           0 :         return self;
   34559             : }
   34560             : 
   34561           0 : static PyObject *py_netr_AccountDeltas_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   34562             : {
   34563             : 
   34564             : 
   34565           0 :         return PyLong_FromLong(9);
   34566             : }
   34567             : 
   34568           0 : static PyObject *py_netr_AccountDeltas_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   34569             : {
   34570           0 :         const struct ndr_interface_call *call = NULL;
   34571           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34572           0 :         PyObject *ret = NULL;
   34573           0 :         struct ndr_push *push = NULL;
   34574           0 :         DATA_BLOB blob;
   34575           0 :         enum ndr_err_code err;
   34576             : 
   34577           0 :         if (ndr_table_netlogon.num_calls < 10) {
   34578           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_pack");
   34579           0 :                 return NULL;
   34580             :         }
   34581           0 :         call = &ndr_table_netlogon.calls[9];
   34582             : 
   34583           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   34584           0 :         if (push == NULL) {
   34585           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34586           0 :                 return NULL;
   34587             :         }
   34588             : 
   34589           0 :         push->flags |= ndr_push_flags;
   34590             : 
   34591           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   34592           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34593           0 :                 TALLOC_FREE(push);
   34594           0 :                 PyErr_SetNdrError(err);
   34595           0 :                 return NULL;
   34596             :         }
   34597           0 :         blob = ndr_push_blob(push);
   34598           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   34599           0 :         TALLOC_FREE(push);
   34600           0 :         return ret;
   34601             : }
   34602             : 
   34603           0 : static PyObject *py_netr_AccountDeltas_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34604             : {
   34605           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34606           0 :         PyObject *bigendian_obj = NULL;
   34607           0 :         PyObject *ndr64_obj = NULL;
   34608           0 :         libndr_flags ndr_push_flags = 0;
   34609             : 
   34610           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   34611             :                 discard_const_p(char *, kwnames),
   34612             :                 &bigendian_obj,
   34613             :                 &ndr64_obj)) {
   34614           0 :                 return NULL;
   34615             :         }
   34616             : 
   34617           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34618           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34619             :         }
   34620           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34621           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34622             :         }
   34623             : 
   34624           0 :         return py_netr_AccountDeltas_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   34625             : }
   34626             : 
   34627           0 : static PyObject *py_netr_AccountDeltas_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34628             : {
   34629           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34630           0 :         PyObject *bigendian_obj = NULL;
   34631           0 :         PyObject *ndr64_obj = NULL;
   34632           0 :         libndr_flags ndr_push_flags = 0;
   34633             : 
   34634           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   34635             :                 discard_const_p(char *, kwnames),
   34636             :                 &bigendian_obj,
   34637             :                 &ndr64_obj)) {
   34638           0 :                 return NULL;
   34639             :         }
   34640             : 
   34641           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34642           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34643             :         }
   34644           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34645           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34646             :         }
   34647             : 
   34648           0 :         return py_netr_AccountDeltas_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   34649             : }
   34650             : 
   34651           0 : static PyObject *py_netr_AccountDeltas_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   34652             : {
   34653           0 :         const struct ndr_interface_call *call = NULL;
   34654           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34655           0 :         struct ndr_pull *pull = NULL;
   34656           0 :         enum ndr_err_code err;
   34657             : 
   34658           0 :         if (ndr_table_netlogon.num_calls < 10) {
   34659           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_unpack");
   34660           0 :                 return NULL;
   34661             :         }
   34662           0 :         call = &ndr_table_netlogon.calls[9];
   34663             : 
   34664           0 :         pull = ndr_pull_init_blob(blob, object);
   34665           0 :         if (pull == NULL) {
   34666           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34667           0 :                 return NULL;
   34668             :         }
   34669             : 
   34670           0 :         pull->flags |= ndr_pull_flags;
   34671             : 
   34672           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   34673           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34674           0 :                 TALLOC_FREE(pull);
   34675           0 :                 PyErr_SetNdrError(err);
   34676           0 :                 return NULL;
   34677             :         }
   34678           0 :         if (!allow_remaining) {
   34679           0 :                 uint32_t highest_ofs;
   34680             : 
   34681           0 :                 if (pull->offset > pull->relative_highest_offset) {
   34682           0 :                         highest_ofs = pull->offset;
   34683             :                 } else {
   34684           0 :                         highest_ofs = pull->relative_highest_offset;
   34685             :                 }
   34686           0 :                 if (highest_ofs < pull->data_size) {
   34687           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   34688             :                                 "not all bytes consumed ofs[%u] size[%u]",
   34689             :                                 highest_ofs, pull->data_size);
   34690           0 :                         TALLOC_FREE(pull);
   34691           0 :                         PyErr_SetNdrError(err);
   34692           0 :                         return NULL;
   34693             :                 }
   34694             :         }
   34695             : 
   34696           0 :         TALLOC_FREE(pull);
   34697           0 :         Py_RETURN_NONE;
   34698             : }
   34699             : 
   34700           0 : static PyObject *py_netr_AccountDeltas_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34701             : {
   34702           0 :         DATA_BLOB blob;
   34703           0 :         Py_ssize_t blob_length = 0;
   34704           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34705           0 :         PyObject *bigendian_obj = NULL;
   34706           0 :         PyObject *ndr64_obj = NULL;
   34707           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34708           0 :         PyObject *allow_remaining_obj = NULL;
   34709           0 :         bool allow_remaining = false;
   34710             : 
   34711           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   34712             :                 discard_const_p(char *, kwnames),
   34713             :                 &blob.data, &blob_length,
   34714             :                 &bigendian_obj,
   34715             :                 &ndr64_obj,
   34716             :                 &allow_remaining_obj)) {
   34717           0 :                 return NULL;
   34718             :         }
   34719           0 :         blob.length = blob_length;
   34720             : 
   34721           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34722           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34723             :         }
   34724           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34725           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34726             :         }
   34727             : 
   34728           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34729           0 :                 allow_remaining = true;
   34730             :         }
   34731             : 
   34732           0 :         return py_netr_AccountDeltas_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   34733             : }
   34734             : 
   34735           0 : static PyObject *py_netr_AccountDeltas_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34736             : {
   34737           0 :         DATA_BLOB blob;
   34738           0 :         Py_ssize_t blob_length = 0;
   34739           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34740           0 :         PyObject *bigendian_obj = NULL;
   34741           0 :         PyObject *ndr64_obj = NULL;
   34742           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34743           0 :         PyObject *allow_remaining_obj = NULL;
   34744           0 :         bool allow_remaining = false;
   34745             : 
   34746           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   34747             :                 discard_const_p(char *, kwnames),
   34748             :                 &blob.data, &blob_length,
   34749             :                 &bigendian_obj,
   34750             :                 &ndr64_obj,
   34751             :                 &allow_remaining_obj)) {
   34752           0 :                 return NULL;
   34753             :         }
   34754           0 :         blob.length = blob_length;
   34755             : 
   34756           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34757           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34758             :         }
   34759           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34760           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34761             :         }
   34762             : 
   34763           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34764           0 :                 allow_remaining = true;
   34765             :         }
   34766             : 
   34767           0 :         return py_netr_AccountDeltas_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   34768             : }
   34769             : 
   34770           0 : static PyObject *py_netr_AccountDeltas_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   34771             : {
   34772           0 :         const struct ndr_interface_call *call = NULL;
   34773           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34774           0 :         PyObject *ret;
   34775           0 :         char *retstr;
   34776             : 
   34777           0 :         if (ndr_table_netlogon.num_calls < 10) {
   34778           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_print");
   34779           0 :                 return NULL;
   34780             :         }
   34781           0 :         call = &ndr_table_netlogon.calls[9];
   34782             : 
   34783           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   34784           0 :         ret = PyUnicode_FromString(retstr);
   34785           0 :         TALLOC_FREE(retstr);
   34786             : 
   34787           0 :         return ret;
   34788             : }
   34789             : 
   34790           0 : static PyObject *py_netr_AccountDeltas_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34791             : {
   34792           0 :         return py_netr_AccountDeltas_ndr_print(py_obj, "netr_AccountDeltas_in", NDR_IN);
   34793             : }
   34794             : 
   34795           0 : static PyObject *py_netr_AccountDeltas_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34796             : {
   34797           0 :         return py_netr_AccountDeltas_ndr_print(py_obj, "netr_AccountDeltas_out", NDR_OUT);
   34798             : }
   34799             : 
   34800             : static PyMethodDef py_netr_AccountDeltas_methods[] = {
   34801             :         { "opnum", (PyCFunction)py_netr_AccountDeltas_ndr_opnum, METH_NOARGS|METH_CLASS,
   34802             :                 "netlogon.netr_AccountDeltas.opnum() -> 9 (0x09) " },
   34803             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   34804             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   34805             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   34806             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   34807             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   34808             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   34809             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   34810             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   34811             :         { "__ndr_print_in__", (PyCFunction)py_netr_AccountDeltas_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   34812             :         { "__ndr_print_out__", (PyCFunction)py_netr_AccountDeltas_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   34813             :         { NULL, NULL, 0, NULL }
   34814             : };
   34815             : 
   34816             : 
   34817             : static PyTypeObject netr_AccountDeltas_Type = {
   34818             :         PyVarObject_HEAD_INIT(NULL, 0)
   34819             :         .tp_name = "netlogon.netr_AccountDeltas",
   34820             :         .tp_getset = py_netr_AccountDeltas_getsetters,
   34821             :         .tp_methods = py_netr_AccountDeltas_methods,
   34822             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   34823             :         .tp_new = py_netr_AccountDeltas_new,
   34824             : };
   34825             : 
   34826           0 : static bool pack_py_netr_AccountDeltas_args_in(PyObject *args, PyObject *kwargs, struct netr_AccountDeltas *r)
   34827             : {
   34828           0 :         PyObject *py_logon_server;
   34829           0 :         PyObject *py_computername;
   34830           0 :         PyObject *py_credential;
   34831           0 :         PyObject *py_return_authenticator;
   34832           0 :         PyObject *py_uas;
   34833           0 :         PyObject *py_count;
   34834           0 :         PyObject *py_level;
   34835           0 :         PyObject *py_buffersize;
   34836           0 :         const char *kwnames[] = {
   34837             :                 "logon_server", "computername", "credential", "return_authenticator", "uas", "count", "level", "buffersize", NULL
   34838             :         };
   34839             : 
   34840           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:netr_AccountDeltas", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_uas, &py_count, &py_level, &py_buffersize)) {
   34841           0 :                 return false;
   34842             :         }
   34843             : 
   34844           0 :         if (py_logon_server == NULL) {
   34845           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   34846           0 :                 return false;
   34847             :         }
   34848           0 :         if (py_logon_server == Py_None) {
   34849           0 :                 r->in.logon_server = NULL;
   34850             :         } else {
   34851           0 :                 r->in.logon_server = NULL;
   34852             :                 {
   34853           0 :                         const char *test_str;
   34854           0 :                         const char *talloc_str;
   34855           0 :                         PyObject *unicode = NULL;
   34856           0 :                         if (PyUnicode_Check(py_logon_server)) {
   34857           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   34858           0 :                                 if (unicode == NULL) {
   34859           0 :                                         PyErr_NoMemory();
   34860           0 :                                         return false;
   34861             :                                 }
   34862           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34863           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   34864           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   34865             :                         } else {
   34866           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   34867           0 :                                 return false;
   34868             :                         }
   34869           0 :                         talloc_str = talloc_strdup(r, test_str);
   34870           0 :                         if (unicode != NULL) {
   34871           0 :                                 Py_DECREF(unicode);
   34872             :                         }
   34873           0 :                         if (talloc_str == NULL) {
   34874           0 :                                 PyErr_NoMemory();
   34875           0 :                                 return false;
   34876             :                         }
   34877           0 :                         r->in.logon_server = talloc_str;
   34878             :                 }
   34879             :         }
   34880           0 :         if (py_computername == NULL) {
   34881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   34882           0 :                 return false;
   34883             :         }
   34884           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   34885           0 :         if (r->in.computername == NULL) {
   34886           0 :                 PyErr_NoMemory();
   34887           0 :                 return false;
   34888             :         }
   34889             :         {
   34890           0 :                 const char *test_str;
   34891           0 :                 const char *talloc_str;
   34892           0 :                 PyObject *unicode = NULL;
   34893           0 :                 if (PyUnicode_Check(py_computername)) {
   34894           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   34895           0 :                         if (unicode == NULL) {
   34896           0 :                                 PyErr_NoMemory();
   34897           0 :                                 return false;
   34898             :                         }
   34899           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34900           0 :                 } else if (PyBytes_Check(py_computername)) {
   34901           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   34902             :                 } else {
   34903           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   34904           0 :                         return false;
   34905             :                 }
   34906           0 :                 talloc_str = talloc_strdup(r, test_str);
   34907           0 :                 if (unicode != NULL) {
   34908           0 :                         Py_DECREF(unicode);
   34909             :                 }
   34910           0 :                 if (talloc_str == NULL) {
   34911           0 :                         PyErr_NoMemory();
   34912           0 :                         return false;
   34913             :                 }
   34914           0 :                 r->in.computername = talloc_str;
   34915             :         }
   34916           0 :         if (py_credential == NULL) {
   34917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   34918           0 :                 return false;
   34919             :         }
   34920           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   34921           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   34922           0 :                 PyErr_NoMemory();
   34923           0 :                 return false;
   34924             :         }
   34925           0 :         r->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   34926           0 :         if (py_return_authenticator == NULL) {
   34927           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   34928           0 :                 return false;
   34929             :         }
   34930           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   34931           0 :         if (r->in.return_authenticator == NULL) {
   34932           0 :                 PyErr_NoMemory();
   34933           0 :                 return false;
   34934             :         }
   34935           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   34936           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   34937           0 :                 PyErr_NoMemory();
   34938           0 :                 return false;
   34939             :         }
   34940           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   34941           0 :         if (py_uas == NULL) {
   34942           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.uas");
   34943           0 :                 return false;
   34944             :         }
   34945           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, py_uas, return false;);
   34946           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_uas)) == NULL) {
   34947           0 :                 PyErr_NoMemory();
   34948           0 :                 return false;
   34949             :         }
   34950           0 :         r->in.uas = *(struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_uas);
   34951           0 :         if (py_count == NULL) {
   34952           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.count");
   34953           0 :                 return false;
   34954             :         }
   34955             :         {
   34956           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.count));
   34957           0 :                 if (PyLong_Check(py_count)) {
   34958           0 :                         unsigned long long test_var;
   34959           0 :                         test_var = PyLong_AsUnsignedLongLong(py_count);
   34960           0 :                         if (PyErr_Occurred() != NULL) {
   34961           0 :                                 return false;
   34962             :                         }
   34963           0 :                         if (test_var > uint_max) {
   34964           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34965             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34966           0 :                                 return false;
   34967             :                         }
   34968           0 :                         r->in.count = test_var;
   34969             :                 } else {
   34970           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34971             :                           PyLong_Type.tp_name);
   34972           0 :                         return false;
   34973             :                 }
   34974             :         }
   34975           0 :         if (py_level == NULL) {
   34976           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   34977           0 :                 return false;
   34978             :         }
   34979             :         {
   34980           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   34981           0 :                 if (PyLong_Check(py_level)) {
   34982           0 :                         unsigned long long test_var;
   34983           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   34984           0 :                         if (PyErr_Occurred() != NULL) {
   34985           0 :                                 return false;
   34986             :                         }
   34987           0 :                         if (test_var > uint_max) {
   34988           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34989             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34990           0 :                                 return false;
   34991             :                         }
   34992           0 :                         r->in.level = test_var;
   34993             :                 } else {
   34994           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34995             :                           PyLong_Type.tp_name);
   34996           0 :                         return false;
   34997             :                 }
   34998             :         }
   34999           0 :         if (py_buffersize == NULL) {
   35000           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.buffersize");
   35001           0 :                 return false;
   35002             :         }
   35003             :         {
   35004           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.buffersize));
   35005           0 :                 if (PyLong_Check(py_buffersize)) {
   35006           0 :                         unsigned long long test_var;
   35007           0 :                         test_var = PyLong_AsUnsignedLongLong(py_buffersize);
   35008           0 :                         if (PyErr_Occurred() != NULL) {
   35009           0 :                                 return false;
   35010             :                         }
   35011           0 :                         if (test_var > uint_max) {
   35012           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35013             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35014           0 :                                 return false;
   35015             :                         }
   35016           0 :                         r->in.buffersize = test_var;
   35017             :                 } else {
   35018           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35019             :                           PyLong_Type.tp_name);
   35020           0 :                         return false;
   35021             :                 }
   35022             :         }
   35023           0 :         return true;
   35024             : }
   35025             : 
   35026           0 : static PyObject *unpack_py_netr_AccountDeltas_args_out(struct netr_AccountDeltas *r)
   35027             : {
   35028           0 :         PyObject *result;
   35029           0 :         PyObject *py_return_authenticator;
   35030           0 :         PyObject *py_buffer;
   35031           0 :         PyObject *py_count_returned;
   35032           0 :         PyObject *py_total_entries;
   35033           0 :         PyObject *py_recordid;
   35034           0 :         result = PyTuple_New(5);
   35035           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   35036           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   35037           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, r->out.buffer, r->out.buffer);
   35038           0 :         PyTuple_SetItem(result, 1, py_buffer);
   35039           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)*r->out.count_returned);
   35040           0 :         PyTuple_SetItem(result, 2, py_count_returned);
   35041           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.total_entries);
   35042           0 :         PyTuple_SetItem(result, 3, py_total_entries);
   35043           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, r->out.recordid, r->out.recordid);
   35044           0 :         PyTuple_SetItem(result, 4, py_recordid);
   35045           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   35046           0 :                 PyErr_SetNTSTATUS(r->out.result);
   35047           0 :                 return NULL;
   35048             :         }
   35049             : 
   35050           0 :         return result;
   35051             : }
   35052             : 
   35053             : 
   35054           0 : static PyObject *py_netr_AccountSync_in_get_logon_server(PyObject *obj, void *closure)
   35055             : {
   35056           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35057           0 :         PyObject *py_logon_server;
   35058           0 :         if (object->in.logon_server == NULL) {
   35059           0 :                 Py_RETURN_NONE;
   35060             :         }
   35061           0 :         if (object->in.logon_server == NULL) {
   35062           0 :                 py_logon_server = Py_None;
   35063           0 :                 Py_INCREF(py_logon_server);
   35064             :         } else {
   35065           0 :                 if (object->in.logon_server == NULL) {
   35066           0 :                         py_logon_server = Py_None;
   35067           0 :                         Py_INCREF(py_logon_server);
   35068             :                 } else {
   35069           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   35070             :                 }
   35071             :         }
   35072           0 :         return py_logon_server;
   35073             : }
   35074             : 
   35075           0 : static int py_netr_AccountSync_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   35076             : {
   35077           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35078           0 :         if (value == NULL) {
   35079           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   35080           0 :                 return -1;
   35081             :         }
   35082           0 :         if (value == Py_None) {
   35083           0 :                 object->in.logon_server = NULL;
   35084             :         } else {
   35085           0 :                 object->in.logon_server = NULL;
   35086             :                 {
   35087           0 :                         const char *test_str;
   35088           0 :                         const char *talloc_str;
   35089           0 :                         PyObject *unicode = NULL;
   35090           0 :                         if (PyUnicode_Check(value)) {
   35091           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35092           0 :                                 if (unicode == NULL) {
   35093           0 :                                         PyErr_NoMemory();
   35094           0 :                                         return -1;
   35095             :                                 }
   35096           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35097           0 :                         } else if (PyBytes_Check(value)) {
   35098           0 :                                 test_str = PyBytes_AS_STRING(value);
   35099             :                         } else {
   35100           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35101           0 :                                 return -1;
   35102             :                         }
   35103           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35104           0 :                         if (unicode != NULL) {
   35105           0 :                                 Py_DECREF(unicode);
   35106             :                         }
   35107           0 :                         if (talloc_str == NULL) {
   35108           0 :                                 PyErr_NoMemory();
   35109           0 :                                 return -1;
   35110             :                         }
   35111           0 :                         object->in.logon_server = talloc_str;
   35112             :                 }
   35113             :         }
   35114           0 :         return 0;
   35115             : }
   35116             : 
   35117           0 : static PyObject *py_netr_AccountSync_in_get_computername(PyObject *obj, void *closure)
   35118             : {
   35119           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35120           0 :         PyObject *py_computername;
   35121           0 :         if (object->in.computername == NULL) {
   35122           0 :                 Py_RETURN_NONE;
   35123             :         }
   35124           0 :         if (object->in.computername == NULL) {
   35125           0 :                 py_computername = Py_None;
   35126           0 :                 Py_INCREF(py_computername);
   35127             :         } else {
   35128           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   35129             :         }
   35130           0 :         return py_computername;
   35131             : }
   35132             : 
   35133           0 : static int py_netr_AccountSync_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   35134             : {
   35135           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35136           0 :         if (value == NULL) {
   35137           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   35138           0 :                 return -1;
   35139             :         }
   35140           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   35141           0 :         if (object->in.computername == NULL) {
   35142           0 :                 PyErr_NoMemory();
   35143           0 :                 return -1;
   35144             :         }
   35145             :         {
   35146           0 :                 const char *test_str;
   35147           0 :                 const char *talloc_str;
   35148           0 :                 PyObject *unicode = NULL;
   35149           0 :                 if (PyUnicode_Check(value)) {
   35150           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35151           0 :                         if (unicode == NULL) {
   35152           0 :                                 PyErr_NoMemory();
   35153           0 :                                 return -1;
   35154             :                         }
   35155           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35156           0 :                 } else if (PyBytes_Check(value)) {
   35157           0 :                         test_str = PyBytes_AS_STRING(value);
   35158             :                 } else {
   35159           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35160           0 :                         return -1;
   35161             :                 }
   35162           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35163           0 :                 if (unicode != NULL) {
   35164           0 :                         Py_DECREF(unicode);
   35165             :                 }
   35166           0 :                 if (talloc_str == NULL) {
   35167           0 :                         PyErr_NoMemory();
   35168           0 :                         return -1;
   35169             :                 }
   35170           0 :                 object->in.computername = talloc_str;
   35171             :         }
   35172           0 :         return 0;
   35173             : }
   35174             : 
   35175           0 : static PyObject *py_netr_AccountSync_in_get_credential(PyObject *obj, void *closure)
   35176             : {
   35177           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35178           0 :         PyObject *py_credential;
   35179           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, pytalloc_get_mem_ctx(obj), &object->in.credential);
   35180           0 :         return py_credential;
   35181             : }
   35182             : 
   35183           0 : static int py_netr_AccountSync_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   35184             : {
   35185           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35186           0 :         if (value == NULL) {
   35187           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   35188           0 :                 return -1;
   35189             :         }
   35190           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   35191           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35192           0 :                 PyErr_NoMemory();
   35193           0 :                 return -1;
   35194             :         }
   35195           0 :         object->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(value);
   35196           0 :         return 0;
   35197             : }
   35198             : 
   35199           0 : static PyObject *py_netr_AccountSync_in_get_return_authenticator(PyObject *obj, void *closure)
   35200             : {
   35201           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35202           0 :         PyObject *py_return_authenticator;
   35203           0 :         if (object->in.return_authenticator == NULL) {
   35204           0 :                 Py_RETURN_NONE;
   35205             :         }
   35206           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   35207           0 :         return py_return_authenticator;
   35208             : }
   35209             : 
   35210           0 : static int py_netr_AccountSync_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   35211             : {
   35212           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35213           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   35214           0 :         if (value == NULL) {
   35215           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   35216           0 :                 return -1;
   35217             :         }
   35218           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   35219           0 :         if (object->in.return_authenticator == NULL) {
   35220           0 :                 PyErr_NoMemory();
   35221           0 :                 return -1;
   35222             :         }
   35223           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   35224           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35225           0 :                 PyErr_NoMemory();
   35226           0 :                 return -1;
   35227             :         }
   35228           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   35229           0 :         return 0;
   35230             : }
   35231             : 
   35232           0 : static PyObject *py_netr_AccountSync_out_get_return_authenticator(PyObject *obj, void *closure)
   35233             : {
   35234           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35235           0 :         PyObject *py_return_authenticator;
   35236           0 :         if (object->out.return_authenticator == NULL) {
   35237           0 :                 Py_RETURN_NONE;
   35238             :         }
   35239           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   35240           0 :         return py_return_authenticator;
   35241             : }
   35242             : 
   35243           0 : static int py_netr_AccountSync_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   35244             : {
   35245           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35246           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   35247           0 :         if (value == NULL) {
   35248           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   35249           0 :                 return -1;
   35250             :         }
   35251           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   35252           0 :         if (object->out.return_authenticator == NULL) {
   35253           0 :                 PyErr_NoMemory();
   35254           0 :                 return -1;
   35255             :         }
   35256           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   35257           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35258           0 :                 PyErr_NoMemory();
   35259           0 :                 return -1;
   35260             :         }
   35261           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   35262           0 :         return 0;
   35263             : }
   35264             : 
   35265           0 : static PyObject *py_netr_AccountSync_in_get_reference(PyObject *obj, void *closure)
   35266             : {
   35267           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35268           0 :         PyObject *py_reference;
   35269           0 :         py_reference = PyLong_FromUnsignedLongLong((uint32_t)object->in.reference);
   35270           0 :         return py_reference;
   35271             : }
   35272             : 
   35273           0 : static int py_netr_AccountSync_in_set_reference(PyObject *py_obj, PyObject *value, void *closure)
   35274             : {
   35275           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35276           0 :         if (value == NULL) {
   35277           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.reference");
   35278           0 :                 return -1;
   35279             :         }
   35280             :         {
   35281           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reference));
   35282           0 :                 if (PyLong_Check(value)) {
   35283           0 :                         unsigned long long test_var;
   35284           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35285           0 :                         if (PyErr_Occurred() != NULL) {
   35286           0 :                                 return -1;
   35287             :                         }
   35288           0 :                         if (test_var > uint_max) {
   35289           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35290             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35291           0 :                                 return -1;
   35292             :                         }
   35293           0 :                         object->in.reference = test_var;
   35294             :                 } else {
   35295           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35296             :                           PyLong_Type.tp_name);
   35297           0 :                         return -1;
   35298             :                 }
   35299             :         }
   35300           0 :         return 0;
   35301             : }
   35302             : 
   35303           0 : static PyObject *py_netr_AccountSync_in_get_level(PyObject *obj, void *closure)
   35304             : {
   35305           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35306           0 :         PyObject *py_level;
   35307           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   35308           0 :         return py_level;
   35309             : }
   35310             : 
   35311           0 : static int py_netr_AccountSync_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   35312             : {
   35313           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35314           0 :         if (value == NULL) {
   35315           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   35316           0 :                 return -1;
   35317             :         }
   35318             :         {
   35319           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   35320           0 :                 if (PyLong_Check(value)) {
   35321           0 :                         unsigned long long test_var;
   35322           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35323           0 :                         if (PyErr_Occurred() != NULL) {
   35324           0 :                                 return -1;
   35325             :                         }
   35326           0 :                         if (test_var > uint_max) {
   35327           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35328             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35329           0 :                                 return -1;
   35330             :                         }
   35331           0 :                         object->in.level = test_var;
   35332             :                 } else {
   35333           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35334             :                           PyLong_Type.tp_name);
   35335           0 :                         return -1;
   35336             :                 }
   35337             :         }
   35338           0 :         return 0;
   35339             : }
   35340             : 
   35341           0 : static PyObject *py_netr_AccountSync_in_get_buffersize(PyObject *obj, void *closure)
   35342             : {
   35343           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35344           0 :         PyObject *py_buffersize;
   35345           0 :         py_buffersize = PyLong_FromUnsignedLongLong((uint32_t)object->in.buffersize);
   35346           0 :         return py_buffersize;
   35347             : }
   35348             : 
   35349           0 : static int py_netr_AccountSync_in_set_buffersize(PyObject *py_obj, PyObject *value, void *closure)
   35350             : {
   35351           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35352           0 :         if (value == NULL) {
   35353           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.buffersize");
   35354           0 :                 return -1;
   35355             :         }
   35356             :         {
   35357           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffersize));
   35358           0 :                 if (PyLong_Check(value)) {
   35359           0 :                         unsigned long long test_var;
   35360           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35361           0 :                         if (PyErr_Occurred() != NULL) {
   35362           0 :                                 return -1;
   35363             :                         }
   35364           0 :                         if (test_var > uint_max) {
   35365           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35366             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35367           0 :                                 return -1;
   35368             :                         }
   35369           0 :                         object->in.buffersize = test_var;
   35370             :                 } else {
   35371           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35372             :                           PyLong_Type.tp_name);
   35373           0 :                         return -1;
   35374             :                 }
   35375             :         }
   35376           0 :         return 0;
   35377             : }
   35378             : 
   35379           0 : static PyObject *py_netr_AccountSync_out_get_buffer(PyObject *obj, void *closure)
   35380             : {
   35381           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35382           0 :         PyObject *py_buffer;
   35383           0 :         if (object->out.buffer == NULL) {
   35384           0 :                 Py_RETURN_NONE;
   35385             :         }
   35386           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, object->out.buffer, object->out.buffer);
   35387           0 :         return py_buffer;
   35388             : }
   35389             : 
   35390           0 : static int py_netr_AccountSync_out_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   35391             : {
   35392           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35393           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.buffer));
   35394           0 :         if (value == NULL) {
   35395           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.buffer");
   35396           0 :                 return -1;
   35397             :         }
   35398           0 :         object->out.buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.buffer);
   35399           0 :         if (object->out.buffer == NULL) {
   35400           0 :                 PyErr_NoMemory();
   35401           0 :                 return -1;
   35402             :         }
   35403           0 :         PY_CHECK_TYPE(&netr_AccountBuffer_Type, value, return -1;);
   35404           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35405           0 :                 PyErr_NoMemory();
   35406           0 :                 return -1;
   35407             :         }
   35408           0 :         object->out.buffer = (struct netr_AccountBuffer *)pytalloc_get_ptr(value);
   35409           0 :         return 0;
   35410             : }
   35411             : 
   35412           0 : static PyObject *py_netr_AccountSync_out_get_count_returned(PyObject *obj, void *closure)
   35413             : {
   35414           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35415           0 :         PyObject *py_count_returned;
   35416           0 :         if (object->out.count_returned == NULL) {
   35417           0 :                 Py_RETURN_NONE;
   35418             :         }
   35419           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)*object->out.count_returned);
   35420           0 :         return py_count_returned;
   35421             : }
   35422             : 
   35423           0 : static int py_netr_AccountSync_out_set_count_returned(PyObject *py_obj, PyObject *value, void *closure)
   35424             : {
   35425           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35426           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.count_returned));
   35427           0 :         if (value == NULL) {
   35428           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.count_returned");
   35429           0 :                 return -1;
   35430             :         }
   35431           0 :         object->out.count_returned = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.count_returned);
   35432           0 :         if (object->out.count_returned == NULL) {
   35433           0 :                 PyErr_NoMemory();
   35434           0 :                 return -1;
   35435             :         }
   35436             :         {
   35437           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.count_returned));
   35438           0 :                 if (PyLong_Check(value)) {
   35439           0 :                         unsigned long long test_var;
   35440           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35441           0 :                         if (PyErr_Occurred() != NULL) {
   35442           0 :                                 return -1;
   35443             :                         }
   35444           0 :                         if (test_var > uint_max) {
   35445           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35446             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35447           0 :                                 return -1;
   35448             :                         }
   35449           0 :                         *object->out.count_returned = test_var;
   35450             :                 } else {
   35451           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35452             :                           PyLong_Type.tp_name);
   35453           0 :                         return -1;
   35454             :                 }
   35455             :         }
   35456           0 :         return 0;
   35457             : }
   35458             : 
   35459           0 : static PyObject *py_netr_AccountSync_out_get_total_entries(PyObject *obj, void *closure)
   35460             : {
   35461           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35462           0 :         PyObject *py_total_entries;
   35463           0 :         if (object->out.total_entries == NULL) {
   35464           0 :                 Py_RETURN_NONE;
   35465             :         }
   35466           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.total_entries);
   35467           0 :         return py_total_entries;
   35468             : }
   35469             : 
   35470           0 : static int py_netr_AccountSync_out_set_total_entries(PyObject *py_obj, PyObject *value, void *closure)
   35471             : {
   35472           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35473           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total_entries));
   35474           0 :         if (value == NULL) {
   35475           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.total_entries");
   35476           0 :                 return -1;
   35477             :         }
   35478           0 :         object->out.total_entries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total_entries);
   35479           0 :         if (object->out.total_entries == NULL) {
   35480           0 :                 PyErr_NoMemory();
   35481           0 :                 return -1;
   35482             :         }
   35483             :         {
   35484           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total_entries));
   35485           0 :                 if (PyLong_Check(value)) {
   35486           0 :                         unsigned long long test_var;
   35487           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35488           0 :                         if (PyErr_Occurred() != NULL) {
   35489           0 :                                 return -1;
   35490             :                         }
   35491           0 :                         if (test_var > uint_max) {
   35492           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35493             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35494           0 :                                 return -1;
   35495             :                         }
   35496           0 :                         *object->out.total_entries = test_var;
   35497             :                 } else {
   35498           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35499             :                           PyLong_Type.tp_name);
   35500           0 :                         return -1;
   35501             :                 }
   35502             :         }
   35503           0 :         return 0;
   35504             : }
   35505             : 
   35506           0 : static PyObject *py_netr_AccountSync_out_get_next_reference(PyObject *obj, void *closure)
   35507             : {
   35508           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35509           0 :         PyObject *py_next_reference;
   35510           0 :         if (object->out.next_reference == NULL) {
   35511           0 :                 Py_RETURN_NONE;
   35512             :         }
   35513           0 :         py_next_reference = PyLong_FromUnsignedLongLong((uint32_t)*object->out.next_reference);
   35514           0 :         return py_next_reference;
   35515             : }
   35516             : 
   35517           0 : static int py_netr_AccountSync_out_set_next_reference(PyObject *py_obj, PyObject *value, void *closure)
   35518             : {
   35519           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35520           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.next_reference));
   35521           0 :         if (value == NULL) {
   35522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.next_reference");
   35523           0 :                 return -1;
   35524             :         }
   35525           0 :         object->out.next_reference = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.next_reference);
   35526           0 :         if (object->out.next_reference == NULL) {
   35527           0 :                 PyErr_NoMemory();
   35528           0 :                 return -1;
   35529             :         }
   35530             :         {
   35531           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.next_reference));
   35532           0 :                 if (PyLong_Check(value)) {
   35533           0 :                         unsigned long long test_var;
   35534           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35535           0 :                         if (PyErr_Occurred() != NULL) {
   35536           0 :                                 return -1;
   35537             :                         }
   35538           0 :                         if (test_var > uint_max) {
   35539           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35540             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35541           0 :                                 return -1;
   35542             :                         }
   35543           0 :                         *object->out.next_reference = test_var;
   35544             :                 } else {
   35545           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35546             :                           PyLong_Type.tp_name);
   35547           0 :                         return -1;
   35548             :                 }
   35549             :         }
   35550           0 :         return 0;
   35551             : }
   35552             : 
   35553           0 : static PyObject *py_netr_AccountSync_in_get_recordid(PyObject *obj, void *closure)
   35554             : {
   35555           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35556           0 :         PyObject *py_recordid;
   35557           0 :         if (object->in.recordid == NULL) {
   35558           0 :                 Py_RETURN_NONE;
   35559             :         }
   35560           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->in.recordid, object->in.recordid);
   35561           0 :         return py_recordid;
   35562             : }
   35563             : 
   35564           0 : static int py_netr_AccountSync_in_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
   35565             : {
   35566           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35567           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.recordid));
   35568           0 :         if (value == NULL) {
   35569           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.recordid");
   35570           0 :                 return -1;
   35571             :         }
   35572           0 :         object->in.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.recordid);
   35573           0 :         if (object->in.recordid == NULL) {
   35574           0 :                 PyErr_NoMemory();
   35575           0 :                 return -1;
   35576             :         }
   35577           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   35578           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35579           0 :                 PyErr_NoMemory();
   35580           0 :                 return -1;
   35581             :         }
   35582           0 :         object->in.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   35583           0 :         return 0;
   35584             : }
   35585             : 
   35586           0 : static PyObject *py_netr_AccountSync_out_get_recordid(PyObject *obj, void *closure)
   35587             : {
   35588           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35589           0 :         PyObject *py_recordid;
   35590           0 :         if (object->out.recordid == NULL) {
   35591           0 :                 Py_RETURN_NONE;
   35592             :         }
   35593           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->out.recordid, object->out.recordid);
   35594           0 :         return py_recordid;
   35595             : }
   35596             : 
   35597           0 : static int py_netr_AccountSync_out_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
   35598             : {
   35599           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35600           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.recordid));
   35601           0 :         if (value == NULL) {
   35602           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.recordid");
   35603           0 :                 return -1;
   35604             :         }
   35605           0 :         object->out.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.recordid);
   35606           0 :         if (object->out.recordid == NULL) {
   35607           0 :                 PyErr_NoMemory();
   35608           0 :                 return -1;
   35609             :         }
   35610           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   35611           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35612           0 :                 PyErr_NoMemory();
   35613           0 :                 return -1;
   35614             :         }
   35615           0 :         object->out.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   35616           0 :         return 0;
   35617             : }
   35618             : 
   35619           0 : static PyObject *py_netr_AccountSync_get_result(PyObject *obj, void *closure)
   35620             : {
   35621           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35622           0 :         PyObject *py_result;
   35623           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   35624           0 :         return py_result;
   35625             : }
   35626             : 
   35627           0 : static int py_netr_AccountSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
   35628             : {
   35629           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35630           0 :         if (value == NULL) {
   35631           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   35632           0 :                 return -1;
   35633             :         }
   35634           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   35635           0 :         return 0;
   35636             : }
   35637             : 
   35638             : static PyGetSetDef py_netr_AccountSync_getsetters[] = {
   35639             :         {
   35640             :                 .name = discard_const_p(char, "in_logon_server"),
   35641             :                 .get = py_netr_AccountSync_in_get_logon_server,
   35642             :                 .set = py_netr_AccountSync_in_set_logon_server,
   35643             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35644             :         },
   35645             :         {
   35646             :                 .name = discard_const_p(char, "in_computername"),
   35647             :                 .get = py_netr_AccountSync_in_get_computername,
   35648             :                 .set = py_netr_AccountSync_in_set_computername,
   35649             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35650             :         },
   35651             :         {
   35652             :                 .name = discard_const_p(char, "in_credential"),
   35653             :                 .get = py_netr_AccountSync_in_get_credential,
   35654             :                 .set = py_netr_AccountSync_in_set_credential,
   35655             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   35656             :         },
   35657             :         {
   35658             :                 .name = discard_const_p(char, "in_return_authenticator"),
   35659             :                 .get = py_netr_AccountSync_in_get_return_authenticator,
   35660             :                 .set = py_netr_AccountSync_in_set_return_authenticator,
   35661             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   35662             :         },
   35663             :         {
   35664             :                 .name = discard_const_p(char, "out_return_authenticator"),
   35665             :                 .get = py_netr_AccountSync_out_get_return_authenticator,
   35666             :                 .set = py_netr_AccountSync_out_set_return_authenticator,
   35667             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   35668             :         },
   35669             :         {
   35670             :                 .name = discard_const_p(char, "in_reference"),
   35671             :                 .get = py_netr_AccountSync_in_get_reference,
   35672             :                 .set = py_netr_AccountSync_in_set_reference,
   35673             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35674             :         },
   35675             :         {
   35676             :                 .name = discard_const_p(char, "in_level"),
   35677             :                 .get = py_netr_AccountSync_in_get_level,
   35678             :                 .set = py_netr_AccountSync_in_set_level,
   35679             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35680             :         },
   35681             :         {
   35682             :                 .name = discard_const_p(char, "in_buffersize"),
   35683             :                 .get = py_netr_AccountSync_in_get_buffersize,
   35684             :                 .set = py_netr_AccountSync_in_set_buffersize,
   35685             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35686             :         },
   35687             :         {
   35688             :                 .name = discard_const_p(char, "out_buffer"),
   35689             :                 .get = py_netr_AccountSync_out_get_buffer,
   35690             :                 .set = py_netr_AccountSync_out_set_buffer,
   35691             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_AccountBuffer")
   35692             :         },
   35693             :         {
   35694             :                 .name = discard_const_p(char, "out_count_returned"),
   35695             :                 .get = py_netr_AccountSync_out_get_count_returned,
   35696             :                 .set = py_netr_AccountSync_out_set_count_returned,
   35697             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35698             :         },
   35699             :         {
   35700             :                 .name = discard_const_p(char, "out_total_entries"),
   35701             :                 .get = py_netr_AccountSync_out_get_total_entries,
   35702             :                 .set = py_netr_AccountSync_out_set_total_entries,
   35703             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35704             :         },
   35705             :         {
   35706             :                 .name = discard_const_p(char, "out_next_reference"),
   35707             :                 .get = py_netr_AccountSync_out_get_next_reference,
   35708             :                 .set = py_netr_AccountSync_out_set_next_reference,
   35709             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35710             :         },
   35711             :         {
   35712             :                 .name = discard_const_p(char, "in_recordid"),
   35713             :                 .get = py_netr_AccountSync_in_get_recordid,
   35714             :                 .set = py_netr_AccountSync_in_set_recordid,
   35715             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   35716             :         },
   35717             :         {
   35718             :                 .name = discard_const_p(char, "out_recordid"),
   35719             :                 .get = py_netr_AccountSync_out_get_recordid,
   35720             :                 .set = py_netr_AccountSync_out_set_recordid,
   35721             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   35722             :         },
   35723             :         {
   35724             :                 .name = discard_const_p(char, "result"),
   35725             :                 .get = py_netr_AccountSync_get_result,
   35726             :                 .set = py_netr_AccountSync_set_result,
   35727             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   35728             :         },
   35729             :         { .name = NULL }
   35730             : };
   35731             : 
   35732           0 : static PyObject *py_netr_AccountSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   35733             : {
   35734           0 :         PyObject *self = pytalloc_new(struct netr_AccountSync, type);
   35735           0 :         struct netr_AccountSync *_self = (struct netr_AccountSync *)pytalloc_get_ptr(self);
   35736           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   35737           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   35738           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   35739           0 :         _self->out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer);
   35740           0 :         _self->out.count_returned = talloc_zero(mem_ctx, uint32_t);
   35741           0 :         _self->out.total_entries = talloc_zero(mem_ctx, uint32_t);
   35742           0 :         _self->out.next_reference = talloc_zero(mem_ctx, uint32_t);
   35743           0 :         _self->in.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
   35744           0 :         _self->out.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
   35745           0 :         return self;
   35746             : }
   35747             : 
   35748           0 : static PyObject *py_netr_AccountSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   35749             : {
   35750             : 
   35751             : 
   35752           0 :         return PyLong_FromLong(10);
   35753             : }
   35754             : 
   35755           0 : static PyObject *py_netr_AccountSync_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   35756             : {
   35757           0 :         const struct ndr_interface_call *call = NULL;
   35758           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35759           0 :         PyObject *ret = NULL;
   35760           0 :         struct ndr_push *push = NULL;
   35761           0 :         DATA_BLOB blob;
   35762           0 :         enum ndr_err_code err;
   35763             : 
   35764           0 :         if (ndr_table_netlogon.num_calls < 11) {
   35765           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_pack");
   35766           0 :                 return NULL;
   35767             :         }
   35768           0 :         call = &ndr_table_netlogon.calls[10];
   35769             : 
   35770           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   35771           0 :         if (push == NULL) {
   35772           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35773           0 :                 return NULL;
   35774             :         }
   35775             : 
   35776           0 :         push->flags |= ndr_push_flags;
   35777             : 
   35778           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   35779           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35780           0 :                 TALLOC_FREE(push);
   35781           0 :                 PyErr_SetNdrError(err);
   35782           0 :                 return NULL;
   35783             :         }
   35784           0 :         blob = ndr_push_blob(push);
   35785           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   35786           0 :         TALLOC_FREE(push);
   35787           0 :         return ret;
   35788             : }
   35789             : 
   35790           0 : static PyObject *py_netr_AccountSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35791             : {
   35792           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35793           0 :         PyObject *bigendian_obj = NULL;
   35794           0 :         PyObject *ndr64_obj = NULL;
   35795           0 :         libndr_flags ndr_push_flags = 0;
   35796             : 
   35797           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   35798             :                 discard_const_p(char *, kwnames),
   35799             :                 &bigendian_obj,
   35800             :                 &ndr64_obj)) {
   35801           0 :                 return NULL;
   35802             :         }
   35803             : 
   35804           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35805           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35806             :         }
   35807           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35808           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35809             :         }
   35810             : 
   35811           0 :         return py_netr_AccountSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   35812             : }
   35813             : 
   35814           0 : static PyObject *py_netr_AccountSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35815             : {
   35816           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35817           0 :         PyObject *bigendian_obj = NULL;
   35818           0 :         PyObject *ndr64_obj = NULL;
   35819           0 :         libndr_flags ndr_push_flags = 0;
   35820             : 
   35821           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   35822             :                 discard_const_p(char *, kwnames),
   35823             :                 &bigendian_obj,
   35824             :                 &ndr64_obj)) {
   35825           0 :                 return NULL;
   35826             :         }
   35827             : 
   35828           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35829           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35830             :         }
   35831           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35832           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35833             :         }
   35834             : 
   35835           0 :         return py_netr_AccountSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   35836             : }
   35837             : 
   35838           0 : static PyObject *py_netr_AccountSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   35839             : {
   35840           0 :         const struct ndr_interface_call *call = NULL;
   35841           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35842           0 :         struct ndr_pull *pull = NULL;
   35843           0 :         enum ndr_err_code err;
   35844             : 
   35845           0 :         if (ndr_table_netlogon.num_calls < 11) {
   35846           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_unpack");
   35847           0 :                 return NULL;
   35848             :         }
   35849           0 :         call = &ndr_table_netlogon.calls[10];
   35850             : 
   35851           0 :         pull = ndr_pull_init_blob(blob, object);
   35852           0 :         if (pull == NULL) {
   35853           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35854           0 :                 return NULL;
   35855             :         }
   35856             : 
   35857           0 :         pull->flags |= ndr_pull_flags;
   35858             : 
   35859           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   35860           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35861           0 :                 TALLOC_FREE(pull);
   35862           0 :                 PyErr_SetNdrError(err);
   35863           0 :                 return NULL;
   35864             :         }
   35865           0 :         if (!allow_remaining) {
   35866           0 :                 uint32_t highest_ofs;
   35867             : 
   35868           0 :                 if (pull->offset > pull->relative_highest_offset) {
   35869           0 :                         highest_ofs = pull->offset;
   35870             :                 } else {
   35871           0 :                         highest_ofs = pull->relative_highest_offset;
   35872             :                 }
   35873           0 :                 if (highest_ofs < pull->data_size) {
   35874           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   35875             :                                 "not all bytes consumed ofs[%u] size[%u]",
   35876             :                                 highest_ofs, pull->data_size);
   35877           0 :                         TALLOC_FREE(pull);
   35878           0 :                         PyErr_SetNdrError(err);
   35879           0 :                         return NULL;
   35880             :                 }
   35881             :         }
   35882             : 
   35883           0 :         TALLOC_FREE(pull);
   35884           0 :         Py_RETURN_NONE;
   35885             : }
   35886             : 
   35887           0 : static PyObject *py_netr_AccountSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35888             : {
   35889           0 :         DATA_BLOB blob;
   35890           0 :         Py_ssize_t blob_length = 0;
   35891           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35892           0 :         PyObject *bigendian_obj = NULL;
   35893           0 :         PyObject *ndr64_obj = NULL;
   35894           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35895           0 :         PyObject *allow_remaining_obj = NULL;
   35896           0 :         bool allow_remaining = false;
   35897             : 
   35898           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   35899             :                 discard_const_p(char *, kwnames),
   35900             :                 &blob.data, &blob_length,
   35901             :                 &bigendian_obj,
   35902             :                 &ndr64_obj,
   35903             :                 &allow_remaining_obj)) {
   35904           0 :                 return NULL;
   35905             :         }
   35906           0 :         blob.length = blob_length;
   35907             : 
   35908           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35909           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35910             :         }
   35911           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35912           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35913             :         }
   35914             : 
   35915           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35916           0 :                 allow_remaining = true;
   35917             :         }
   35918             : 
   35919           0 :         return py_netr_AccountSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   35920             : }
   35921             : 
   35922           0 : static PyObject *py_netr_AccountSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35923             : {
   35924           0 :         DATA_BLOB blob;
   35925           0 :         Py_ssize_t blob_length = 0;
   35926           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35927           0 :         PyObject *bigendian_obj = NULL;
   35928           0 :         PyObject *ndr64_obj = NULL;
   35929           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35930           0 :         PyObject *allow_remaining_obj = NULL;
   35931           0 :         bool allow_remaining = false;
   35932             : 
   35933           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   35934             :                 discard_const_p(char *, kwnames),
   35935             :                 &blob.data, &blob_length,
   35936             :                 &bigendian_obj,
   35937             :                 &ndr64_obj,
   35938             :                 &allow_remaining_obj)) {
   35939           0 :                 return NULL;
   35940             :         }
   35941           0 :         blob.length = blob_length;
   35942             : 
   35943           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35944           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35945             :         }
   35946           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35947           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35948             :         }
   35949             : 
   35950           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35951           0 :                 allow_remaining = true;
   35952             :         }
   35953             : 
   35954           0 :         return py_netr_AccountSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   35955             : }
   35956             : 
   35957           0 : static PyObject *py_netr_AccountSync_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   35958             : {
   35959           0 :         const struct ndr_interface_call *call = NULL;
   35960           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35961           0 :         PyObject *ret;
   35962           0 :         char *retstr;
   35963             : 
   35964           0 :         if (ndr_table_netlogon.num_calls < 11) {
   35965           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_print");
   35966           0 :                 return NULL;
   35967             :         }
   35968           0 :         call = &ndr_table_netlogon.calls[10];
   35969             : 
   35970           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   35971           0 :         ret = PyUnicode_FromString(retstr);
   35972           0 :         TALLOC_FREE(retstr);
   35973             : 
   35974           0 :         return ret;
   35975             : }
   35976             : 
   35977           0 : static PyObject *py_netr_AccountSync_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35978             : {
   35979           0 :         return py_netr_AccountSync_ndr_print(py_obj, "netr_AccountSync_in", NDR_IN);
   35980             : }
   35981             : 
   35982           0 : static PyObject *py_netr_AccountSync_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35983             : {
   35984           0 :         return py_netr_AccountSync_ndr_print(py_obj, "netr_AccountSync_out", NDR_OUT);
   35985             : }
   35986             : 
   35987             : static PyMethodDef py_netr_AccountSync_methods[] = {
   35988             :         { "opnum", (PyCFunction)py_netr_AccountSync_ndr_opnum, METH_NOARGS|METH_CLASS,
   35989             :                 "netlogon.netr_AccountSync.opnum() -> 10 (0x0a) " },
   35990             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   35991             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   35992             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   35993             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   35994             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   35995             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   35996             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   35997             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   35998             :         { "__ndr_print_in__", (PyCFunction)py_netr_AccountSync_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   35999             :         { "__ndr_print_out__", (PyCFunction)py_netr_AccountSync_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   36000             :         { NULL, NULL, 0, NULL }
   36001             : };
   36002             : 
   36003             : 
   36004             : static PyTypeObject netr_AccountSync_Type = {
   36005             :         PyVarObject_HEAD_INIT(NULL, 0)
   36006             :         .tp_name = "netlogon.netr_AccountSync",
   36007             :         .tp_getset = py_netr_AccountSync_getsetters,
   36008             :         .tp_methods = py_netr_AccountSync_methods,
   36009             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   36010             :         .tp_new = py_netr_AccountSync_new,
   36011             : };
   36012             : 
   36013           0 : static bool pack_py_netr_AccountSync_args_in(PyObject *args, PyObject *kwargs, struct netr_AccountSync *r)
   36014             : {
   36015           0 :         PyObject *py_logon_server;
   36016           0 :         PyObject *py_computername;
   36017           0 :         PyObject *py_credential;
   36018           0 :         PyObject *py_return_authenticator;
   36019           0 :         PyObject *py_reference;
   36020           0 :         PyObject *py_level;
   36021           0 :         PyObject *py_buffersize;
   36022           0 :         PyObject *py_recordid;
   36023           0 :         const char *kwnames[] = {
   36024             :                 "logon_server", "computername", "credential", "return_authenticator", "reference", "level", "buffersize", "recordid", NULL
   36025             :         };
   36026             : 
   36027           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:netr_AccountSync", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_reference, &py_level, &py_buffersize, &py_recordid)) {
   36028           0 :                 return false;
   36029             :         }
   36030             : 
   36031           0 :         if (py_logon_server == NULL) {
   36032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   36033           0 :                 return false;
   36034             :         }
   36035           0 :         if (py_logon_server == Py_None) {
   36036           0 :                 r->in.logon_server = NULL;
   36037             :         } else {
   36038           0 :                 r->in.logon_server = NULL;
   36039             :                 {
   36040           0 :                         const char *test_str;
   36041           0 :                         const char *talloc_str;
   36042           0 :                         PyObject *unicode = NULL;
   36043           0 :                         if (PyUnicode_Check(py_logon_server)) {
   36044           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   36045           0 :                                 if (unicode == NULL) {
   36046           0 :                                         PyErr_NoMemory();
   36047           0 :                                         return false;
   36048             :                                 }
   36049           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36050           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   36051           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   36052             :                         } else {
   36053           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   36054           0 :                                 return false;
   36055             :                         }
   36056           0 :                         talloc_str = talloc_strdup(r, test_str);
   36057           0 :                         if (unicode != NULL) {
   36058           0 :                                 Py_DECREF(unicode);
   36059             :                         }
   36060           0 :                         if (talloc_str == NULL) {
   36061           0 :                                 PyErr_NoMemory();
   36062           0 :                                 return false;
   36063             :                         }
   36064           0 :                         r->in.logon_server = talloc_str;
   36065             :                 }
   36066             :         }
   36067           0 :         if (py_computername == NULL) {
   36068           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   36069           0 :                 return false;
   36070             :         }
   36071           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   36072           0 :         if (r->in.computername == NULL) {
   36073           0 :                 PyErr_NoMemory();
   36074           0 :                 return false;
   36075             :         }
   36076             :         {
   36077           0 :                 const char *test_str;
   36078           0 :                 const char *talloc_str;
   36079           0 :                 PyObject *unicode = NULL;
   36080           0 :                 if (PyUnicode_Check(py_computername)) {
   36081           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   36082           0 :                         if (unicode == NULL) {
   36083           0 :                                 PyErr_NoMemory();
   36084           0 :                                 return false;
   36085             :                         }
   36086           0 :                         test_str = PyBytes_AS_STRING(unicode);
   36087           0 :                 } else if (PyBytes_Check(py_computername)) {
   36088           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   36089             :                 } else {
   36090           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   36091           0 :                         return false;
   36092             :                 }
   36093           0 :                 talloc_str = talloc_strdup(r, test_str);
   36094           0 :                 if (unicode != NULL) {
   36095           0 :                         Py_DECREF(unicode);
   36096             :                 }
   36097           0 :                 if (talloc_str == NULL) {
   36098           0 :                         PyErr_NoMemory();
   36099           0 :                         return false;
   36100             :                 }
   36101           0 :                 r->in.computername = talloc_str;
   36102             :         }
   36103           0 :         if (py_credential == NULL) {
   36104           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   36105           0 :                 return false;
   36106             :         }
   36107           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   36108           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   36109           0 :                 PyErr_NoMemory();
   36110           0 :                 return false;
   36111             :         }
   36112           0 :         r->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   36113           0 :         if (py_return_authenticator == NULL) {
   36114           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   36115           0 :                 return false;
   36116             :         }
   36117           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   36118           0 :         if (r->in.return_authenticator == NULL) {
   36119           0 :                 PyErr_NoMemory();
   36120           0 :                 return false;
   36121             :         }
   36122           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   36123           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   36124           0 :                 PyErr_NoMemory();
   36125           0 :                 return false;
   36126             :         }
   36127           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   36128           0 :         if (py_reference == NULL) {
   36129           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.reference");
   36130           0 :                 return false;
   36131             :         }
   36132             :         {
   36133           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reference));
   36134           0 :                 if (PyLong_Check(py_reference)) {
   36135           0 :                         unsigned long long test_var;
   36136           0 :                         test_var = PyLong_AsUnsignedLongLong(py_reference);
   36137           0 :                         if (PyErr_Occurred() != NULL) {
   36138           0 :                                 return false;
   36139             :                         }
   36140           0 :                         if (test_var > uint_max) {
   36141           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36142             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36143           0 :                                 return false;
   36144             :                         }
   36145           0 :                         r->in.reference = test_var;
   36146             :                 } else {
   36147           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36148             :                           PyLong_Type.tp_name);
   36149           0 :                         return false;
   36150             :                 }
   36151             :         }
   36152           0 :         if (py_level == NULL) {
   36153           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   36154           0 :                 return false;
   36155             :         }
   36156             :         {
   36157           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   36158           0 :                 if (PyLong_Check(py_level)) {
   36159           0 :                         unsigned long long test_var;
   36160           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   36161           0 :                         if (PyErr_Occurred() != NULL) {
   36162           0 :                                 return false;
   36163             :                         }
   36164           0 :                         if (test_var > uint_max) {
   36165           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36166             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36167           0 :                                 return false;
   36168             :                         }
   36169           0 :                         r->in.level = test_var;
   36170             :                 } else {
   36171           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36172             :                           PyLong_Type.tp_name);
   36173           0 :                         return false;
   36174             :                 }
   36175             :         }
   36176           0 :         if (py_buffersize == NULL) {
   36177           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.buffersize");
   36178           0 :                 return false;
   36179             :         }
   36180             :         {
   36181           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.buffersize));
   36182           0 :                 if (PyLong_Check(py_buffersize)) {
   36183           0 :                         unsigned long long test_var;
   36184           0 :                         test_var = PyLong_AsUnsignedLongLong(py_buffersize);
   36185           0 :                         if (PyErr_Occurred() != NULL) {
   36186           0 :                                 return false;
   36187             :                         }
   36188           0 :                         if (test_var > uint_max) {
   36189           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36190             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36191           0 :                                 return false;
   36192             :                         }
   36193           0 :                         r->in.buffersize = test_var;
   36194             :                 } else {
   36195           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36196             :                           PyLong_Type.tp_name);
   36197           0 :                         return false;
   36198             :                 }
   36199             :         }
   36200           0 :         if (py_recordid == NULL) {
   36201           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.recordid");
   36202           0 :                 return false;
   36203             :         }
   36204           0 :         r->in.recordid = talloc_ptrtype(r, r->in.recordid);
   36205           0 :         if (r->in.recordid == NULL) {
   36206           0 :                 PyErr_NoMemory();
   36207           0 :                 return false;
   36208             :         }
   36209           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, py_recordid, return false;);
   36210           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_recordid)) == NULL) {
   36211           0 :                 PyErr_NoMemory();
   36212           0 :                 return false;
   36213             :         }
   36214           0 :         r->in.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_recordid);
   36215           0 :         return true;
   36216             : }
   36217             : 
   36218           0 : static PyObject *unpack_py_netr_AccountSync_args_out(struct netr_AccountSync *r)
   36219             : {
   36220           0 :         PyObject *result;
   36221           0 :         PyObject *py_return_authenticator;
   36222           0 :         PyObject *py_buffer;
   36223           0 :         PyObject *py_count_returned;
   36224           0 :         PyObject *py_total_entries;
   36225           0 :         PyObject *py_next_reference;
   36226           0 :         PyObject *py_recordid;
   36227           0 :         result = PyTuple_New(6);
   36228           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   36229           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   36230           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, r->out.buffer, r->out.buffer);
   36231           0 :         PyTuple_SetItem(result, 1, py_buffer);
   36232           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)*r->out.count_returned);
   36233           0 :         PyTuple_SetItem(result, 2, py_count_returned);
   36234           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.total_entries);
   36235           0 :         PyTuple_SetItem(result, 3, py_total_entries);
   36236           0 :         py_next_reference = PyLong_FromUnsignedLongLong((uint32_t)*r->out.next_reference);
   36237           0 :         PyTuple_SetItem(result, 4, py_next_reference);
   36238           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, r->out.recordid, r->out.recordid);
   36239           0 :         PyTuple_SetItem(result, 5, py_recordid);
   36240           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   36241           0 :                 PyErr_SetNTSTATUS(r->out.result);
   36242           0 :                 return NULL;
   36243             :         }
   36244             : 
   36245           0 :         return result;
   36246             : }
   36247             : 
   36248             : 
   36249           0 : static PyObject *py_netr_GetDcName_in_get_logon_server(PyObject *obj, void *closure)
   36250             : {
   36251           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(obj);
   36252           0 :         PyObject *py_logon_server;
   36253           0 :         if (object->in.logon_server == NULL) {
   36254           0 :                 Py_RETURN_NONE;
   36255             :         }
   36256           0 :         if (object->in.logon_server == NULL) {
   36257           0 :                 py_logon_server = Py_None;
   36258           0 :                 Py_INCREF(py_logon_server);
   36259             :         } else {
   36260           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   36261             :         }
   36262           0 :         return py_logon_server;
   36263             : }
   36264             : 
   36265           0 : static int py_netr_GetDcName_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   36266             : {
   36267           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36268           0 :         if (value == NULL) {
   36269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   36270           0 :                 return -1;
   36271             :         }
   36272           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   36273           0 :         if (object->in.logon_server == NULL) {
   36274           0 :                 PyErr_NoMemory();
   36275           0 :                 return -1;
   36276             :         }
   36277             :         {
   36278           0 :                 const char *test_str;
   36279           0 :                 const char *talloc_str;
   36280           0 :                 PyObject *unicode = NULL;
   36281           0 :                 if (PyUnicode_Check(value)) {
   36282           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36283           0 :                         if (unicode == NULL) {
   36284           0 :                                 PyErr_NoMemory();
   36285           0 :                                 return -1;
   36286             :                         }
   36287           0 :                         test_str = PyBytes_AS_STRING(unicode);
   36288           0 :                 } else if (PyBytes_Check(value)) {
   36289           0 :                         test_str = PyBytes_AS_STRING(value);
   36290             :                 } else {
   36291           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36292           0 :                         return -1;
   36293             :                 }
   36294           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36295           0 :                 if (unicode != NULL) {
   36296           0 :                         Py_DECREF(unicode);
   36297             :                 }
   36298           0 :                 if (talloc_str == NULL) {
   36299           0 :                         PyErr_NoMemory();
   36300           0 :                         return -1;
   36301             :                 }
   36302           0 :                 object->in.logon_server = talloc_str;
   36303             :         }
   36304           0 :         return 0;
   36305             : }
   36306             : 
   36307           0 : static PyObject *py_netr_GetDcName_in_get_domainname(PyObject *obj, void *closure)
   36308             : {
   36309           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(obj);
   36310           0 :         PyObject *py_domainname;
   36311           0 :         if (object->in.domainname == NULL) {
   36312           0 :                 Py_RETURN_NONE;
   36313             :         }
   36314           0 :         if (object->in.domainname == NULL) {
   36315           0 :                 py_domainname = Py_None;
   36316           0 :                 Py_INCREF(py_domainname);
   36317             :         } else {
   36318           0 :                 if (object->in.domainname == NULL) {
   36319           0 :                         py_domainname = Py_None;
   36320           0 :                         Py_INCREF(py_domainname);
   36321             :                 } else {
   36322           0 :                         py_domainname = PyUnicode_Decode(object->in.domainname, strlen(object->in.domainname), "utf-8", "ignore");
   36323             :                 }
   36324             :         }
   36325           0 :         return py_domainname;
   36326             : }
   36327             : 
   36328           0 : static int py_netr_GetDcName_in_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
   36329             : {
   36330           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36331           0 :         if (value == NULL) {
   36332           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domainname");
   36333           0 :                 return -1;
   36334             :         }
   36335           0 :         if (value == Py_None) {
   36336           0 :                 object->in.domainname = NULL;
   36337             :         } else {
   36338           0 :                 object->in.domainname = NULL;
   36339             :                 {
   36340           0 :                         const char *test_str;
   36341           0 :                         const char *talloc_str;
   36342           0 :                         PyObject *unicode = NULL;
   36343           0 :                         if (PyUnicode_Check(value)) {
   36344           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36345           0 :                                 if (unicode == NULL) {
   36346           0 :                                         PyErr_NoMemory();
   36347           0 :                                         return -1;
   36348             :                                 }
   36349           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36350           0 :                         } else if (PyBytes_Check(value)) {
   36351           0 :                                 test_str = PyBytes_AS_STRING(value);
   36352             :                         } else {
   36353           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36354           0 :                                 return -1;
   36355             :                         }
   36356           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36357           0 :                         if (unicode != NULL) {
   36358           0 :                                 Py_DECREF(unicode);
   36359             :                         }
   36360           0 :                         if (talloc_str == NULL) {
   36361           0 :                                 PyErr_NoMemory();
   36362           0 :                                 return -1;
   36363             :                         }
   36364           0 :                         object->in.domainname = talloc_str;
   36365             :                 }
   36366             :         }
   36367           0 :         return 0;
   36368             : }
   36369             : 
   36370           0 : static PyObject *py_netr_GetDcName_out_get_dcname(PyObject *obj, void *closure)
   36371             : {
   36372           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(obj);
   36373           0 :         PyObject *py_dcname;
   36374           0 :         if (object->out.dcname == NULL) {
   36375           0 :                 Py_RETURN_NONE;
   36376             :         }
   36377           0 :         if (*object->out.dcname == NULL) {
   36378           0 :                 py_dcname = Py_None;
   36379           0 :                 Py_INCREF(py_dcname);
   36380             :         } else {
   36381           0 :                 if (*object->out.dcname == NULL) {
   36382           0 :                         py_dcname = Py_None;
   36383           0 :                         Py_INCREF(py_dcname);
   36384             :                 } else {
   36385           0 :                         py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
   36386             :                 }
   36387             :         }
   36388           0 :         return py_dcname;
   36389             : }
   36390             : 
   36391           0 : static int py_netr_GetDcName_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   36392             : {
   36393           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36394           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
   36395           0 :         if (value == NULL) {
   36396           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dcname");
   36397           0 :                 return -1;
   36398             :         }
   36399           0 :         object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
   36400           0 :         if (object->out.dcname == NULL) {
   36401           0 :                 PyErr_NoMemory();
   36402           0 :                 return -1;
   36403             :         }
   36404           0 :         if (value == Py_None) {
   36405           0 :                 *object->out.dcname = NULL;
   36406             :         } else {
   36407           0 :                 *object->out.dcname = NULL;
   36408             :                 {
   36409           0 :                         const char *test_str;
   36410           0 :                         const char *talloc_str;
   36411           0 :                         PyObject *unicode = NULL;
   36412           0 :                         if (PyUnicode_Check(value)) {
   36413           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36414           0 :                                 if (unicode == NULL) {
   36415           0 :                                         PyErr_NoMemory();
   36416           0 :                                         return -1;
   36417             :                                 }
   36418           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36419           0 :                         } else if (PyBytes_Check(value)) {
   36420           0 :                                 test_str = PyBytes_AS_STRING(value);
   36421             :                         } else {
   36422           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36423           0 :                                 return -1;
   36424             :                         }
   36425           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36426           0 :                         if (unicode != NULL) {
   36427           0 :                                 Py_DECREF(unicode);
   36428             :                         }
   36429           0 :                         if (talloc_str == NULL) {
   36430           0 :                                 PyErr_NoMemory();
   36431           0 :                                 return -1;
   36432             :                         }
   36433           0 :                         *object->out.dcname = talloc_str;
   36434             :                 }
   36435             :         }
   36436           0 :         return 0;
   36437             : }
   36438             : 
   36439           0 : static PyObject *py_netr_GetDcName_get_result(PyObject *obj, void *closure)
   36440             : {
   36441           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(obj);
   36442           0 :         PyObject *py_result;
   36443           0 :         py_result = PyErr_FromWERROR(object->out.result);
   36444           0 :         return py_result;
   36445             : }
   36446             : 
   36447           0 : static int py_netr_GetDcName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   36448             : {
   36449           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36450           0 :         if (value == NULL) {
   36451           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   36452           0 :                 return -1;
   36453             :         }
   36454           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   36455           0 :         return 0;
   36456             : }
   36457             : 
   36458             : static PyGetSetDef py_netr_GetDcName_getsetters[] = {
   36459             :         {
   36460             :                 .name = discard_const_p(char, "in_logon_server"),
   36461             :                 .get = py_netr_GetDcName_in_get_logon_server,
   36462             :                 .set = py_netr_GetDcName_in_set_logon_server,
   36463             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36464             :         },
   36465             :         {
   36466             :                 .name = discard_const_p(char, "in_domainname"),
   36467             :                 .get = py_netr_GetDcName_in_get_domainname,
   36468             :                 .set = py_netr_GetDcName_in_set_domainname,
   36469             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36470             :         },
   36471             :         {
   36472             :                 .name = discard_const_p(char, "out_dcname"),
   36473             :                 .get = py_netr_GetDcName_out_get_dcname,
   36474             :                 .set = py_netr_GetDcName_out_set_dcname,
   36475             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36476             :         },
   36477             :         {
   36478             :                 .name = discard_const_p(char, "result"),
   36479             :                 .get = py_netr_GetDcName_get_result,
   36480             :                 .set = py_netr_GetDcName_set_result,
   36481             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   36482             :         },
   36483             :         { .name = NULL }
   36484             : };
   36485             : 
   36486           0 : static PyObject *py_netr_GetDcName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   36487             : {
   36488           0 :         PyObject *self = pytalloc_new(struct netr_GetDcName, type);
   36489           0 :         return self;
   36490             : }
   36491             : 
   36492           0 : static PyObject *py_netr_GetDcName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   36493             : {
   36494             : 
   36495             : 
   36496           0 :         return PyLong_FromLong(11);
   36497             : }
   36498             : 
   36499           0 : static PyObject *py_netr_GetDcName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   36500             : {
   36501           0 :         const struct ndr_interface_call *call = NULL;
   36502           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36503           0 :         PyObject *ret = NULL;
   36504           0 :         struct ndr_push *push = NULL;
   36505           0 :         DATA_BLOB blob;
   36506           0 :         enum ndr_err_code err;
   36507             : 
   36508           0 :         if (ndr_table_netlogon.num_calls < 12) {
   36509           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_pack");
   36510           0 :                 return NULL;
   36511             :         }
   36512           0 :         call = &ndr_table_netlogon.calls[11];
   36513             : 
   36514           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   36515           0 :         if (push == NULL) {
   36516           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36517           0 :                 return NULL;
   36518             :         }
   36519             : 
   36520           0 :         push->flags |= ndr_push_flags;
   36521             : 
   36522           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   36523           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36524           0 :                 TALLOC_FREE(push);
   36525           0 :                 PyErr_SetNdrError(err);
   36526           0 :                 return NULL;
   36527             :         }
   36528           0 :         blob = ndr_push_blob(push);
   36529           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   36530           0 :         TALLOC_FREE(push);
   36531           0 :         return ret;
   36532             : }
   36533             : 
   36534           0 : static PyObject *py_netr_GetDcName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36535             : {
   36536           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36537           0 :         PyObject *bigendian_obj = NULL;
   36538           0 :         PyObject *ndr64_obj = NULL;
   36539           0 :         libndr_flags ndr_push_flags = 0;
   36540             : 
   36541           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   36542             :                 discard_const_p(char *, kwnames),
   36543             :                 &bigendian_obj,
   36544             :                 &ndr64_obj)) {
   36545           0 :                 return NULL;
   36546             :         }
   36547             : 
   36548           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36549           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36550             :         }
   36551           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36552           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36553             :         }
   36554             : 
   36555           0 :         return py_netr_GetDcName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   36556             : }
   36557             : 
   36558           0 : static PyObject *py_netr_GetDcName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36559             : {
   36560           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36561           0 :         PyObject *bigendian_obj = NULL;
   36562           0 :         PyObject *ndr64_obj = NULL;
   36563           0 :         libndr_flags ndr_push_flags = 0;
   36564             : 
   36565           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   36566             :                 discard_const_p(char *, kwnames),
   36567             :                 &bigendian_obj,
   36568             :                 &ndr64_obj)) {
   36569           0 :                 return NULL;
   36570             :         }
   36571             : 
   36572           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36573           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36574             :         }
   36575           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36576           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36577             :         }
   36578             : 
   36579           0 :         return py_netr_GetDcName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   36580             : }
   36581             : 
   36582           0 : static PyObject *py_netr_GetDcName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   36583             : {
   36584           0 :         const struct ndr_interface_call *call = NULL;
   36585           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36586           0 :         struct ndr_pull *pull = NULL;
   36587           0 :         enum ndr_err_code err;
   36588             : 
   36589           0 :         if (ndr_table_netlogon.num_calls < 12) {
   36590           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_unpack");
   36591           0 :                 return NULL;
   36592             :         }
   36593           0 :         call = &ndr_table_netlogon.calls[11];
   36594             : 
   36595           0 :         pull = ndr_pull_init_blob(blob, object);
   36596           0 :         if (pull == NULL) {
   36597           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36598           0 :                 return NULL;
   36599             :         }
   36600             : 
   36601           0 :         pull->flags |= ndr_pull_flags;
   36602             : 
   36603           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   36604           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36605           0 :                 TALLOC_FREE(pull);
   36606           0 :                 PyErr_SetNdrError(err);
   36607           0 :                 return NULL;
   36608             :         }
   36609           0 :         if (!allow_remaining) {
   36610           0 :                 uint32_t highest_ofs;
   36611             : 
   36612           0 :                 if (pull->offset > pull->relative_highest_offset) {
   36613           0 :                         highest_ofs = pull->offset;
   36614             :                 } else {
   36615           0 :                         highest_ofs = pull->relative_highest_offset;
   36616             :                 }
   36617           0 :                 if (highest_ofs < pull->data_size) {
   36618           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   36619             :                                 "not all bytes consumed ofs[%u] size[%u]",
   36620             :                                 highest_ofs, pull->data_size);
   36621           0 :                         TALLOC_FREE(pull);
   36622           0 :                         PyErr_SetNdrError(err);
   36623           0 :                         return NULL;
   36624             :                 }
   36625             :         }
   36626             : 
   36627           0 :         TALLOC_FREE(pull);
   36628           0 :         Py_RETURN_NONE;
   36629             : }
   36630             : 
   36631           0 : static PyObject *py_netr_GetDcName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36632             : {
   36633           0 :         DATA_BLOB blob;
   36634           0 :         Py_ssize_t blob_length = 0;
   36635           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36636           0 :         PyObject *bigendian_obj = NULL;
   36637           0 :         PyObject *ndr64_obj = NULL;
   36638           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36639           0 :         PyObject *allow_remaining_obj = NULL;
   36640           0 :         bool allow_remaining = false;
   36641             : 
   36642           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   36643             :                 discard_const_p(char *, kwnames),
   36644             :                 &blob.data, &blob_length,
   36645             :                 &bigendian_obj,
   36646             :                 &ndr64_obj,
   36647             :                 &allow_remaining_obj)) {
   36648           0 :                 return NULL;
   36649             :         }
   36650           0 :         blob.length = blob_length;
   36651             : 
   36652           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36653           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36654             :         }
   36655           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36656           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36657             :         }
   36658             : 
   36659           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36660           0 :                 allow_remaining = true;
   36661             :         }
   36662             : 
   36663           0 :         return py_netr_GetDcName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   36664             : }
   36665             : 
   36666           0 : static PyObject *py_netr_GetDcName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36667             : {
   36668           0 :         DATA_BLOB blob;
   36669           0 :         Py_ssize_t blob_length = 0;
   36670           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36671           0 :         PyObject *bigendian_obj = NULL;
   36672           0 :         PyObject *ndr64_obj = NULL;
   36673           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36674           0 :         PyObject *allow_remaining_obj = NULL;
   36675           0 :         bool allow_remaining = false;
   36676             : 
   36677           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   36678             :                 discard_const_p(char *, kwnames),
   36679             :                 &blob.data, &blob_length,
   36680             :                 &bigendian_obj,
   36681             :                 &ndr64_obj,
   36682             :                 &allow_remaining_obj)) {
   36683           0 :                 return NULL;
   36684             :         }
   36685           0 :         blob.length = blob_length;
   36686             : 
   36687           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36688           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36689             :         }
   36690           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36691           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36692             :         }
   36693             : 
   36694           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36695           0 :                 allow_remaining = true;
   36696             :         }
   36697             : 
   36698           0 :         return py_netr_GetDcName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   36699             : }
   36700             : 
   36701           0 : static PyObject *py_netr_GetDcName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   36702             : {
   36703           0 :         const struct ndr_interface_call *call = NULL;
   36704           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36705           0 :         PyObject *ret;
   36706           0 :         char *retstr;
   36707             : 
   36708           0 :         if (ndr_table_netlogon.num_calls < 12) {
   36709           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_print");
   36710           0 :                 return NULL;
   36711             :         }
   36712           0 :         call = &ndr_table_netlogon.calls[11];
   36713             : 
   36714           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   36715           0 :         ret = PyUnicode_FromString(retstr);
   36716           0 :         TALLOC_FREE(retstr);
   36717             : 
   36718           0 :         return ret;
   36719             : }
   36720             : 
   36721           0 : static PyObject *py_netr_GetDcName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36722             : {
   36723           0 :         return py_netr_GetDcName_ndr_print(py_obj, "netr_GetDcName_in", NDR_IN);
   36724             : }
   36725             : 
   36726           0 : static PyObject *py_netr_GetDcName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36727             : {
   36728           0 :         return py_netr_GetDcName_ndr_print(py_obj, "netr_GetDcName_out", NDR_OUT);
   36729             : }
   36730             : 
   36731             : static PyMethodDef py_netr_GetDcName_methods[] = {
   36732             :         { "opnum", (PyCFunction)py_netr_GetDcName_ndr_opnum, METH_NOARGS|METH_CLASS,
   36733             :                 "netlogon.netr_GetDcName.opnum() -> 11 (0x0b) " },
   36734             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   36735             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   36736             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   36737             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   36738             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   36739             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   36740             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   36741             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   36742             :         { "__ndr_print_in__", (PyCFunction)py_netr_GetDcName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   36743             :         { "__ndr_print_out__", (PyCFunction)py_netr_GetDcName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   36744             :         { NULL, NULL, 0, NULL }
   36745             : };
   36746             : 
   36747             : 
   36748             : static PyTypeObject netr_GetDcName_Type = {
   36749             :         PyVarObject_HEAD_INIT(NULL, 0)
   36750             :         .tp_name = "netlogon.netr_GetDcName",
   36751             :         .tp_getset = py_netr_GetDcName_getsetters,
   36752             :         .tp_methods = py_netr_GetDcName_methods,
   36753             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   36754             :         .tp_new = py_netr_GetDcName_new,
   36755             : };
   36756             : 
   36757           0 : static bool pack_py_netr_GetDcName_args_in(PyObject *args, PyObject *kwargs, struct netr_GetDcName *r)
   36758             : {
   36759           0 :         PyObject *py_logon_server;
   36760           0 :         PyObject *py_domainname;
   36761           0 :         const char *kwnames[] = {
   36762             :                 "logon_server", "domainname", NULL
   36763             :         };
   36764             : 
   36765           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_GetDcName", discard_const_p(char *, kwnames), &py_logon_server, &py_domainname)) {
   36766           0 :                 return false;
   36767             :         }
   36768             : 
   36769           0 :         if (py_logon_server == NULL) {
   36770           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   36771           0 :                 return false;
   36772             :         }
   36773           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   36774           0 :         if (r->in.logon_server == NULL) {
   36775           0 :                 PyErr_NoMemory();
   36776           0 :                 return false;
   36777             :         }
   36778             :         {
   36779           0 :                 const char *test_str;
   36780           0 :                 const char *talloc_str;
   36781           0 :                 PyObject *unicode = NULL;
   36782           0 :                 if (PyUnicode_Check(py_logon_server)) {
   36783           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   36784           0 :                         if (unicode == NULL) {
   36785           0 :                                 PyErr_NoMemory();
   36786           0 :                                 return false;
   36787             :                         }
   36788           0 :                         test_str = PyBytes_AS_STRING(unicode);
   36789           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   36790           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   36791             :                 } else {
   36792           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   36793           0 :                         return false;
   36794             :                 }
   36795           0 :                 talloc_str = talloc_strdup(r, test_str);
   36796           0 :                 if (unicode != NULL) {
   36797           0 :                         Py_DECREF(unicode);
   36798             :                 }
   36799           0 :                 if (talloc_str == NULL) {
   36800           0 :                         PyErr_NoMemory();
   36801           0 :                         return false;
   36802             :                 }
   36803           0 :                 r->in.logon_server = talloc_str;
   36804             :         }
   36805           0 :         if (py_domainname == NULL) {
   36806           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domainname");
   36807           0 :                 return false;
   36808             :         }
   36809           0 :         if (py_domainname == Py_None) {
   36810           0 :                 r->in.domainname = NULL;
   36811             :         } else {
   36812           0 :                 r->in.domainname = NULL;
   36813             :                 {
   36814           0 :                         const char *test_str;
   36815           0 :                         const char *talloc_str;
   36816           0 :                         PyObject *unicode = NULL;
   36817           0 :                         if (PyUnicode_Check(py_domainname)) {
   36818           0 :                                 unicode = PyUnicode_AsEncodedString(py_domainname, "utf-8", "ignore");
   36819           0 :                                 if (unicode == NULL) {
   36820           0 :                                         PyErr_NoMemory();
   36821           0 :                                         return false;
   36822             :                                 }
   36823           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36824           0 :                         } else if (PyBytes_Check(py_domainname)) {
   36825           0 :                                 test_str = PyBytes_AS_STRING(py_domainname);
   36826             :                         } else {
   36827           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domainname)->tp_name);
   36828           0 :                                 return false;
   36829             :                         }
   36830           0 :                         talloc_str = talloc_strdup(r, test_str);
   36831           0 :                         if (unicode != NULL) {
   36832           0 :                                 Py_DECREF(unicode);
   36833             :                         }
   36834           0 :                         if (talloc_str == NULL) {
   36835           0 :                                 PyErr_NoMemory();
   36836           0 :                                 return false;
   36837             :                         }
   36838           0 :                         r->in.domainname = talloc_str;
   36839             :                 }
   36840             :         }
   36841           0 :         return true;
   36842             : }
   36843             : 
   36844           0 : static PyObject *unpack_py_netr_GetDcName_args_out(struct netr_GetDcName *r)
   36845             : {
   36846           0 :         PyObject *result;
   36847           0 :         PyObject *py_dcname;
   36848           0 :         if (*r->out.dcname == NULL) {
   36849           0 :                 py_dcname = Py_None;
   36850           0 :                 Py_INCREF(py_dcname);
   36851             :         } else {
   36852           0 :                 if (*r->out.dcname == NULL) {
   36853           0 :                         py_dcname = Py_None;
   36854           0 :                         Py_INCREF(py_dcname);
   36855             :                 } else {
   36856           0 :                         py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
   36857             :                 }
   36858             :         }
   36859           0 :         result = py_dcname;
   36860           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   36861           0 :                 PyErr_SetWERROR(r->out.result);
   36862           0 :                 return NULL;
   36863             :         }
   36864             : 
   36865           0 :         return result;
   36866             : }
   36867             : 
   36868             : 
   36869           0 : static PyObject *py_netr_LogonControl_in_get_logon_server(PyObject *obj, void *closure)
   36870             : {
   36871           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   36872           0 :         PyObject *py_logon_server;
   36873           0 :         if (object->in.logon_server == NULL) {
   36874           0 :                 Py_RETURN_NONE;
   36875             :         }
   36876           0 :         if (object->in.logon_server == NULL) {
   36877           0 :                 py_logon_server = Py_None;
   36878           0 :                 Py_INCREF(py_logon_server);
   36879             :         } else {
   36880           0 :                 if (object->in.logon_server == NULL) {
   36881           0 :                         py_logon_server = Py_None;
   36882           0 :                         Py_INCREF(py_logon_server);
   36883             :                 } else {
   36884           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   36885             :                 }
   36886             :         }
   36887           0 :         return py_logon_server;
   36888             : }
   36889             : 
   36890           0 : static int py_netr_LogonControl_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   36891             : {
   36892           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36893           0 :         if (value == NULL) {
   36894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   36895           0 :                 return -1;
   36896             :         }
   36897           0 :         if (value == Py_None) {
   36898           0 :                 object->in.logon_server = NULL;
   36899             :         } else {
   36900           0 :                 object->in.logon_server = NULL;
   36901             :                 {
   36902           0 :                         const char *test_str;
   36903           0 :                         const char *talloc_str;
   36904           0 :                         PyObject *unicode = NULL;
   36905           0 :                         if (PyUnicode_Check(value)) {
   36906           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36907           0 :                                 if (unicode == NULL) {
   36908           0 :                                         PyErr_NoMemory();
   36909           0 :                                         return -1;
   36910             :                                 }
   36911           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36912           0 :                         } else if (PyBytes_Check(value)) {
   36913           0 :                                 test_str = PyBytes_AS_STRING(value);
   36914             :                         } else {
   36915           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36916           0 :                                 return -1;
   36917             :                         }
   36918           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36919           0 :                         if (unicode != NULL) {
   36920           0 :                                 Py_DECREF(unicode);
   36921             :                         }
   36922           0 :                         if (talloc_str == NULL) {
   36923           0 :                                 PyErr_NoMemory();
   36924           0 :                                 return -1;
   36925             :                         }
   36926           0 :                         object->in.logon_server = talloc_str;
   36927             :                 }
   36928             :         }
   36929           0 :         return 0;
   36930             : }
   36931             : 
   36932           0 : static PyObject *py_netr_LogonControl_in_get_function_code(PyObject *obj, void *closure)
   36933             : {
   36934           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   36935           0 :         PyObject *py_function_code;
   36936           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)object->in.function_code);
   36937           0 :         return py_function_code;
   36938             : }
   36939             : 
   36940           0 : static int py_netr_LogonControl_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   36941             : {
   36942           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36943           0 :         if (value == NULL) {
   36944           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.function_code");
   36945           0 :                 return -1;
   36946             :         }
   36947             :         {
   36948           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   36949           0 :                 if (PyLong_Check(value)) {
   36950           0 :                         unsigned long long test_var;
   36951           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36952           0 :                         if (PyErr_Occurred() != NULL) {
   36953           0 :                                 return -1;
   36954             :                         }
   36955           0 :                         if (test_var > uint_max) {
   36956           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36957             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36958           0 :                                 return -1;
   36959             :                         }
   36960           0 :                         object->in.function_code = test_var;
   36961             :                 } else {
   36962           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36963             :                           PyLong_Type.tp_name);
   36964           0 :                         return -1;
   36965             :                 }
   36966             :         }
   36967           0 :         return 0;
   36968             : }
   36969             : 
   36970           0 : static PyObject *py_netr_LogonControl_in_get_level(PyObject *obj, void *closure)
   36971             : {
   36972           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   36973           0 :         PyObject *py_level;
   36974           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   36975           0 :         return py_level;
   36976             : }
   36977             : 
   36978           0 : static int py_netr_LogonControl_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   36979             : {
   36980           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36981           0 :         if (value == NULL) {
   36982           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   36983           0 :                 return -1;
   36984             :         }
   36985             :         {
   36986           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   36987           0 :                 if (PyLong_Check(value)) {
   36988           0 :                         unsigned long long test_var;
   36989           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36990           0 :                         if (PyErr_Occurred() != NULL) {
   36991           0 :                                 return -1;
   36992             :                         }
   36993           0 :                         if (test_var > uint_max) {
   36994           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36995             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36996           0 :                                 return -1;
   36997             :                         }
   36998           0 :                         object->in.level = test_var;
   36999             :                 } else {
   37000           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37001             :                           PyLong_Type.tp_name);
   37002           0 :                         return -1;
   37003             :                 }
   37004             :         }
   37005           0 :         return 0;
   37006             : }
   37007             : 
   37008           0 : static PyObject *py_netr_LogonControl_out_get_query(PyObject *obj, void *closure)
   37009             : {
   37010           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   37011           0 :         PyObject *py_query;
   37012           0 :         if (object->out.query == NULL) {
   37013           0 :                 Py_RETURN_NONE;
   37014             :         }
   37015           0 :         py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, object->out.query, object->in.level, object->out.query, "union netr_CONTROL_QUERY_INFORMATION");
   37016           0 :         if (py_query == NULL) {
   37017           0 :                 return NULL;
   37018             :         }
   37019           0 :         return py_query;
   37020             : }
   37021             : 
   37022           0 : static int py_netr_LogonControl_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   37023             : {
   37024           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   37025           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   37026           0 :         if (value == NULL) {
   37027           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.query");
   37028           0 :                 return -1;
   37029             :         }
   37030           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   37031           0 :         if (object->out.query == NULL) {
   37032           0 :                 PyErr_NoMemory();
   37033           0 :                 return -1;
   37034             :         }
   37035             :         {
   37036           0 :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   37037           0 :                 query_switch_1 = (union netr_CONTROL_QUERY_INFORMATION *)pyrpc_export_union(&netr_CONTROL_QUERY_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_CONTROL_QUERY_INFORMATION");
   37038           0 :                 if (query_switch_1 == NULL) {
   37039           0 :                         return -1;
   37040             :                 }
   37041           0 :                 object->out.query = query_switch_1;
   37042             :         }
   37043           0 :         return 0;
   37044             : }
   37045             : 
   37046           0 : static PyObject *py_netr_LogonControl_get_result(PyObject *obj, void *closure)
   37047             : {
   37048           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   37049           0 :         PyObject *py_result;
   37050           0 :         py_result = PyErr_FromWERROR(object->out.result);
   37051           0 :         return py_result;
   37052             : }
   37053             : 
   37054           0 : static int py_netr_LogonControl_set_result(PyObject *py_obj, PyObject *value, void *closure)
   37055             : {
   37056           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   37057           0 :         if (value == NULL) {
   37058           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   37059           0 :                 return -1;
   37060             :         }
   37061           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   37062           0 :         return 0;
   37063             : }
   37064             : 
   37065             : static PyGetSetDef py_netr_LogonControl_getsetters[] = {
   37066             :         {
   37067             :                 .name = discard_const_p(char, "in_logon_server"),
   37068             :                 .get = py_netr_LogonControl_in_get_logon_server,
   37069             :                 .set = py_netr_LogonControl_in_set_logon_server,
   37070             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37071             :         },
   37072             :         {
   37073             :                 .name = discard_const_p(char, "in_function_code"),
   37074             :                 .get = py_netr_LogonControl_in_get_function_code,
   37075             :                 .set = py_netr_LogonControl_in_set_function_code,
   37076             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   37077             :         },
   37078             :         {
   37079             :                 .name = discard_const_p(char, "in_level"),
   37080             :                 .get = py_netr_LogonControl_in_get_level,
   37081             :                 .set = py_netr_LogonControl_in_set_level,
   37082             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   37083             :         },
   37084             :         {
   37085             :                 .name = discard_const_p(char, "out_query"),
   37086             :                 .get = py_netr_LogonControl_out_get_query,
   37087             :                 .set = py_netr_LogonControl_out_set_query,
   37088             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   37089             :         },
   37090             :         {
   37091             :                 .name = discard_const_p(char, "result"),
   37092             :                 .get = py_netr_LogonControl_get_result,
   37093             :                 .set = py_netr_LogonControl_set_result,
   37094             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   37095             :         },
   37096             :         { .name = NULL }
   37097             : };
   37098             : 
   37099           0 : static PyObject *py_netr_LogonControl_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   37100             : {
   37101           0 :         PyObject *self = pytalloc_new(struct netr_LogonControl, type);
   37102           0 :         struct netr_LogonControl *_self = (struct netr_LogonControl *)pytalloc_get_ptr(self);
   37103           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   37104           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   37105           0 :         return self;
   37106             : }
   37107             : 
   37108           0 : static PyObject *py_netr_LogonControl_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   37109             : {
   37110             : 
   37111             : 
   37112           0 :         return PyLong_FromLong(12);
   37113             : }
   37114             : 
   37115           0 : static PyObject *py_netr_LogonControl_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   37116             : {
   37117           0 :         const struct ndr_interface_call *call = NULL;
   37118           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   37119           0 :         PyObject *ret = NULL;
   37120           0 :         struct ndr_push *push = NULL;
   37121           0 :         DATA_BLOB blob;
   37122           0 :         enum ndr_err_code err;
   37123             : 
   37124           0 :         if (ndr_table_netlogon.num_calls < 13) {
   37125           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_pack");
   37126           0 :                 return NULL;
   37127             :         }
   37128           0 :         call = &ndr_table_netlogon.calls[12];
   37129             : 
   37130           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37131           0 :         if (push == NULL) {
   37132           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37133           0 :                 return NULL;
   37134             :         }
   37135             : 
   37136           0 :         push->flags |= ndr_push_flags;
   37137             : 
   37138           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37139           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37140           0 :                 TALLOC_FREE(push);
   37141           0 :                 PyErr_SetNdrError(err);
   37142           0 :                 return NULL;
   37143             :         }
   37144           0 :         blob = ndr_push_blob(push);
   37145           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37146           0 :         TALLOC_FREE(push);
   37147           0 :         return ret;
   37148             : }
   37149             : 
   37150           0 : static PyObject *py_netr_LogonControl_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37151             : {
   37152           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37153           0 :         PyObject *bigendian_obj = NULL;
   37154           0 :         PyObject *ndr64_obj = NULL;
   37155           0 :         libndr_flags ndr_push_flags = 0;
   37156             : 
   37157           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37158             :                 discard_const_p(char *, kwnames),
   37159             :                 &bigendian_obj,
   37160             :                 &ndr64_obj)) {
   37161           0 :                 return NULL;
   37162             :         }
   37163             : 
   37164           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37165           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37166             :         }
   37167           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37168           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37169             :         }
   37170             : 
   37171           0 :         return py_netr_LogonControl_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37172             : }
   37173             : 
   37174           0 : static PyObject *py_netr_LogonControl_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37175             : {
   37176           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37177           0 :         PyObject *bigendian_obj = NULL;
   37178           0 :         PyObject *ndr64_obj = NULL;
   37179           0 :         libndr_flags ndr_push_flags = 0;
   37180             : 
   37181           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37182             :                 discard_const_p(char *, kwnames),
   37183             :                 &bigendian_obj,
   37184             :                 &ndr64_obj)) {
   37185           0 :                 return NULL;
   37186             :         }
   37187             : 
   37188           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37189           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37190             :         }
   37191           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37192           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37193             :         }
   37194             : 
   37195           0 :         return py_netr_LogonControl_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37196             : }
   37197             : 
   37198           0 : static PyObject *py_netr_LogonControl_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   37199             : {
   37200           0 :         const struct ndr_interface_call *call = NULL;
   37201           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   37202           0 :         struct ndr_pull *pull = NULL;
   37203           0 :         enum ndr_err_code err;
   37204             : 
   37205           0 :         if (ndr_table_netlogon.num_calls < 13) {
   37206           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_unpack");
   37207           0 :                 return NULL;
   37208             :         }
   37209           0 :         call = &ndr_table_netlogon.calls[12];
   37210             : 
   37211           0 :         pull = ndr_pull_init_blob(blob, object);
   37212           0 :         if (pull == NULL) {
   37213           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37214           0 :                 return NULL;
   37215             :         }
   37216             : 
   37217           0 :         pull->flags |= ndr_pull_flags;
   37218             : 
   37219           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37220           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37221           0 :                 TALLOC_FREE(pull);
   37222           0 :                 PyErr_SetNdrError(err);
   37223           0 :                 return NULL;
   37224             :         }
   37225           0 :         if (!allow_remaining) {
   37226           0 :                 uint32_t highest_ofs;
   37227             : 
   37228           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37229           0 :                         highest_ofs = pull->offset;
   37230             :                 } else {
   37231           0 :                         highest_ofs = pull->relative_highest_offset;
   37232             :                 }
   37233           0 :                 if (highest_ofs < pull->data_size) {
   37234           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37235             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37236             :                                 highest_ofs, pull->data_size);
   37237           0 :                         TALLOC_FREE(pull);
   37238           0 :                         PyErr_SetNdrError(err);
   37239           0 :                         return NULL;
   37240             :                 }
   37241             :         }
   37242             : 
   37243           0 :         TALLOC_FREE(pull);
   37244           0 :         Py_RETURN_NONE;
   37245             : }
   37246             : 
   37247           0 : static PyObject *py_netr_LogonControl_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37248             : {
   37249           0 :         DATA_BLOB blob;
   37250           0 :         Py_ssize_t blob_length = 0;
   37251           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37252           0 :         PyObject *bigendian_obj = NULL;
   37253           0 :         PyObject *ndr64_obj = NULL;
   37254           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37255           0 :         PyObject *allow_remaining_obj = NULL;
   37256           0 :         bool allow_remaining = false;
   37257             : 
   37258           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37259             :                 discard_const_p(char *, kwnames),
   37260             :                 &blob.data, &blob_length,
   37261             :                 &bigendian_obj,
   37262             :                 &ndr64_obj,
   37263             :                 &allow_remaining_obj)) {
   37264           0 :                 return NULL;
   37265             :         }
   37266           0 :         blob.length = blob_length;
   37267             : 
   37268           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37269           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37270             :         }
   37271           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37272           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37273             :         }
   37274             : 
   37275           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37276           0 :                 allow_remaining = true;
   37277             :         }
   37278             : 
   37279           0 :         return py_netr_LogonControl_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37280             : }
   37281             : 
   37282           0 : static PyObject *py_netr_LogonControl_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37283             : {
   37284           0 :         DATA_BLOB blob;
   37285           0 :         Py_ssize_t blob_length = 0;
   37286           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37287           0 :         PyObject *bigendian_obj = NULL;
   37288           0 :         PyObject *ndr64_obj = NULL;
   37289           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37290           0 :         PyObject *allow_remaining_obj = NULL;
   37291           0 :         bool allow_remaining = false;
   37292             : 
   37293           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37294             :                 discard_const_p(char *, kwnames),
   37295             :                 &blob.data, &blob_length,
   37296             :                 &bigendian_obj,
   37297             :                 &ndr64_obj,
   37298             :                 &allow_remaining_obj)) {
   37299           0 :                 return NULL;
   37300             :         }
   37301           0 :         blob.length = blob_length;
   37302             : 
   37303           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37304           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37305             :         }
   37306           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37307           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37308             :         }
   37309             : 
   37310           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37311           0 :                 allow_remaining = true;
   37312             :         }
   37313             : 
   37314           0 :         return py_netr_LogonControl_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37315             : }
   37316             : 
   37317           0 : static PyObject *py_netr_LogonControl_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   37318             : {
   37319           0 :         const struct ndr_interface_call *call = NULL;
   37320           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   37321           0 :         PyObject *ret;
   37322           0 :         char *retstr;
   37323             : 
   37324           0 :         if (ndr_table_netlogon.num_calls < 13) {
   37325           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_print");
   37326           0 :                 return NULL;
   37327             :         }
   37328           0 :         call = &ndr_table_netlogon.calls[12];
   37329             : 
   37330           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37331           0 :         ret = PyUnicode_FromString(retstr);
   37332           0 :         TALLOC_FREE(retstr);
   37333             : 
   37334           0 :         return ret;
   37335             : }
   37336             : 
   37337           0 : static PyObject *py_netr_LogonControl_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37338             : {
   37339           0 :         return py_netr_LogonControl_ndr_print(py_obj, "netr_LogonControl_in", NDR_IN);
   37340             : }
   37341             : 
   37342           0 : static PyObject *py_netr_LogonControl_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37343             : {
   37344           0 :         return py_netr_LogonControl_ndr_print(py_obj, "netr_LogonControl_out", NDR_OUT);
   37345             : }
   37346             : 
   37347             : static PyMethodDef py_netr_LogonControl_methods[] = {
   37348             :         { "opnum", (PyCFunction)py_netr_LogonControl_ndr_opnum, METH_NOARGS|METH_CLASS,
   37349             :                 "netlogon.netr_LogonControl.opnum() -> 12 (0x0c) " },
   37350             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37351             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37352             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37353             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37354             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37355             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37356             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37357             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37358             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonControl_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37359             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonControl_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37360             :         { NULL, NULL, 0, NULL }
   37361             : };
   37362             : 
   37363             : 
   37364             : static PyTypeObject netr_LogonControl_Type = {
   37365             :         PyVarObject_HEAD_INIT(NULL, 0)
   37366             :         .tp_name = "netlogon.netr_LogonControl",
   37367             :         .tp_getset = py_netr_LogonControl_getsetters,
   37368             :         .tp_methods = py_netr_LogonControl_methods,
   37369             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37370             :         .tp_new = py_netr_LogonControl_new,
   37371             : };
   37372             : 
   37373           0 : static bool pack_py_netr_LogonControl_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl *r)
   37374             : {
   37375           0 :         PyObject *py_logon_server;
   37376           0 :         PyObject *py_function_code;
   37377           0 :         PyObject *py_level;
   37378           0 :         const char *kwnames[] = {
   37379             :                 "logon_server", "function_code", "level", NULL
   37380             :         };
   37381             : 
   37382           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonControl", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level)) {
   37383           0 :                 return false;
   37384             :         }
   37385             : 
   37386           0 :         if (py_logon_server == NULL) {
   37387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   37388           0 :                 return false;
   37389             :         }
   37390           0 :         if (py_logon_server == Py_None) {
   37391           0 :                 r->in.logon_server = NULL;
   37392             :         } else {
   37393           0 :                 r->in.logon_server = NULL;
   37394             :                 {
   37395           0 :                         const char *test_str;
   37396           0 :                         const char *talloc_str;
   37397           0 :                         PyObject *unicode = NULL;
   37398           0 :                         if (PyUnicode_Check(py_logon_server)) {
   37399           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   37400           0 :                                 if (unicode == NULL) {
   37401           0 :                                         PyErr_NoMemory();
   37402           0 :                                         return false;
   37403             :                                 }
   37404           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37405           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   37406           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   37407             :                         } else {
   37408           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   37409           0 :                                 return false;
   37410             :                         }
   37411           0 :                         talloc_str = talloc_strdup(r, test_str);
   37412           0 :                         if (unicode != NULL) {
   37413           0 :                                 Py_DECREF(unicode);
   37414             :                         }
   37415           0 :                         if (talloc_str == NULL) {
   37416           0 :                                 PyErr_NoMemory();
   37417           0 :                                 return false;
   37418             :                         }
   37419           0 :                         r->in.logon_server = talloc_str;
   37420             :                 }
   37421             :         }
   37422           0 :         if (py_function_code == NULL) {
   37423           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.function_code");
   37424           0 :                 return false;
   37425             :         }
   37426             :         {
   37427           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   37428           0 :                 if (PyLong_Check(py_function_code)) {
   37429           0 :                         unsigned long long test_var;
   37430           0 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   37431           0 :                         if (PyErr_Occurred() != NULL) {
   37432           0 :                                 return false;
   37433             :                         }
   37434           0 :                         if (test_var > uint_max) {
   37435           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37436             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37437           0 :                                 return false;
   37438             :                         }
   37439           0 :                         r->in.function_code = test_var;
   37440             :                 } else {
   37441           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37442             :                           PyLong_Type.tp_name);
   37443           0 :                         return false;
   37444             :                 }
   37445             :         }
   37446           0 :         if (py_level == NULL) {
   37447           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   37448           0 :                 return false;
   37449             :         }
   37450             :         {
   37451           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   37452           0 :                 if (PyLong_Check(py_level)) {
   37453           0 :                         unsigned long long test_var;
   37454           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   37455           0 :                         if (PyErr_Occurred() != NULL) {
   37456           0 :                                 return false;
   37457             :                         }
   37458           0 :                         if (test_var > uint_max) {
   37459           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37460             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37461           0 :                                 return false;
   37462             :                         }
   37463           0 :                         r->in.level = test_var;
   37464             :                 } else {
   37465           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37466             :                           PyLong_Type.tp_name);
   37467           0 :                         return false;
   37468             :                 }
   37469             :         }
   37470           0 :         return true;
   37471             : }
   37472             : 
   37473           0 : static PyObject *unpack_py_netr_LogonControl_args_out(struct netr_LogonControl *r)
   37474             : {
   37475           0 :         PyObject *result;
   37476           0 :         PyObject *py_query;
   37477           0 :         py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, r->out.query, r->in.level, r->out.query, "union netr_CONTROL_QUERY_INFORMATION");
   37478           0 :         if (py_query == NULL) {
   37479           0 :                 return NULL;
   37480             :         }
   37481           0 :         result = py_query;
   37482           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   37483           0 :                 PyErr_SetWERROR(r->out.result);
   37484           0 :                 return NULL;
   37485             :         }
   37486             : 
   37487           0 :         return result;
   37488             : }
   37489             : 
   37490             : 
   37491           0 : static PyObject *py_netr_GetAnyDCName_in_get_logon_server(PyObject *obj, void *closure)
   37492             : {
   37493           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(obj);
   37494           0 :         PyObject *py_logon_server;
   37495           0 :         if (object->in.logon_server == NULL) {
   37496           0 :                 Py_RETURN_NONE;
   37497             :         }
   37498           0 :         if (object->in.logon_server == NULL) {
   37499           0 :                 py_logon_server = Py_None;
   37500           0 :                 Py_INCREF(py_logon_server);
   37501             :         } else {
   37502           0 :                 if (object->in.logon_server == NULL) {
   37503           0 :                         py_logon_server = Py_None;
   37504           0 :                         Py_INCREF(py_logon_server);
   37505             :                 } else {
   37506           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   37507             :                 }
   37508             :         }
   37509           0 :         return py_logon_server;
   37510             : }
   37511             : 
   37512           0 : static int py_netr_GetAnyDCName_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   37513             : {
   37514           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37515           0 :         if (value == NULL) {
   37516           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   37517           0 :                 return -1;
   37518             :         }
   37519           0 :         if (value == Py_None) {
   37520           0 :                 object->in.logon_server = NULL;
   37521             :         } else {
   37522           0 :                 object->in.logon_server = NULL;
   37523             :                 {
   37524           0 :                         const char *test_str;
   37525           0 :                         const char *talloc_str;
   37526           0 :                         PyObject *unicode = NULL;
   37527           0 :                         if (PyUnicode_Check(value)) {
   37528           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37529           0 :                                 if (unicode == NULL) {
   37530           0 :                                         PyErr_NoMemory();
   37531           0 :                                         return -1;
   37532             :                                 }
   37533           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37534           0 :                         } else if (PyBytes_Check(value)) {
   37535           0 :                                 test_str = PyBytes_AS_STRING(value);
   37536             :                         } else {
   37537           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37538           0 :                                 return -1;
   37539             :                         }
   37540           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37541           0 :                         if (unicode != NULL) {
   37542           0 :                                 Py_DECREF(unicode);
   37543             :                         }
   37544           0 :                         if (talloc_str == NULL) {
   37545           0 :                                 PyErr_NoMemory();
   37546           0 :                                 return -1;
   37547             :                         }
   37548           0 :                         object->in.logon_server = talloc_str;
   37549             :                 }
   37550             :         }
   37551           0 :         return 0;
   37552             : }
   37553             : 
   37554           0 : static PyObject *py_netr_GetAnyDCName_in_get_domainname(PyObject *obj, void *closure)
   37555             : {
   37556           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(obj);
   37557           0 :         PyObject *py_domainname;
   37558           0 :         if (object->in.domainname == NULL) {
   37559           0 :                 Py_RETURN_NONE;
   37560             :         }
   37561           0 :         if (object->in.domainname == NULL) {
   37562           0 :                 py_domainname = Py_None;
   37563           0 :                 Py_INCREF(py_domainname);
   37564             :         } else {
   37565           0 :                 if (object->in.domainname == NULL) {
   37566           0 :                         py_domainname = Py_None;
   37567           0 :                         Py_INCREF(py_domainname);
   37568             :                 } else {
   37569           0 :                         py_domainname = PyUnicode_Decode(object->in.domainname, strlen(object->in.domainname), "utf-8", "ignore");
   37570             :                 }
   37571             :         }
   37572           0 :         return py_domainname;
   37573             : }
   37574             : 
   37575           0 : static int py_netr_GetAnyDCName_in_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
   37576             : {
   37577           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37578           0 :         if (value == NULL) {
   37579           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domainname");
   37580           0 :                 return -1;
   37581             :         }
   37582           0 :         if (value == Py_None) {
   37583           0 :                 object->in.domainname = NULL;
   37584             :         } else {
   37585           0 :                 object->in.domainname = NULL;
   37586             :                 {
   37587           0 :                         const char *test_str;
   37588           0 :                         const char *talloc_str;
   37589           0 :                         PyObject *unicode = NULL;
   37590           0 :                         if (PyUnicode_Check(value)) {
   37591           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37592           0 :                                 if (unicode == NULL) {
   37593           0 :                                         PyErr_NoMemory();
   37594           0 :                                         return -1;
   37595             :                                 }
   37596           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37597           0 :                         } else if (PyBytes_Check(value)) {
   37598           0 :                                 test_str = PyBytes_AS_STRING(value);
   37599             :                         } else {
   37600           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37601           0 :                                 return -1;
   37602             :                         }
   37603           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37604           0 :                         if (unicode != NULL) {
   37605           0 :                                 Py_DECREF(unicode);
   37606             :                         }
   37607           0 :                         if (talloc_str == NULL) {
   37608           0 :                                 PyErr_NoMemory();
   37609           0 :                                 return -1;
   37610             :                         }
   37611           0 :                         object->in.domainname = talloc_str;
   37612             :                 }
   37613             :         }
   37614           0 :         return 0;
   37615             : }
   37616             : 
   37617           0 : static PyObject *py_netr_GetAnyDCName_out_get_dcname(PyObject *obj, void *closure)
   37618             : {
   37619           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(obj);
   37620           0 :         PyObject *py_dcname;
   37621           0 :         if (object->out.dcname == NULL) {
   37622           0 :                 Py_RETURN_NONE;
   37623             :         }
   37624           0 :         if (*object->out.dcname == NULL) {
   37625           0 :                 py_dcname = Py_None;
   37626           0 :                 Py_INCREF(py_dcname);
   37627             :         } else {
   37628           0 :                 if (*object->out.dcname == NULL) {
   37629           0 :                         py_dcname = Py_None;
   37630           0 :                         Py_INCREF(py_dcname);
   37631             :                 } else {
   37632           0 :                         py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
   37633             :                 }
   37634             :         }
   37635           0 :         return py_dcname;
   37636             : }
   37637             : 
   37638           0 : static int py_netr_GetAnyDCName_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   37639             : {
   37640           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37641           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
   37642           0 :         if (value == NULL) {
   37643           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dcname");
   37644           0 :                 return -1;
   37645             :         }
   37646           0 :         object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
   37647           0 :         if (object->out.dcname == NULL) {
   37648           0 :                 PyErr_NoMemory();
   37649           0 :                 return -1;
   37650             :         }
   37651           0 :         if (value == Py_None) {
   37652           0 :                 *object->out.dcname = NULL;
   37653             :         } else {
   37654           0 :                 *object->out.dcname = NULL;
   37655             :                 {
   37656           0 :                         const char *test_str;
   37657           0 :                         const char *talloc_str;
   37658           0 :                         PyObject *unicode = NULL;
   37659           0 :                         if (PyUnicode_Check(value)) {
   37660           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37661           0 :                                 if (unicode == NULL) {
   37662           0 :                                         PyErr_NoMemory();
   37663           0 :                                         return -1;
   37664             :                                 }
   37665           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37666           0 :                         } else if (PyBytes_Check(value)) {
   37667           0 :                                 test_str = PyBytes_AS_STRING(value);
   37668             :                         } else {
   37669           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37670           0 :                                 return -1;
   37671             :                         }
   37672           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37673           0 :                         if (unicode != NULL) {
   37674           0 :                                 Py_DECREF(unicode);
   37675             :                         }
   37676           0 :                         if (talloc_str == NULL) {
   37677           0 :                                 PyErr_NoMemory();
   37678           0 :                                 return -1;
   37679             :                         }
   37680           0 :                         *object->out.dcname = talloc_str;
   37681             :                 }
   37682             :         }
   37683           0 :         return 0;
   37684             : }
   37685             : 
   37686           0 : static PyObject *py_netr_GetAnyDCName_get_result(PyObject *obj, void *closure)
   37687             : {
   37688           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(obj);
   37689           0 :         PyObject *py_result;
   37690           0 :         py_result = PyErr_FromWERROR(object->out.result);
   37691           0 :         return py_result;
   37692             : }
   37693             : 
   37694           0 : static int py_netr_GetAnyDCName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   37695             : {
   37696           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37697           0 :         if (value == NULL) {
   37698           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   37699           0 :                 return -1;
   37700             :         }
   37701           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   37702           0 :         return 0;
   37703             : }
   37704             : 
   37705             : static PyGetSetDef py_netr_GetAnyDCName_getsetters[] = {
   37706             :         {
   37707             :                 .name = discard_const_p(char, "in_logon_server"),
   37708             :                 .get = py_netr_GetAnyDCName_in_get_logon_server,
   37709             :                 .set = py_netr_GetAnyDCName_in_set_logon_server,
   37710             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37711             :         },
   37712             :         {
   37713             :                 .name = discard_const_p(char, "in_domainname"),
   37714             :                 .get = py_netr_GetAnyDCName_in_get_domainname,
   37715             :                 .set = py_netr_GetAnyDCName_in_set_domainname,
   37716             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37717             :         },
   37718             :         {
   37719             :                 .name = discard_const_p(char, "out_dcname"),
   37720             :                 .get = py_netr_GetAnyDCName_out_get_dcname,
   37721             :                 .set = py_netr_GetAnyDCName_out_set_dcname,
   37722             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37723             :         },
   37724             :         {
   37725             :                 .name = discard_const_p(char, "result"),
   37726             :                 .get = py_netr_GetAnyDCName_get_result,
   37727             :                 .set = py_netr_GetAnyDCName_set_result,
   37728             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   37729             :         },
   37730             :         { .name = NULL }
   37731             : };
   37732             : 
   37733           0 : static PyObject *py_netr_GetAnyDCName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   37734             : {
   37735           0 :         PyObject *self = pytalloc_new(struct netr_GetAnyDCName, type);
   37736           0 :         return self;
   37737             : }
   37738             : 
   37739           0 : static PyObject *py_netr_GetAnyDCName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   37740             : {
   37741             : 
   37742             : 
   37743           0 :         return PyLong_FromLong(13);
   37744             : }
   37745             : 
   37746           0 : static PyObject *py_netr_GetAnyDCName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   37747             : {
   37748           0 :         const struct ndr_interface_call *call = NULL;
   37749           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37750           0 :         PyObject *ret = NULL;
   37751           0 :         struct ndr_push *push = NULL;
   37752           0 :         DATA_BLOB blob;
   37753           0 :         enum ndr_err_code err;
   37754             : 
   37755           0 :         if (ndr_table_netlogon.num_calls < 14) {
   37756           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_pack");
   37757           0 :                 return NULL;
   37758             :         }
   37759           0 :         call = &ndr_table_netlogon.calls[13];
   37760             : 
   37761           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37762           0 :         if (push == NULL) {
   37763           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37764           0 :                 return NULL;
   37765             :         }
   37766             : 
   37767           0 :         push->flags |= ndr_push_flags;
   37768             : 
   37769           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37770           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37771           0 :                 TALLOC_FREE(push);
   37772           0 :                 PyErr_SetNdrError(err);
   37773           0 :                 return NULL;
   37774             :         }
   37775           0 :         blob = ndr_push_blob(push);
   37776           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37777           0 :         TALLOC_FREE(push);
   37778           0 :         return ret;
   37779             : }
   37780             : 
   37781           0 : static PyObject *py_netr_GetAnyDCName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37782             : {
   37783           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37784           0 :         PyObject *bigendian_obj = NULL;
   37785           0 :         PyObject *ndr64_obj = NULL;
   37786           0 :         libndr_flags ndr_push_flags = 0;
   37787             : 
   37788           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37789             :                 discard_const_p(char *, kwnames),
   37790             :                 &bigendian_obj,
   37791             :                 &ndr64_obj)) {
   37792           0 :                 return NULL;
   37793             :         }
   37794             : 
   37795           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37796           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37797             :         }
   37798           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37799           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37800             :         }
   37801             : 
   37802           0 :         return py_netr_GetAnyDCName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37803             : }
   37804             : 
   37805           0 : static PyObject *py_netr_GetAnyDCName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37806             : {
   37807           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37808           0 :         PyObject *bigendian_obj = NULL;
   37809           0 :         PyObject *ndr64_obj = NULL;
   37810           0 :         libndr_flags ndr_push_flags = 0;
   37811             : 
   37812           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37813             :                 discard_const_p(char *, kwnames),
   37814             :                 &bigendian_obj,
   37815             :                 &ndr64_obj)) {
   37816           0 :                 return NULL;
   37817             :         }
   37818             : 
   37819           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37820           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37821             :         }
   37822           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37823           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37824             :         }
   37825             : 
   37826           0 :         return py_netr_GetAnyDCName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37827             : }
   37828             : 
   37829           0 : static PyObject *py_netr_GetAnyDCName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   37830             : {
   37831           0 :         const struct ndr_interface_call *call = NULL;
   37832           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37833           0 :         struct ndr_pull *pull = NULL;
   37834           0 :         enum ndr_err_code err;
   37835             : 
   37836           0 :         if (ndr_table_netlogon.num_calls < 14) {
   37837           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_unpack");
   37838           0 :                 return NULL;
   37839             :         }
   37840           0 :         call = &ndr_table_netlogon.calls[13];
   37841             : 
   37842           0 :         pull = ndr_pull_init_blob(blob, object);
   37843           0 :         if (pull == NULL) {
   37844           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37845           0 :                 return NULL;
   37846             :         }
   37847             : 
   37848           0 :         pull->flags |= ndr_pull_flags;
   37849             : 
   37850           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37851           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37852           0 :                 TALLOC_FREE(pull);
   37853           0 :                 PyErr_SetNdrError(err);
   37854           0 :                 return NULL;
   37855             :         }
   37856           0 :         if (!allow_remaining) {
   37857           0 :                 uint32_t highest_ofs;
   37858             : 
   37859           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37860           0 :                         highest_ofs = pull->offset;
   37861             :                 } else {
   37862           0 :                         highest_ofs = pull->relative_highest_offset;
   37863             :                 }
   37864           0 :                 if (highest_ofs < pull->data_size) {
   37865           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37866             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37867             :                                 highest_ofs, pull->data_size);
   37868           0 :                         TALLOC_FREE(pull);
   37869           0 :                         PyErr_SetNdrError(err);
   37870           0 :                         return NULL;
   37871             :                 }
   37872             :         }
   37873             : 
   37874           0 :         TALLOC_FREE(pull);
   37875           0 :         Py_RETURN_NONE;
   37876             : }
   37877             : 
   37878           0 : static PyObject *py_netr_GetAnyDCName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37879             : {
   37880           0 :         DATA_BLOB blob;
   37881           0 :         Py_ssize_t blob_length = 0;
   37882           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37883           0 :         PyObject *bigendian_obj = NULL;
   37884           0 :         PyObject *ndr64_obj = NULL;
   37885           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37886           0 :         PyObject *allow_remaining_obj = NULL;
   37887           0 :         bool allow_remaining = false;
   37888             : 
   37889           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37890             :                 discard_const_p(char *, kwnames),
   37891             :                 &blob.data, &blob_length,
   37892             :                 &bigendian_obj,
   37893             :                 &ndr64_obj,
   37894             :                 &allow_remaining_obj)) {
   37895           0 :                 return NULL;
   37896             :         }
   37897           0 :         blob.length = blob_length;
   37898             : 
   37899           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37900           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37901             :         }
   37902           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37903           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37904             :         }
   37905             : 
   37906           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37907           0 :                 allow_remaining = true;
   37908             :         }
   37909             : 
   37910           0 :         return py_netr_GetAnyDCName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37911             : }
   37912             : 
   37913           0 : static PyObject *py_netr_GetAnyDCName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37914             : {
   37915           0 :         DATA_BLOB blob;
   37916           0 :         Py_ssize_t blob_length = 0;
   37917           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37918           0 :         PyObject *bigendian_obj = NULL;
   37919           0 :         PyObject *ndr64_obj = NULL;
   37920           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37921           0 :         PyObject *allow_remaining_obj = NULL;
   37922           0 :         bool allow_remaining = false;
   37923             : 
   37924           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37925             :                 discard_const_p(char *, kwnames),
   37926             :                 &blob.data, &blob_length,
   37927             :                 &bigendian_obj,
   37928             :                 &ndr64_obj,
   37929             :                 &allow_remaining_obj)) {
   37930           0 :                 return NULL;
   37931             :         }
   37932           0 :         blob.length = blob_length;
   37933             : 
   37934           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37935           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37936             :         }
   37937           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37938           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37939             :         }
   37940             : 
   37941           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37942           0 :                 allow_remaining = true;
   37943             :         }
   37944             : 
   37945           0 :         return py_netr_GetAnyDCName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37946             : }
   37947             : 
   37948           0 : static PyObject *py_netr_GetAnyDCName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   37949             : {
   37950           0 :         const struct ndr_interface_call *call = NULL;
   37951           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37952           0 :         PyObject *ret;
   37953           0 :         char *retstr;
   37954             : 
   37955           0 :         if (ndr_table_netlogon.num_calls < 14) {
   37956           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_print");
   37957           0 :                 return NULL;
   37958             :         }
   37959           0 :         call = &ndr_table_netlogon.calls[13];
   37960             : 
   37961           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37962           0 :         ret = PyUnicode_FromString(retstr);
   37963           0 :         TALLOC_FREE(retstr);
   37964             : 
   37965           0 :         return ret;
   37966             : }
   37967             : 
   37968           0 : static PyObject *py_netr_GetAnyDCName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37969             : {
   37970           0 :         return py_netr_GetAnyDCName_ndr_print(py_obj, "netr_GetAnyDCName_in", NDR_IN);
   37971             : }
   37972             : 
   37973           0 : static PyObject *py_netr_GetAnyDCName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37974             : {
   37975           0 :         return py_netr_GetAnyDCName_ndr_print(py_obj, "netr_GetAnyDCName_out", NDR_OUT);
   37976             : }
   37977             : 
   37978             : static PyMethodDef py_netr_GetAnyDCName_methods[] = {
   37979             :         { "opnum", (PyCFunction)py_netr_GetAnyDCName_ndr_opnum, METH_NOARGS|METH_CLASS,
   37980             :                 "netlogon.netr_GetAnyDCName.opnum() -> 13 (0x0d) " },
   37981             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37982             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37983             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37984             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37985             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37986             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37987             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37988             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37989             :         { "__ndr_print_in__", (PyCFunction)py_netr_GetAnyDCName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37990             :         { "__ndr_print_out__", (PyCFunction)py_netr_GetAnyDCName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37991             :         { NULL, NULL, 0, NULL }
   37992             : };
   37993             : 
   37994             : 
   37995             : static PyTypeObject netr_GetAnyDCName_Type = {
   37996             :         PyVarObject_HEAD_INIT(NULL, 0)
   37997             :         .tp_name = "netlogon.netr_GetAnyDCName",
   37998             :         .tp_getset = py_netr_GetAnyDCName_getsetters,
   37999             :         .tp_methods = py_netr_GetAnyDCName_methods,
   38000             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   38001             :         .tp_new = py_netr_GetAnyDCName_new,
   38002             : };
   38003             : 
   38004           0 : static bool pack_py_netr_GetAnyDCName_args_in(PyObject *args, PyObject *kwargs, struct netr_GetAnyDCName *r)
   38005             : {
   38006           0 :         PyObject *py_logon_server;
   38007           0 :         PyObject *py_domainname;
   38008           0 :         const char *kwnames[] = {
   38009             :                 "logon_server", "domainname", NULL
   38010             :         };
   38011             : 
   38012           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_GetAnyDCName", discard_const_p(char *, kwnames), &py_logon_server, &py_domainname)) {
   38013           0 :                 return false;
   38014             :         }
   38015             : 
   38016           0 :         if (py_logon_server == NULL) {
   38017           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   38018           0 :                 return false;
   38019             :         }
   38020           0 :         if (py_logon_server == Py_None) {
   38021           0 :                 r->in.logon_server = NULL;
   38022             :         } else {
   38023           0 :                 r->in.logon_server = NULL;
   38024             :                 {
   38025           0 :                         const char *test_str;
   38026           0 :                         const char *talloc_str;
   38027           0 :                         PyObject *unicode = NULL;
   38028           0 :                         if (PyUnicode_Check(py_logon_server)) {
   38029           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   38030           0 :                                 if (unicode == NULL) {
   38031           0 :                                         PyErr_NoMemory();
   38032           0 :                                         return false;
   38033             :                                 }
   38034           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38035           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   38036           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   38037             :                         } else {
   38038           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   38039           0 :                                 return false;
   38040             :                         }
   38041           0 :                         talloc_str = talloc_strdup(r, test_str);
   38042           0 :                         if (unicode != NULL) {
   38043           0 :                                 Py_DECREF(unicode);
   38044             :                         }
   38045           0 :                         if (talloc_str == NULL) {
   38046           0 :                                 PyErr_NoMemory();
   38047           0 :                                 return false;
   38048             :                         }
   38049           0 :                         r->in.logon_server = talloc_str;
   38050             :                 }
   38051             :         }
   38052           0 :         if (py_domainname == NULL) {
   38053           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domainname");
   38054           0 :                 return false;
   38055             :         }
   38056           0 :         if (py_domainname == Py_None) {
   38057           0 :                 r->in.domainname = NULL;
   38058             :         } else {
   38059           0 :                 r->in.domainname = NULL;
   38060             :                 {
   38061           0 :                         const char *test_str;
   38062           0 :                         const char *talloc_str;
   38063           0 :                         PyObject *unicode = NULL;
   38064           0 :                         if (PyUnicode_Check(py_domainname)) {
   38065           0 :                                 unicode = PyUnicode_AsEncodedString(py_domainname, "utf-8", "ignore");
   38066           0 :                                 if (unicode == NULL) {
   38067           0 :                                         PyErr_NoMemory();
   38068           0 :                                         return false;
   38069             :                                 }
   38070           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38071           0 :                         } else if (PyBytes_Check(py_domainname)) {
   38072           0 :                                 test_str = PyBytes_AS_STRING(py_domainname);
   38073             :                         } else {
   38074           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domainname)->tp_name);
   38075           0 :                                 return false;
   38076             :                         }
   38077           0 :                         talloc_str = talloc_strdup(r, test_str);
   38078           0 :                         if (unicode != NULL) {
   38079           0 :                                 Py_DECREF(unicode);
   38080             :                         }
   38081           0 :                         if (talloc_str == NULL) {
   38082           0 :                                 PyErr_NoMemory();
   38083           0 :                                 return false;
   38084             :                         }
   38085           0 :                         r->in.domainname = talloc_str;
   38086             :                 }
   38087             :         }
   38088           0 :         return true;
   38089             : }
   38090             : 
   38091           0 : static PyObject *unpack_py_netr_GetAnyDCName_args_out(struct netr_GetAnyDCName *r)
   38092             : {
   38093           0 :         PyObject *result;
   38094           0 :         PyObject *py_dcname;
   38095           0 :         if (*r->out.dcname == NULL) {
   38096           0 :                 py_dcname = Py_None;
   38097           0 :                 Py_INCREF(py_dcname);
   38098             :         } else {
   38099           0 :                 if (*r->out.dcname == NULL) {
   38100           0 :                         py_dcname = Py_None;
   38101           0 :                         Py_INCREF(py_dcname);
   38102             :                 } else {
   38103           0 :                         py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
   38104             :                 }
   38105             :         }
   38106           0 :         result = py_dcname;
   38107           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   38108           0 :                 PyErr_SetWERROR(r->out.result);
   38109           0 :                 return NULL;
   38110             :         }
   38111             : 
   38112           0 :         return result;
   38113             : }
   38114             : 
   38115             : 
   38116           0 : static PyObject *py_netr_LogonControl2_in_get_logon_server(PyObject *obj, void *closure)
   38117             : {
   38118           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   38119           0 :         PyObject *py_logon_server;
   38120           0 :         if (object->in.logon_server == NULL) {
   38121           0 :                 Py_RETURN_NONE;
   38122             :         }
   38123           0 :         if (object->in.logon_server == NULL) {
   38124           0 :                 py_logon_server = Py_None;
   38125           0 :                 Py_INCREF(py_logon_server);
   38126             :         } else {
   38127           0 :                 if (object->in.logon_server == NULL) {
   38128           0 :                         py_logon_server = Py_None;
   38129           0 :                         Py_INCREF(py_logon_server);
   38130             :                 } else {
   38131           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   38132             :                 }
   38133             :         }
   38134           0 :         return py_logon_server;
   38135             : }
   38136             : 
   38137           0 : static int py_netr_LogonControl2_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   38138             : {
   38139           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38140           0 :         if (value == NULL) {
   38141           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   38142           0 :                 return -1;
   38143             :         }
   38144           0 :         if (value == Py_None) {
   38145           0 :                 object->in.logon_server = NULL;
   38146             :         } else {
   38147           0 :                 object->in.logon_server = NULL;
   38148             :                 {
   38149           0 :                         const char *test_str;
   38150           0 :                         const char *talloc_str;
   38151           0 :                         PyObject *unicode = NULL;
   38152           0 :                         if (PyUnicode_Check(value)) {
   38153           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38154           0 :                                 if (unicode == NULL) {
   38155           0 :                                         PyErr_NoMemory();
   38156           0 :                                         return -1;
   38157             :                                 }
   38158           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38159           0 :                         } else if (PyBytes_Check(value)) {
   38160           0 :                                 test_str = PyBytes_AS_STRING(value);
   38161             :                         } else {
   38162           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38163           0 :                                 return -1;
   38164             :                         }
   38165           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38166           0 :                         if (unicode != NULL) {
   38167           0 :                                 Py_DECREF(unicode);
   38168             :                         }
   38169           0 :                         if (talloc_str == NULL) {
   38170           0 :                                 PyErr_NoMemory();
   38171           0 :                                 return -1;
   38172             :                         }
   38173           0 :                         object->in.logon_server = talloc_str;
   38174             :                 }
   38175             :         }
   38176           0 :         return 0;
   38177             : }
   38178             : 
   38179           0 : static PyObject *py_netr_LogonControl2_in_get_function_code(PyObject *obj, void *closure)
   38180             : {
   38181           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   38182           0 :         PyObject *py_function_code;
   38183           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)object->in.function_code);
   38184           0 :         return py_function_code;
   38185             : }
   38186             : 
   38187           0 : static int py_netr_LogonControl2_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   38188             : {
   38189           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38190           0 :         if (value == NULL) {
   38191           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.function_code");
   38192           0 :                 return -1;
   38193             :         }
   38194             :         {
   38195           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   38196           0 :                 if (PyLong_Check(value)) {
   38197           0 :                         unsigned long long test_var;
   38198           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38199           0 :                         if (PyErr_Occurred() != NULL) {
   38200           0 :                                 return -1;
   38201             :                         }
   38202           0 :                         if (test_var > uint_max) {
   38203           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38204             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38205           0 :                                 return -1;
   38206             :                         }
   38207           0 :                         object->in.function_code = test_var;
   38208             :                 } else {
   38209           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38210             :                           PyLong_Type.tp_name);
   38211           0 :                         return -1;
   38212             :                 }
   38213             :         }
   38214           0 :         return 0;
   38215             : }
   38216             : 
   38217           0 : static PyObject *py_netr_LogonControl2_in_get_level(PyObject *obj, void *closure)
   38218             : {
   38219           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   38220           0 :         PyObject *py_level;
   38221           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   38222           0 :         return py_level;
   38223             : }
   38224             : 
   38225           0 : static int py_netr_LogonControl2_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   38226             : {
   38227           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38228           0 :         if (value == NULL) {
   38229           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   38230           0 :                 return -1;
   38231             :         }
   38232             :         {
   38233           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   38234           0 :                 if (PyLong_Check(value)) {
   38235           0 :                         unsigned long long test_var;
   38236           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38237           0 :                         if (PyErr_Occurred() != NULL) {
   38238           0 :                                 return -1;
   38239             :                         }
   38240           0 :                         if (test_var > uint_max) {
   38241           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38242             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38243           0 :                                 return -1;
   38244             :                         }
   38245           0 :                         object->in.level = test_var;
   38246             :                 } else {
   38247           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38248             :                           PyLong_Type.tp_name);
   38249           0 :                         return -1;
   38250             :                 }
   38251             :         }
   38252           0 :         return 0;
   38253             : }
   38254             : 
   38255           0 : static PyObject *py_netr_LogonControl2_in_get_data(PyObject *obj, void *closure)
   38256             : {
   38257           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   38258           0 :         PyObject *py_data;
   38259           0 :         if (object->in.data == NULL) {
   38260           0 :                 Py_RETURN_NONE;
   38261             :         }
   38262           0 :         py_data = pyrpc_import_union(&netr_CONTROL_DATA_INFORMATION_Type, object->in.data, object->in.function_code, object->in.data, "union netr_CONTROL_DATA_INFORMATION");
   38263           0 :         if (py_data == NULL) {
   38264           0 :                 return NULL;
   38265             :         }
   38266           0 :         return py_data;
   38267             : }
   38268             : 
   38269           0 : static int py_netr_LogonControl2_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
   38270             : {
   38271           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38272           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
   38273           0 :         if (value == NULL) {
   38274           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.data");
   38275           0 :                 return -1;
   38276             :         }
   38277           0 :         object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
   38278           0 :         if (object->in.data == NULL) {
   38279           0 :                 PyErr_NoMemory();
   38280           0 :                 return -1;
   38281             :         }
   38282             :         {
   38283           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   38284           0 :                 data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(&netr_CONTROL_DATA_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.function_code, value, "union netr_CONTROL_DATA_INFORMATION");
   38285           0 :                 if (data_switch_1 == NULL) {
   38286           0 :                         return -1;
   38287             :                 }
   38288           0 :                 object->in.data = data_switch_1;
   38289             :         }
   38290           0 :         return 0;
   38291             : }
   38292             : 
   38293           0 : static PyObject *py_netr_LogonControl2_out_get_query(PyObject *obj, void *closure)
   38294             : {
   38295           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   38296           0 :         PyObject *py_query;
   38297           0 :         if (object->out.query == NULL) {
   38298           0 :                 Py_RETURN_NONE;
   38299             :         }
   38300           0 :         py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, object->out.query, object->in.level, object->out.query, "union netr_CONTROL_QUERY_INFORMATION");
   38301           0 :         if (py_query == NULL) {
   38302           0 :                 return NULL;
   38303             :         }
   38304           0 :         return py_query;
   38305             : }
   38306             : 
   38307           0 : static int py_netr_LogonControl2_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   38308             : {
   38309           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38310           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   38311           0 :         if (value == NULL) {
   38312           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.query");
   38313           0 :                 return -1;
   38314             :         }
   38315           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   38316           0 :         if (object->out.query == NULL) {
   38317           0 :                 PyErr_NoMemory();
   38318           0 :                 return -1;
   38319             :         }
   38320             :         {
   38321           0 :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   38322           0 :                 query_switch_1 = (union netr_CONTROL_QUERY_INFORMATION *)pyrpc_export_union(&netr_CONTROL_QUERY_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_CONTROL_QUERY_INFORMATION");
   38323           0 :                 if (query_switch_1 == NULL) {
   38324           0 :                         return -1;
   38325             :                 }
   38326           0 :                 object->out.query = query_switch_1;
   38327             :         }
   38328           0 :         return 0;
   38329             : }
   38330             : 
   38331           0 : static PyObject *py_netr_LogonControl2_get_result(PyObject *obj, void *closure)
   38332             : {
   38333           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   38334           0 :         PyObject *py_result;
   38335           0 :         py_result = PyErr_FromWERROR(object->out.result);
   38336           0 :         return py_result;
   38337             : }
   38338             : 
   38339           0 : static int py_netr_LogonControl2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   38340             : {
   38341           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38342           0 :         if (value == NULL) {
   38343           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   38344           0 :                 return -1;
   38345             :         }
   38346           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   38347           0 :         return 0;
   38348             : }
   38349             : 
   38350             : static PyGetSetDef py_netr_LogonControl2_getsetters[] = {
   38351             :         {
   38352             :                 .name = discard_const_p(char, "in_logon_server"),
   38353             :                 .get = py_netr_LogonControl2_in_get_logon_server,
   38354             :                 .set = py_netr_LogonControl2_in_set_logon_server,
   38355             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38356             :         },
   38357             :         {
   38358             :                 .name = discard_const_p(char, "in_function_code"),
   38359             :                 .get = py_netr_LogonControl2_in_get_function_code,
   38360             :                 .set = py_netr_LogonControl2_in_set_function_code,
   38361             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   38362             :         },
   38363             :         {
   38364             :                 .name = discard_const_p(char, "in_level"),
   38365             :                 .get = py_netr_LogonControl2_in_get_level,
   38366             :                 .set = py_netr_LogonControl2_in_set_level,
   38367             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   38368             :         },
   38369             :         {
   38370             :                 .name = discard_const_p(char, "in_data"),
   38371             :                 .get = py_netr_LogonControl2_in_get_data,
   38372             :                 .set = py_netr_LogonControl2_in_set_data,
   38373             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
   38374             :         },
   38375             :         {
   38376             :                 .name = discard_const_p(char, "out_query"),
   38377             :                 .get = py_netr_LogonControl2_out_get_query,
   38378             :                 .set = py_netr_LogonControl2_out_set_query,
   38379             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   38380             :         },
   38381             :         {
   38382             :                 .name = discard_const_p(char, "result"),
   38383             :                 .get = py_netr_LogonControl2_get_result,
   38384             :                 .set = py_netr_LogonControl2_set_result,
   38385             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   38386             :         },
   38387             :         { .name = NULL }
   38388             : };
   38389             : 
   38390           0 : static PyObject *py_netr_LogonControl2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   38391             : {
   38392           0 :         PyObject *self = pytalloc_new(struct netr_LogonControl2, type);
   38393           0 :         struct netr_LogonControl2 *_self = (struct netr_LogonControl2 *)pytalloc_get_ptr(self);
   38394           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   38395           0 :         _self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   38396           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   38397           0 :         return self;
   38398             : }
   38399             : 
   38400           0 : static PyObject *py_netr_LogonControl2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   38401             : {
   38402             : 
   38403             : 
   38404           0 :         return PyLong_FromLong(14);
   38405             : }
   38406             : 
   38407           0 : static PyObject *py_netr_LogonControl2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   38408             : {
   38409           0 :         const struct ndr_interface_call *call = NULL;
   38410           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38411           0 :         PyObject *ret = NULL;
   38412           0 :         struct ndr_push *push = NULL;
   38413           0 :         DATA_BLOB blob;
   38414           0 :         enum ndr_err_code err;
   38415             : 
   38416           0 :         if (ndr_table_netlogon.num_calls < 15) {
   38417           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_pack");
   38418           0 :                 return NULL;
   38419             :         }
   38420           0 :         call = &ndr_table_netlogon.calls[14];
   38421             : 
   38422           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   38423           0 :         if (push == NULL) {
   38424           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38425           0 :                 return NULL;
   38426             :         }
   38427             : 
   38428           0 :         push->flags |= ndr_push_flags;
   38429             : 
   38430           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   38431           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38432           0 :                 TALLOC_FREE(push);
   38433           0 :                 PyErr_SetNdrError(err);
   38434           0 :                 return NULL;
   38435             :         }
   38436           0 :         blob = ndr_push_blob(push);
   38437           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   38438           0 :         TALLOC_FREE(push);
   38439           0 :         return ret;
   38440             : }
   38441             : 
   38442           0 : static PyObject *py_netr_LogonControl2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38443             : {
   38444           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38445           0 :         PyObject *bigendian_obj = NULL;
   38446           0 :         PyObject *ndr64_obj = NULL;
   38447           0 :         libndr_flags ndr_push_flags = 0;
   38448             : 
   38449           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   38450             :                 discard_const_p(char *, kwnames),
   38451             :                 &bigendian_obj,
   38452             :                 &ndr64_obj)) {
   38453           0 :                 return NULL;
   38454             :         }
   38455             : 
   38456           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38457           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38458             :         }
   38459           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38460           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38461             :         }
   38462             : 
   38463           0 :         return py_netr_LogonControl2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   38464             : }
   38465             : 
   38466           0 : static PyObject *py_netr_LogonControl2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38467             : {
   38468           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38469           0 :         PyObject *bigendian_obj = NULL;
   38470           0 :         PyObject *ndr64_obj = NULL;
   38471           0 :         libndr_flags ndr_push_flags = 0;
   38472             : 
   38473           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   38474             :                 discard_const_p(char *, kwnames),
   38475             :                 &bigendian_obj,
   38476             :                 &ndr64_obj)) {
   38477           0 :                 return NULL;
   38478             :         }
   38479             : 
   38480           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38481           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38482             :         }
   38483           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38484           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38485             :         }
   38486             : 
   38487           0 :         return py_netr_LogonControl2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   38488             : }
   38489             : 
   38490           0 : static PyObject *py_netr_LogonControl2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   38491             : {
   38492           0 :         const struct ndr_interface_call *call = NULL;
   38493           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38494           0 :         struct ndr_pull *pull = NULL;
   38495           0 :         enum ndr_err_code err;
   38496             : 
   38497           0 :         if (ndr_table_netlogon.num_calls < 15) {
   38498           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_unpack");
   38499           0 :                 return NULL;
   38500             :         }
   38501           0 :         call = &ndr_table_netlogon.calls[14];
   38502             : 
   38503           0 :         pull = ndr_pull_init_blob(blob, object);
   38504           0 :         if (pull == NULL) {
   38505           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38506           0 :                 return NULL;
   38507             :         }
   38508             : 
   38509           0 :         pull->flags |= ndr_pull_flags;
   38510             : 
   38511           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   38512           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38513           0 :                 TALLOC_FREE(pull);
   38514           0 :                 PyErr_SetNdrError(err);
   38515           0 :                 return NULL;
   38516             :         }
   38517           0 :         if (!allow_remaining) {
   38518           0 :                 uint32_t highest_ofs;
   38519             : 
   38520           0 :                 if (pull->offset > pull->relative_highest_offset) {
   38521           0 :                         highest_ofs = pull->offset;
   38522             :                 } else {
   38523           0 :                         highest_ofs = pull->relative_highest_offset;
   38524             :                 }
   38525           0 :                 if (highest_ofs < pull->data_size) {
   38526           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   38527             :                                 "not all bytes consumed ofs[%u] size[%u]",
   38528             :                                 highest_ofs, pull->data_size);
   38529           0 :                         TALLOC_FREE(pull);
   38530           0 :                         PyErr_SetNdrError(err);
   38531           0 :                         return NULL;
   38532             :                 }
   38533             :         }
   38534             : 
   38535           0 :         TALLOC_FREE(pull);
   38536           0 :         Py_RETURN_NONE;
   38537             : }
   38538             : 
   38539           0 : static PyObject *py_netr_LogonControl2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38540             : {
   38541           0 :         DATA_BLOB blob;
   38542           0 :         Py_ssize_t blob_length = 0;
   38543           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38544           0 :         PyObject *bigendian_obj = NULL;
   38545           0 :         PyObject *ndr64_obj = NULL;
   38546           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38547           0 :         PyObject *allow_remaining_obj = NULL;
   38548           0 :         bool allow_remaining = false;
   38549             : 
   38550           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   38551             :                 discard_const_p(char *, kwnames),
   38552             :                 &blob.data, &blob_length,
   38553             :                 &bigendian_obj,
   38554             :                 &ndr64_obj,
   38555             :                 &allow_remaining_obj)) {
   38556           0 :                 return NULL;
   38557             :         }
   38558           0 :         blob.length = blob_length;
   38559             : 
   38560           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38561           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38562             :         }
   38563           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38564           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38565             :         }
   38566             : 
   38567           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38568           0 :                 allow_remaining = true;
   38569             :         }
   38570             : 
   38571           0 :         return py_netr_LogonControl2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   38572             : }
   38573             : 
   38574           0 : static PyObject *py_netr_LogonControl2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38575             : {
   38576           0 :         DATA_BLOB blob;
   38577           0 :         Py_ssize_t blob_length = 0;
   38578           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38579           0 :         PyObject *bigendian_obj = NULL;
   38580           0 :         PyObject *ndr64_obj = NULL;
   38581           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38582           0 :         PyObject *allow_remaining_obj = NULL;
   38583           0 :         bool allow_remaining = false;
   38584             : 
   38585           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   38586             :                 discard_const_p(char *, kwnames),
   38587             :                 &blob.data, &blob_length,
   38588             :                 &bigendian_obj,
   38589             :                 &ndr64_obj,
   38590             :                 &allow_remaining_obj)) {
   38591           0 :                 return NULL;
   38592             :         }
   38593           0 :         blob.length = blob_length;
   38594             : 
   38595           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38596           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38597             :         }
   38598           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38599           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38600             :         }
   38601             : 
   38602           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38603           0 :                 allow_remaining = true;
   38604             :         }
   38605             : 
   38606           0 :         return py_netr_LogonControl2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   38607             : }
   38608             : 
   38609           0 : static PyObject *py_netr_LogonControl2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   38610             : {
   38611           0 :         const struct ndr_interface_call *call = NULL;
   38612           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38613           0 :         PyObject *ret;
   38614           0 :         char *retstr;
   38615             : 
   38616           0 :         if (ndr_table_netlogon.num_calls < 15) {
   38617           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_print");
   38618           0 :                 return NULL;
   38619             :         }
   38620           0 :         call = &ndr_table_netlogon.calls[14];
   38621             : 
   38622           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   38623           0 :         ret = PyUnicode_FromString(retstr);
   38624           0 :         TALLOC_FREE(retstr);
   38625             : 
   38626           0 :         return ret;
   38627             : }
   38628             : 
   38629           0 : static PyObject *py_netr_LogonControl2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38630             : {
   38631           0 :         return py_netr_LogonControl2_ndr_print(py_obj, "netr_LogonControl2_in", NDR_IN);
   38632             : }
   38633             : 
   38634           0 : static PyObject *py_netr_LogonControl2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38635             : {
   38636           0 :         return py_netr_LogonControl2_ndr_print(py_obj, "netr_LogonControl2_out", NDR_OUT);
   38637             : }
   38638             : 
   38639             : static PyMethodDef py_netr_LogonControl2_methods[] = {
   38640             :         { "opnum", (PyCFunction)py_netr_LogonControl2_ndr_opnum, METH_NOARGS|METH_CLASS,
   38641             :                 "netlogon.netr_LogonControl2.opnum() -> 14 (0x0e) " },
   38642             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   38643             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   38644             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   38645             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   38646             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   38647             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   38648             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   38649             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   38650             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonControl2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   38651             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonControl2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   38652             :         { NULL, NULL, 0, NULL }
   38653             : };
   38654             : 
   38655             : 
   38656             : static PyTypeObject netr_LogonControl2_Type = {
   38657             :         PyVarObject_HEAD_INIT(NULL, 0)
   38658             :         .tp_name = "netlogon.netr_LogonControl2",
   38659             :         .tp_getset = py_netr_LogonControl2_getsetters,
   38660             :         .tp_methods = py_netr_LogonControl2_methods,
   38661             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   38662             :         .tp_new = py_netr_LogonControl2_new,
   38663             : };
   38664             : 
   38665           0 : static bool pack_py_netr_LogonControl2_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl2 *r)
   38666             : {
   38667           0 :         PyObject *py_logon_server;
   38668           0 :         PyObject *py_function_code;
   38669           0 :         PyObject *py_level;
   38670           0 :         PyObject *py_data;
   38671           0 :         const char *kwnames[] = {
   38672             :                 "logon_server", "function_code", "level", "data", NULL
   38673             :         };
   38674             : 
   38675           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_LogonControl2", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level, &py_data)) {
   38676           0 :                 return false;
   38677             :         }
   38678             : 
   38679           0 :         if (py_logon_server == NULL) {
   38680           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   38681           0 :                 return false;
   38682             :         }
   38683           0 :         if (py_logon_server == Py_None) {
   38684           0 :                 r->in.logon_server = NULL;
   38685             :         } else {
   38686           0 :                 r->in.logon_server = NULL;
   38687             :                 {
   38688           0 :                         const char *test_str;
   38689           0 :                         const char *talloc_str;
   38690           0 :                         PyObject *unicode = NULL;
   38691           0 :                         if (PyUnicode_Check(py_logon_server)) {
   38692           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   38693           0 :                                 if (unicode == NULL) {
   38694           0 :                                         PyErr_NoMemory();
   38695           0 :                                         return false;
   38696             :                                 }
   38697           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38698           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   38699           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   38700             :                         } else {
   38701           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   38702           0 :                                 return false;
   38703             :                         }
   38704           0 :                         talloc_str = talloc_strdup(r, test_str);
   38705           0 :                         if (unicode != NULL) {
   38706           0 :                                 Py_DECREF(unicode);
   38707             :                         }
   38708           0 :                         if (talloc_str == NULL) {
   38709           0 :                                 PyErr_NoMemory();
   38710           0 :                                 return false;
   38711             :                         }
   38712           0 :                         r->in.logon_server = talloc_str;
   38713             :                 }
   38714             :         }
   38715           0 :         if (py_function_code == NULL) {
   38716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.function_code");
   38717           0 :                 return false;
   38718             :         }
   38719             :         {
   38720           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   38721           0 :                 if (PyLong_Check(py_function_code)) {
   38722           0 :                         unsigned long long test_var;
   38723           0 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   38724           0 :                         if (PyErr_Occurred() != NULL) {
   38725           0 :                                 return false;
   38726             :                         }
   38727           0 :                         if (test_var > uint_max) {
   38728           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38729             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38730           0 :                                 return false;
   38731             :                         }
   38732           0 :                         r->in.function_code = test_var;
   38733             :                 } else {
   38734           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38735             :                           PyLong_Type.tp_name);
   38736           0 :                         return false;
   38737             :                 }
   38738             :         }
   38739           0 :         if (py_level == NULL) {
   38740           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   38741           0 :                 return false;
   38742             :         }
   38743             :         {
   38744           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   38745           0 :                 if (PyLong_Check(py_level)) {
   38746           0 :                         unsigned long long test_var;
   38747           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   38748           0 :                         if (PyErr_Occurred() != NULL) {
   38749           0 :                                 return false;
   38750             :                         }
   38751           0 :                         if (test_var > uint_max) {
   38752           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38753             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38754           0 :                                 return false;
   38755             :                         }
   38756           0 :                         r->in.level = test_var;
   38757             :                 } else {
   38758           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38759             :                           PyLong_Type.tp_name);
   38760           0 :                         return false;
   38761             :                 }
   38762             :         }
   38763           0 :         if (py_data == NULL) {
   38764           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.data");
   38765           0 :                 return false;
   38766             :         }
   38767           0 :         r->in.data = talloc_ptrtype(r, r->in.data);
   38768           0 :         if (r->in.data == NULL) {
   38769           0 :                 PyErr_NoMemory();
   38770           0 :                 return false;
   38771             :         }
   38772             :         {
   38773           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   38774           0 :                 data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(&netr_CONTROL_DATA_INFORMATION_Type, r, r->in.function_code, py_data, "union netr_CONTROL_DATA_INFORMATION");
   38775           0 :                 if (data_switch_1 == NULL) {
   38776           0 :                         return false;
   38777             :                 }
   38778           0 :                 r->in.data = data_switch_1;
   38779             :         }
   38780           0 :         return true;
   38781             : }
   38782             : 
   38783           0 : static PyObject *unpack_py_netr_LogonControl2_args_out(struct netr_LogonControl2 *r)
   38784             : {
   38785           0 :         PyObject *result;
   38786           0 :         PyObject *py_query;
   38787           0 :         py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, r->out.query, r->in.level, r->out.query, "union netr_CONTROL_QUERY_INFORMATION");
   38788           0 :         if (py_query == NULL) {
   38789           0 :                 return NULL;
   38790             :         }
   38791           0 :         result = py_query;
   38792           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   38793           0 :                 PyErr_SetWERROR(r->out.result);
   38794           0 :                 return NULL;
   38795             :         }
   38796             : 
   38797           0 :         return result;
   38798             : }
   38799             : 
   38800             : 
   38801           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_server_name(PyObject *obj, void *closure)
   38802             : {
   38803           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38804           0 :         PyObject *py_server_name;
   38805           0 :         if (object->in.server_name == NULL) {
   38806           0 :                 Py_RETURN_NONE;
   38807             :         }
   38808           0 :         if (object->in.server_name == NULL) {
   38809           0 :                 py_server_name = Py_None;
   38810           0 :                 Py_INCREF(py_server_name);
   38811             :         } else {
   38812           0 :                 if (object->in.server_name == NULL) {
   38813           0 :                         py_server_name = Py_None;
   38814           0 :                         Py_INCREF(py_server_name);
   38815             :                 } else {
   38816           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   38817             :                 }
   38818             :         }
   38819           0 :         return py_server_name;
   38820             : }
   38821             : 
   38822           0 : static int py_netr_ServerAuthenticate2_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   38823             : {
   38824           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38825           0 :         if (value == NULL) {
   38826           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   38827           0 :                 return -1;
   38828             :         }
   38829           0 :         if (value == Py_None) {
   38830           0 :                 object->in.server_name = NULL;
   38831             :         } else {
   38832           0 :                 object->in.server_name = NULL;
   38833             :                 {
   38834           0 :                         const char *test_str;
   38835           0 :                         const char *talloc_str;
   38836           0 :                         PyObject *unicode = NULL;
   38837           0 :                         if (PyUnicode_Check(value)) {
   38838           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38839           0 :                                 if (unicode == NULL) {
   38840           0 :                                         PyErr_NoMemory();
   38841           0 :                                         return -1;
   38842             :                                 }
   38843           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38844           0 :                         } else if (PyBytes_Check(value)) {
   38845           0 :                                 test_str = PyBytes_AS_STRING(value);
   38846             :                         } else {
   38847           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38848           0 :                                 return -1;
   38849             :                         }
   38850           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38851           0 :                         if (unicode != NULL) {
   38852           0 :                                 Py_DECREF(unicode);
   38853             :                         }
   38854           0 :                         if (talloc_str == NULL) {
   38855           0 :                                 PyErr_NoMemory();
   38856           0 :                                 return -1;
   38857             :                         }
   38858           0 :                         object->in.server_name = talloc_str;
   38859             :                 }
   38860             :         }
   38861           0 :         return 0;
   38862             : }
   38863             : 
   38864           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_account_name(PyObject *obj, void *closure)
   38865             : {
   38866           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38867           0 :         PyObject *py_account_name;
   38868           0 :         if (object->in.account_name == NULL) {
   38869           0 :                 Py_RETURN_NONE;
   38870             :         }
   38871           0 :         if (object->in.account_name == NULL) {
   38872           0 :                 py_account_name = Py_None;
   38873           0 :                 Py_INCREF(py_account_name);
   38874             :         } else {
   38875           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   38876             :         }
   38877           0 :         return py_account_name;
   38878             : }
   38879             : 
   38880           0 : static int py_netr_ServerAuthenticate2_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   38881             : {
   38882           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38883           0 :         if (value == NULL) {
   38884           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   38885           0 :                 return -1;
   38886             :         }
   38887           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   38888           0 :         if (object->in.account_name == NULL) {
   38889           0 :                 PyErr_NoMemory();
   38890           0 :                 return -1;
   38891             :         }
   38892             :         {
   38893           0 :                 const char *test_str;
   38894           0 :                 const char *talloc_str;
   38895           0 :                 PyObject *unicode = NULL;
   38896           0 :                 if (PyUnicode_Check(value)) {
   38897           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38898           0 :                         if (unicode == NULL) {
   38899           0 :                                 PyErr_NoMemory();
   38900           0 :                                 return -1;
   38901             :                         }
   38902           0 :                         test_str = PyBytes_AS_STRING(unicode);
   38903           0 :                 } else if (PyBytes_Check(value)) {
   38904           0 :                         test_str = PyBytes_AS_STRING(value);
   38905             :                 } else {
   38906           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38907           0 :                         return -1;
   38908             :                 }
   38909           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38910           0 :                 if (unicode != NULL) {
   38911           0 :                         Py_DECREF(unicode);
   38912             :                 }
   38913           0 :                 if (talloc_str == NULL) {
   38914           0 :                         PyErr_NoMemory();
   38915           0 :                         return -1;
   38916             :                 }
   38917           0 :                 object->in.account_name = talloc_str;
   38918             :         }
   38919           0 :         return 0;
   38920             : }
   38921             : 
   38922           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_secure_channel_type(PyObject *obj, void *closure)
   38923             : {
   38924           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38925           0 :         PyObject *py_secure_channel_type;
   38926           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   38927           0 :         return py_secure_channel_type;
   38928             : }
   38929             : 
   38930           0 : static int py_netr_ServerAuthenticate2_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   38931             : {
   38932           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38933           0 :         if (value == NULL) {
   38934           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   38935           0 :                 return -1;
   38936             :         }
   38937             :         {
   38938           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   38939           0 :                 if (PyLong_Check(value)) {
   38940           0 :                         unsigned long long test_var;
   38941           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38942           0 :                         if (PyErr_Occurred() != NULL) {
   38943           0 :                                 return -1;
   38944             :                         }
   38945           0 :                         if (test_var > uint_max) {
   38946           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38947             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38948           0 :                                 return -1;
   38949             :                         }
   38950           0 :                         object->in.secure_channel_type = test_var;
   38951             :                 } else {
   38952           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38953             :                           PyLong_Type.tp_name);
   38954           0 :                         return -1;
   38955             :                 }
   38956             :         }
   38957           0 :         return 0;
   38958             : }
   38959             : 
   38960           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_computer_name(PyObject *obj, void *closure)
   38961             : {
   38962           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38963           0 :         PyObject *py_computer_name;
   38964           0 :         if (object->in.computer_name == NULL) {
   38965           0 :                 Py_RETURN_NONE;
   38966             :         }
   38967           0 :         if (object->in.computer_name == NULL) {
   38968           0 :                 py_computer_name = Py_None;
   38969           0 :                 Py_INCREF(py_computer_name);
   38970             :         } else {
   38971           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   38972             :         }
   38973           0 :         return py_computer_name;
   38974             : }
   38975             : 
   38976           0 : static int py_netr_ServerAuthenticate2_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   38977             : {
   38978           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38979           0 :         if (value == NULL) {
   38980           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   38981           0 :                 return -1;
   38982             :         }
   38983           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   38984           0 :         if (object->in.computer_name == NULL) {
   38985           0 :                 PyErr_NoMemory();
   38986           0 :                 return -1;
   38987             :         }
   38988             :         {
   38989           0 :                 const char *test_str;
   38990           0 :                 const char *talloc_str;
   38991           0 :                 PyObject *unicode = NULL;
   38992           0 :                 if (PyUnicode_Check(value)) {
   38993           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38994           0 :                         if (unicode == NULL) {
   38995           0 :                                 PyErr_NoMemory();
   38996           0 :                                 return -1;
   38997             :                         }
   38998           0 :                         test_str = PyBytes_AS_STRING(unicode);
   38999           0 :                 } else if (PyBytes_Check(value)) {
   39000           0 :                         test_str = PyBytes_AS_STRING(value);
   39001             :                 } else {
   39002           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39003           0 :                         return -1;
   39004             :                 }
   39005           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39006           0 :                 if (unicode != NULL) {
   39007           0 :                         Py_DECREF(unicode);
   39008             :                 }
   39009           0 :                 if (talloc_str == NULL) {
   39010           0 :                         PyErr_NoMemory();
   39011           0 :                         return -1;
   39012             :                 }
   39013           0 :                 object->in.computer_name = talloc_str;
   39014             :         }
   39015           0 :         return 0;
   39016             : }
   39017             : 
   39018           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_credentials(PyObject *obj, void *closure)
   39019             : {
   39020           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   39021           0 :         PyObject *py_credentials;
   39022           0 :         if (object->in.credentials == NULL) {
   39023           0 :                 Py_RETURN_NONE;
   39024             :         }
   39025           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   39026           0 :         return py_credentials;
   39027             : }
   39028             : 
   39029           0 : static int py_netr_ServerAuthenticate2_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   39030             : {
   39031           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39032           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   39033           0 :         if (value == NULL) {
   39034           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credentials");
   39035           0 :                 return -1;
   39036             :         }
   39037           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   39038           0 :         if (object->in.credentials == NULL) {
   39039           0 :                 PyErr_NoMemory();
   39040           0 :                 return -1;
   39041             :         }
   39042           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   39043           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39044           0 :                 PyErr_NoMemory();
   39045           0 :                 return -1;
   39046             :         }
   39047           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   39048           0 :         return 0;
   39049             : }
   39050             : 
   39051           0 : static PyObject *py_netr_ServerAuthenticate2_out_get_return_credentials(PyObject *obj, void *closure)
   39052             : {
   39053           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   39054           0 :         PyObject *py_return_credentials;
   39055           0 :         if (object->out.return_credentials == NULL) {
   39056           0 :                 Py_RETURN_NONE;
   39057             :         }
   39058           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   39059           0 :         return py_return_credentials;
   39060             : }
   39061             : 
   39062           0 : static int py_netr_ServerAuthenticate2_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   39063             : {
   39064           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39065           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   39066           0 :         if (value == NULL) {
   39067           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_credentials");
   39068           0 :                 return -1;
   39069             :         }
   39070           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   39071           0 :         if (object->out.return_credentials == NULL) {
   39072           0 :                 PyErr_NoMemory();
   39073           0 :                 return -1;
   39074             :         }
   39075           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   39076           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39077           0 :                 PyErr_NoMemory();
   39078           0 :                 return -1;
   39079             :         }
   39080           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   39081           0 :         return 0;
   39082             : }
   39083             : 
   39084           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_negotiate_flags(PyObject *obj, void *closure)
   39085             : {
   39086           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   39087           0 :         PyObject *py_negotiate_flags;
   39088           0 :         if (object->in.negotiate_flags == NULL) {
   39089           0 :                 Py_RETURN_NONE;
   39090             :         }
   39091           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->in.negotiate_flags);
   39092           0 :         return py_negotiate_flags;
   39093             : }
   39094             : 
   39095           0 : static int py_netr_ServerAuthenticate2_in_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   39096             : {
   39097           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39098           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.negotiate_flags));
   39099           0 :         if (value == NULL) {
   39100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.negotiate_flags");
   39101           0 :                 return -1;
   39102             :         }
   39103           0 :         object->in.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.negotiate_flags);
   39104           0 :         if (object->in.negotiate_flags == NULL) {
   39105           0 :                 PyErr_NoMemory();
   39106           0 :                 return -1;
   39107             :         }
   39108             :         {
   39109           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.negotiate_flags));
   39110           0 :                 if (PyLong_Check(value)) {
   39111           0 :                         unsigned long long test_var;
   39112           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39113           0 :                         if (PyErr_Occurred() != NULL) {
   39114           0 :                                 return -1;
   39115             :                         }
   39116           0 :                         if (test_var > uint_max) {
   39117           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39118             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39119           0 :                                 return -1;
   39120             :                         }
   39121           0 :                         *object->in.negotiate_flags = test_var;
   39122             :                 } else {
   39123           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39124             :                           PyLong_Type.tp_name);
   39125           0 :                         return -1;
   39126             :                 }
   39127             :         }
   39128           0 :         return 0;
   39129             : }
   39130             : 
   39131           0 : static PyObject *py_netr_ServerAuthenticate2_out_get_negotiate_flags(PyObject *obj, void *closure)
   39132             : {
   39133           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   39134           0 :         PyObject *py_negotiate_flags;
   39135           0 :         if (object->out.negotiate_flags == NULL) {
   39136           0 :                 Py_RETURN_NONE;
   39137             :         }
   39138           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->out.negotiate_flags);
   39139           0 :         return py_negotiate_flags;
   39140             : }
   39141             : 
   39142           0 : static int py_netr_ServerAuthenticate2_out_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   39143             : {
   39144           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39145           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.negotiate_flags));
   39146           0 :         if (value == NULL) {
   39147           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.negotiate_flags");
   39148           0 :                 return -1;
   39149             :         }
   39150           0 :         object->out.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.negotiate_flags);
   39151           0 :         if (object->out.negotiate_flags == NULL) {
   39152           0 :                 PyErr_NoMemory();
   39153           0 :                 return -1;
   39154             :         }
   39155             :         {
   39156           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.negotiate_flags));
   39157           0 :                 if (PyLong_Check(value)) {
   39158           0 :                         unsigned long long test_var;
   39159           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39160           0 :                         if (PyErr_Occurred() != NULL) {
   39161           0 :                                 return -1;
   39162             :                         }
   39163           0 :                         if (test_var > uint_max) {
   39164           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39165             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39166           0 :                                 return -1;
   39167             :                         }
   39168           0 :                         *object->out.negotiate_flags = test_var;
   39169             :                 } else {
   39170           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39171             :                           PyLong_Type.tp_name);
   39172           0 :                         return -1;
   39173             :                 }
   39174             :         }
   39175           0 :         return 0;
   39176             : }
   39177             : 
   39178           0 : static PyObject *py_netr_ServerAuthenticate2_get_result(PyObject *obj, void *closure)
   39179             : {
   39180           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   39181           0 :         PyObject *py_result;
   39182           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   39183           0 :         return py_result;
   39184             : }
   39185             : 
   39186           0 : static int py_netr_ServerAuthenticate2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   39187             : {
   39188           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39189           0 :         if (value == NULL) {
   39190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   39191           0 :                 return -1;
   39192             :         }
   39193           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   39194           0 :         return 0;
   39195             : }
   39196             : 
   39197             : static PyGetSetDef py_netr_ServerAuthenticate2_getsetters[] = {
   39198             :         {
   39199             :                 .name = discard_const_p(char, "in_server_name"),
   39200             :                 .get = py_netr_ServerAuthenticate2_in_get_server_name,
   39201             :                 .set = py_netr_ServerAuthenticate2_in_set_server_name,
   39202             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39203             :         },
   39204             :         {
   39205             :                 .name = discard_const_p(char, "in_account_name"),
   39206             :                 .get = py_netr_ServerAuthenticate2_in_get_account_name,
   39207             :                 .set = py_netr_ServerAuthenticate2_in_set_account_name,
   39208             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39209             :         },
   39210             :         {
   39211             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   39212             :                 .get = py_netr_ServerAuthenticate2_in_get_secure_channel_type,
   39213             :                 .set = py_netr_ServerAuthenticate2_in_set_secure_channel_type,
   39214             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   39215             :         },
   39216             :         {
   39217             :                 .name = discard_const_p(char, "in_computer_name"),
   39218             :                 .get = py_netr_ServerAuthenticate2_in_get_computer_name,
   39219             :                 .set = py_netr_ServerAuthenticate2_in_set_computer_name,
   39220             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39221             :         },
   39222             :         {
   39223             :                 .name = discard_const_p(char, "in_credentials"),
   39224             :                 .get = py_netr_ServerAuthenticate2_in_get_credentials,
   39225             :                 .set = py_netr_ServerAuthenticate2_in_set_credentials,
   39226             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   39227             :         },
   39228             :         {
   39229             :                 .name = discard_const_p(char, "out_return_credentials"),
   39230             :                 .get = py_netr_ServerAuthenticate2_out_get_return_credentials,
   39231             :                 .set = py_netr_ServerAuthenticate2_out_set_return_credentials,
   39232             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   39233             :         },
   39234             :         {
   39235             :                 .name = discard_const_p(char, "in_negotiate_flags"),
   39236             :                 .get = py_netr_ServerAuthenticate2_in_get_negotiate_flags,
   39237             :                 .set = py_netr_ServerAuthenticate2_in_set_negotiate_flags,
   39238             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   39239             :         },
   39240             :         {
   39241             :                 .name = discard_const_p(char, "out_negotiate_flags"),
   39242             :                 .get = py_netr_ServerAuthenticate2_out_get_negotiate_flags,
   39243             :                 .set = py_netr_ServerAuthenticate2_out_set_negotiate_flags,
   39244             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   39245             :         },
   39246             :         {
   39247             :                 .name = discard_const_p(char, "result"),
   39248             :                 .get = py_netr_ServerAuthenticate2_get_result,
   39249             :                 .set = py_netr_ServerAuthenticate2_set_result,
   39250             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   39251             :         },
   39252             :         { .name = NULL }
   39253             : };
   39254             : 
   39255           0 : static PyObject *py_netr_ServerAuthenticate2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   39256             : {
   39257           0 :         PyObject *self = pytalloc_new(struct netr_ServerAuthenticate2, type);
   39258           0 :         struct netr_ServerAuthenticate2 *_self = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(self);
   39259           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   39260           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   39261           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   39262           0 :         _self->in.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   39263           0 :         _self->out.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   39264           0 :         return self;
   39265             : }
   39266             : 
   39267           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   39268             : {
   39269             : 
   39270             : 
   39271           0 :         return PyLong_FromLong(15);
   39272             : }
   39273             : 
   39274           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   39275             : {
   39276           0 :         const struct ndr_interface_call *call = NULL;
   39277           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39278           0 :         PyObject *ret = NULL;
   39279           0 :         struct ndr_push *push = NULL;
   39280           0 :         DATA_BLOB blob;
   39281           0 :         enum ndr_err_code err;
   39282             : 
   39283           0 :         if (ndr_table_netlogon.num_calls < 16) {
   39284           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_pack");
   39285           0 :                 return NULL;
   39286             :         }
   39287           0 :         call = &ndr_table_netlogon.calls[15];
   39288             : 
   39289           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   39290           0 :         if (push == NULL) {
   39291           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39292           0 :                 return NULL;
   39293             :         }
   39294             : 
   39295           0 :         push->flags |= ndr_push_flags;
   39296             : 
   39297           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   39298           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39299           0 :                 TALLOC_FREE(push);
   39300           0 :                 PyErr_SetNdrError(err);
   39301           0 :                 return NULL;
   39302             :         }
   39303           0 :         blob = ndr_push_blob(push);
   39304           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   39305           0 :         TALLOC_FREE(push);
   39306           0 :         return ret;
   39307             : }
   39308             : 
   39309           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39310             : {
   39311           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39312           0 :         PyObject *bigendian_obj = NULL;
   39313           0 :         PyObject *ndr64_obj = NULL;
   39314           0 :         libndr_flags ndr_push_flags = 0;
   39315             : 
   39316           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   39317             :                 discard_const_p(char *, kwnames),
   39318             :                 &bigendian_obj,
   39319             :                 &ndr64_obj)) {
   39320           0 :                 return NULL;
   39321             :         }
   39322             : 
   39323           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39324           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39325             :         }
   39326           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39327           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39328             :         }
   39329             : 
   39330           0 :         return py_netr_ServerAuthenticate2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   39331             : }
   39332             : 
   39333           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39334             : {
   39335           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39336           0 :         PyObject *bigendian_obj = NULL;
   39337           0 :         PyObject *ndr64_obj = NULL;
   39338           0 :         libndr_flags ndr_push_flags = 0;
   39339             : 
   39340           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   39341             :                 discard_const_p(char *, kwnames),
   39342             :                 &bigendian_obj,
   39343             :                 &ndr64_obj)) {
   39344           0 :                 return NULL;
   39345             :         }
   39346             : 
   39347           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39348           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39349             :         }
   39350           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39351           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39352             :         }
   39353             : 
   39354           0 :         return py_netr_ServerAuthenticate2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   39355             : }
   39356             : 
   39357           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   39358             : {
   39359           0 :         const struct ndr_interface_call *call = NULL;
   39360           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39361           0 :         struct ndr_pull *pull = NULL;
   39362           0 :         enum ndr_err_code err;
   39363             : 
   39364           0 :         if (ndr_table_netlogon.num_calls < 16) {
   39365           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_unpack");
   39366           0 :                 return NULL;
   39367             :         }
   39368           0 :         call = &ndr_table_netlogon.calls[15];
   39369             : 
   39370           0 :         pull = ndr_pull_init_blob(blob, object);
   39371           0 :         if (pull == NULL) {
   39372           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39373           0 :                 return NULL;
   39374             :         }
   39375             : 
   39376           0 :         pull->flags |= ndr_pull_flags;
   39377             : 
   39378           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   39379           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39380           0 :                 TALLOC_FREE(pull);
   39381           0 :                 PyErr_SetNdrError(err);
   39382           0 :                 return NULL;
   39383             :         }
   39384           0 :         if (!allow_remaining) {
   39385           0 :                 uint32_t highest_ofs;
   39386             : 
   39387           0 :                 if (pull->offset > pull->relative_highest_offset) {
   39388           0 :                         highest_ofs = pull->offset;
   39389             :                 } else {
   39390           0 :                         highest_ofs = pull->relative_highest_offset;
   39391             :                 }
   39392           0 :                 if (highest_ofs < pull->data_size) {
   39393           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   39394             :                                 "not all bytes consumed ofs[%u] size[%u]",
   39395             :                                 highest_ofs, pull->data_size);
   39396           0 :                         TALLOC_FREE(pull);
   39397           0 :                         PyErr_SetNdrError(err);
   39398           0 :                         return NULL;
   39399             :                 }
   39400             :         }
   39401             : 
   39402           0 :         TALLOC_FREE(pull);
   39403           0 :         Py_RETURN_NONE;
   39404             : }
   39405             : 
   39406           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39407             : {
   39408           0 :         DATA_BLOB blob;
   39409           0 :         Py_ssize_t blob_length = 0;
   39410           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39411           0 :         PyObject *bigendian_obj = NULL;
   39412           0 :         PyObject *ndr64_obj = NULL;
   39413           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39414           0 :         PyObject *allow_remaining_obj = NULL;
   39415           0 :         bool allow_remaining = false;
   39416             : 
   39417           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   39418             :                 discard_const_p(char *, kwnames),
   39419             :                 &blob.data, &blob_length,
   39420             :                 &bigendian_obj,
   39421             :                 &ndr64_obj,
   39422             :                 &allow_remaining_obj)) {
   39423           0 :                 return NULL;
   39424             :         }
   39425           0 :         blob.length = blob_length;
   39426             : 
   39427           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39428           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39429             :         }
   39430           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39431           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39432             :         }
   39433             : 
   39434           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39435           0 :                 allow_remaining = true;
   39436             :         }
   39437             : 
   39438           0 :         return py_netr_ServerAuthenticate2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   39439             : }
   39440             : 
   39441           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39442             : {
   39443           0 :         DATA_BLOB blob;
   39444           0 :         Py_ssize_t blob_length = 0;
   39445           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39446           0 :         PyObject *bigendian_obj = NULL;
   39447           0 :         PyObject *ndr64_obj = NULL;
   39448           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39449           0 :         PyObject *allow_remaining_obj = NULL;
   39450           0 :         bool allow_remaining = false;
   39451             : 
   39452           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   39453             :                 discard_const_p(char *, kwnames),
   39454             :                 &blob.data, &blob_length,
   39455             :                 &bigendian_obj,
   39456             :                 &ndr64_obj,
   39457             :                 &allow_remaining_obj)) {
   39458           0 :                 return NULL;
   39459             :         }
   39460           0 :         blob.length = blob_length;
   39461             : 
   39462           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39463           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39464             :         }
   39465           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39466           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39467             :         }
   39468             : 
   39469           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39470           0 :                 allow_remaining = true;
   39471             :         }
   39472             : 
   39473           0 :         return py_netr_ServerAuthenticate2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   39474             : }
   39475             : 
   39476           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   39477             : {
   39478           0 :         const struct ndr_interface_call *call = NULL;
   39479           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39480           0 :         PyObject *ret;
   39481           0 :         char *retstr;
   39482             : 
   39483           0 :         if (ndr_table_netlogon.num_calls < 16) {
   39484           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_print");
   39485           0 :                 return NULL;
   39486             :         }
   39487           0 :         call = &ndr_table_netlogon.calls[15];
   39488             : 
   39489           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   39490           0 :         ret = PyUnicode_FromString(retstr);
   39491           0 :         TALLOC_FREE(retstr);
   39492             : 
   39493           0 :         return ret;
   39494             : }
   39495             : 
   39496           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39497             : {
   39498           0 :         return py_netr_ServerAuthenticate2_ndr_print(py_obj, "netr_ServerAuthenticate2_in", NDR_IN);
   39499             : }
   39500             : 
   39501           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39502             : {
   39503           0 :         return py_netr_ServerAuthenticate2_ndr_print(py_obj, "netr_ServerAuthenticate2_out", NDR_OUT);
   39504             : }
   39505             : 
   39506             : static PyMethodDef py_netr_ServerAuthenticate2_methods[] = {
   39507             :         { "opnum", (PyCFunction)py_netr_ServerAuthenticate2_ndr_opnum, METH_NOARGS|METH_CLASS,
   39508             :                 "netlogon.netr_ServerAuthenticate2.opnum() -> 15 (0x0f) " },
   39509             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   39510             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   39511             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   39512             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   39513             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   39514             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   39515             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   39516             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   39517             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerAuthenticate2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   39518             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerAuthenticate2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   39519             :         { NULL, NULL, 0, NULL }
   39520             : };
   39521             : 
   39522             : 
   39523             : static PyTypeObject netr_ServerAuthenticate2_Type = {
   39524             :         PyVarObject_HEAD_INIT(NULL, 0)
   39525             :         .tp_name = "netlogon.netr_ServerAuthenticate2",
   39526             :         .tp_getset = py_netr_ServerAuthenticate2_getsetters,
   39527             :         .tp_methods = py_netr_ServerAuthenticate2_methods,
   39528             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   39529             :         .tp_new = py_netr_ServerAuthenticate2_new,
   39530             : };
   39531             : 
   39532           0 : static bool pack_py_netr_ServerAuthenticate2_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate2 *r)
   39533             : {
   39534           0 :         PyObject *py_server_name;
   39535           0 :         PyObject *py_account_name;
   39536           0 :         PyObject *py_secure_channel_type;
   39537           0 :         PyObject *py_computer_name;
   39538           0 :         PyObject *py_credentials;
   39539           0 :         PyObject *py_negotiate_flags;
   39540           0 :         const char *kwnames[] = {
   39541             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credentials", "negotiate_flags", NULL
   39542             :         };
   39543             : 
   39544           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_ServerAuthenticate2", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credentials, &py_negotiate_flags)) {
   39545           0 :                 return false;
   39546             :         }
   39547             : 
   39548           0 :         if (py_server_name == NULL) {
   39549           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   39550           0 :                 return false;
   39551             :         }
   39552           0 :         if (py_server_name == Py_None) {
   39553           0 :                 r->in.server_name = NULL;
   39554             :         } else {
   39555           0 :                 r->in.server_name = NULL;
   39556             :                 {
   39557           0 :                         const char *test_str;
   39558           0 :                         const char *talloc_str;
   39559           0 :                         PyObject *unicode = NULL;
   39560           0 :                         if (PyUnicode_Check(py_server_name)) {
   39561           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   39562           0 :                                 if (unicode == NULL) {
   39563           0 :                                         PyErr_NoMemory();
   39564           0 :                                         return false;
   39565             :                                 }
   39566           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39567           0 :                         } else if (PyBytes_Check(py_server_name)) {
   39568           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   39569             :                         } else {
   39570           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   39571           0 :                                 return false;
   39572             :                         }
   39573           0 :                         talloc_str = talloc_strdup(r, test_str);
   39574           0 :                         if (unicode != NULL) {
   39575           0 :                                 Py_DECREF(unicode);
   39576             :                         }
   39577           0 :                         if (talloc_str == NULL) {
   39578           0 :                                 PyErr_NoMemory();
   39579           0 :                                 return false;
   39580             :                         }
   39581           0 :                         r->in.server_name = talloc_str;
   39582             :                 }
   39583             :         }
   39584           0 :         if (py_account_name == NULL) {
   39585           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   39586           0 :                 return false;
   39587             :         }
   39588           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   39589           0 :         if (r->in.account_name == NULL) {
   39590           0 :                 PyErr_NoMemory();
   39591           0 :                 return false;
   39592             :         }
   39593             :         {
   39594           0 :                 const char *test_str;
   39595           0 :                 const char *talloc_str;
   39596           0 :                 PyObject *unicode = NULL;
   39597           0 :                 if (PyUnicode_Check(py_account_name)) {
   39598           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   39599           0 :                         if (unicode == NULL) {
   39600           0 :                                 PyErr_NoMemory();
   39601           0 :                                 return false;
   39602             :                         }
   39603           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39604           0 :                 } else if (PyBytes_Check(py_account_name)) {
   39605           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   39606             :                 } else {
   39607           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   39608           0 :                         return false;
   39609             :                 }
   39610           0 :                 talloc_str = talloc_strdup(r, test_str);
   39611           0 :                 if (unicode != NULL) {
   39612           0 :                         Py_DECREF(unicode);
   39613             :                 }
   39614           0 :                 if (talloc_str == NULL) {
   39615           0 :                         PyErr_NoMemory();
   39616           0 :                         return false;
   39617             :                 }
   39618           0 :                 r->in.account_name = talloc_str;
   39619             :         }
   39620           0 :         if (py_secure_channel_type == NULL) {
   39621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   39622           0 :                 return false;
   39623             :         }
   39624             :         {
   39625           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   39626           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   39627           0 :                         unsigned long long test_var;
   39628           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   39629           0 :                         if (PyErr_Occurred() != NULL) {
   39630           0 :                                 return false;
   39631             :                         }
   39632           0 :                         if (test_var > uint_max) {
   39633           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39634             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39635           0 :                                 return false;
   39636             :                         }
   39637           0 :                         r->in.secure_channel_type = test_var;
   39638             :                 } else {
   39639           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39640             :                           PyLong_Type.tp_name);
   39641           0 :                         return false;
   39642             :                 }
   39643             :         }
   39644           0 :         if (py_computer_name == NULL) {
   39645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   39646           0 :                 return false;
   39647             :         }
   39648           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   39649           0 :         if (r->in.computer_name == NULL) {
   39650           0 :                 PyErr_NoMemory();
   39651           0 :                 return false;
   39652             :         }
   39653             :         {
   39654           0 :                 const char *test_str;
   39655           0 :                 const char *talloc_str;
   39656           0 :                 PyObject *unicode = NULL;
   39657           0 :                 if (PyUnicode_Check(py_computer_name)) {
   39658           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   39659           0 :                         if (unicode == NULL) {
   39660           0 :                                 PyErr_NoMemory();
   39661           0 :                                 return false;
   39662             :                         }
   39663           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39664           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   39665           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   39666             :                 } else {
   39667           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   39668           0 :                         return false;
   39669             :                 }
   39670           0 :                 talloc_str = talloc_strdup(r, test_str);
   39671           0 :                 if (unicode != NULL) {
   39672           0 :                         Py_DECREF(unicode);
   39673             :                 }
   39674           0 :                 if (talloc_str == NULL) {
   39675           0 :                         PyErr_NoMemory();
   39676           0 :                         return false;
   39677             :                 }
   39678           0 :                 r->in.computer_name = talloc_str;
   39679             :         }
   39680           0 :         if (py_credentials == NULL) {
   39681           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credentials");
   39682           0 :                 return false;
   39683             :         }
   39684           0 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   39685           0 :         if (r->in.credentials == NULL) {
   39686           0 :                 PyErr_NoMemory();
   39687           0 :                 return false;
   39688             :         }
   39689           0 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   39690           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   39691           0 :                 PyErr_NoMemory();
   39692           0 :                 return false;
   39693             :         }
   39694           0 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   39695           0 :         if (py_negotiate_flags == NULL) {
   39696           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.negotiate_flags");
   39697           0 :                 return false;
   39698             :         }
   39699           0 :         r->in.negotiate_flags = talloc_ptrtype(r, r->in.negotiate_flags);
   39700           0 :         if (r->in.negotiate_flags == NULL) {
   39701           0 :                 PyErr_NoMemory();
   39702           0 :                 return false;
   39703             :         }
   39704             :         {
   39705           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.negotiate_flags));
   39706           0 :                 if (PyLong_Check(py_negotiate_flags)) {
   39707           0 :                         unsigned long long test_var;
   39708           0 :                         test_var = PyLong_AsUnsignedLongLong(py_negotiate_flags);
   39709           0 :                         if (PyErr_Occurred() != NULL) {
   39710           0 :                                 return false;
   39711             :                         }
   39712           0 :                         if (test_var > uint_max) {
   39713           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39714             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39715           0 :                                 return false;
   39716             :                         }
   39717           0 :                         *r->in.negotiate_flags = test_var;
   39718             :                 } else {
   39719           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39720             :                           PyLong_Type.tp_name);
   39721           0 :                         return false;
   39722             :                 }
   39723             :         }
   39724           0 :         return true;
   39725             : }
   39726             : 
   39727           0 : static PyObject *unpack_py_netr_ServerAuthenticate2_args_out(struct netr_ServerAuthenticate2 *r)
   39728             : {
   39729           0 :         PyObject *result;
   39730           0 :         PyObject *py_return_credentials;
   39731           0 :         PyObject *py_negotiate_flags;
   39732           0 :         result = PyTuple_New(2);
   39733           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   39734           0 :         PyTuple_SetItem(result, 0, py_return_credentials);
   39735           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*r->out.negotiate_flags);
   39736           0 :         PyTuple_SetItem(result, 1, py_negotiate_flags);
   39737           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   39738           0 :                 PyErr_SetNTSTATUS(r->out.result);
   39739           0 :                 return NULL;
   39740             :         }
   39741             : 
   39742           0 :         return result;
   39743             : }
   39744             : 
   39745             : 
   39746           0 : static PyObject *py_netr_DatabaseSync2_in_get_logon_server(PyObject *obj, void *closure)
   39747             : {
   39748           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39749           0 :         PyObject *py_logon_server;
   39750           0 :         if (object->in.logon_server == NULL) {
   39751           0 :                 Py_RETURN_NONE;
   39752             :         }
   39753           0 :         if (object->in.logon_server == NULL) {
   39754           0 :                 py_logon_server = Py_None;
   39755           0 :                 Py_INCREF(py_logon_server);
   39756             :         } else {
   39757           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   39758             :         }
   39759           0 :         return py_logon_server;
   39760             : }
   39761             : 
   39762           0 : static int py_netr_DatabaseSync2_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   39763             : {
   39764           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39765           0 :         if (value == NULL) {
   39766           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   39767           0 :                 return -1;
   39768             :         }
   39769           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   39770           0 :         if (object->in.logon_server == NULL) {
   39771           0 :                 PyErr_NoMemory();
   39772           0 :                 return -1;
   39773             :         }
   39774             :         {
   39775           0 :                 const char *test_str;
   39776           0 :                 const char *talloc_str;
   39777           0 :                 PyObject *unicode = NULL;
   39778           0 :                 if (PyUnicode_Check(value)) {
   39779           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39780           0 :                         if (unicode == NULL) {
   39781           0 :                                 PyErr_NoMemory();
   39782           0 :                                 return -1;
   39783             :                         }
   39784           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39785           0 :                 } else if (PyBytes_Check(value)) {
   39786           0 :                         test_str = PyBytes_AS_STRING(value);
   39787             :                 } else {
   39788           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39789           0 :                         return -1;
   39790             :                 }
   39791           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39792           0 :                 if (unicode != NULL) {
   39793           0 :                         Py_DECREF(unicode);
   39794             :                 }
   39795           0 :                 if (talloc_str == NULL) {
   39796           0 :                         PyErr_NoMemory();
   39797           0 :                         return -1;
   39798             :                 }
   39799           0 :                 object->in.logon_server = talloc_str;
   39800             :         }
   39801           0 :         return 0;
   39802             : }
   39803             : 
   39804           0 : static PyObject *py_netr_DatabaseSync2_in_get_computername(PyObject *obj, void *closure)
   39805             : {
   39806           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39807           0 :         PyObject *py_computername;
   39808           0 :         if (object->in.computername == NULL) {
   39809           0 :                 Py_RETURN_NONE;
   39810             :         }
   39811           0 :         if (object->in.computername == NULL) {
   39812           0 :                 py_computername = Py_None;
   39813           0 :                 Py_INCREF(py_computername);
   39814             :         } else {
   39815           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   39816             :         }
   39817           0 :         return py_computername;
   39818             : }
   39819             : 
   39820           0 : static int py_netr_DatabaseSync2_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   39821             : {
   39822           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39823           0 :         if (value == NULL) {
   39824           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   39825           0 :                 return -1;
   39826             :         }
   39827           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   39828           0 :         if (object->in.computername == NULL) {
   39829           0 :                 PyErr_NoMemory();
   39830           0 :                 return -1;
   39831             :         }
   39832             :         {
   39833           0 :                 const char *test_str;
   39834           0 :                 const char *talloc_str;
   39835           0 :                 PyObject *unicode = NULL;
   39836           0 :                 if (PyUnicode_Check(value)) {
   39837           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39838           0 :                         if (unicode == NULL) {
   39839           0 :                                 PyErr_NoMemory();
   39840           0 :                                 return -1;
   39841             :                         }
   39842           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39843           0 :                 } else if (PyBytes_Check(value)) {
   39844           0 :                         test_str = PyBytes_AS_STRING(value);
   39845             :                 } else {
   39846           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39847           0 :                         return -1;
   39848             :                 }
   39849           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39850           0 :                 if (unicode != NULL) {
   39851           0 :                         Py_DECREF(unicode);
   39852             :                 }
   39853           0 :                 if (talloc_str == NULL) {
   39854           0 :                         PyErr_NoMemory();
   39855           0 :                         return -1;
   39856             :                 }
   39857           0 :                 object->in.computername = talloc_str;
   39858             :         }
   39859           0 :         return 0;
   39860             : }
   39861             : 
   39862           0 : static PyObject *py_netr_DatabaseSync2_in_get_credential(PyObject *obj, void *closure)
   39863             : {
   39864           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39865           0 :         PyObject *py_credential;
   39866           0 :         if (object->in.credential == NULL) {
   39867           0 :                 Py_RETURN_NONE;
   39868             :         }
   39869           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   39870           0 :         return py_credential;
   39871             : }
   39872             : 
   39873           0 : static int py_netr_DatabaseSync2_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   39874             : {
   39875           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39876           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   39877           0 :         if (value == NULL) {
   39878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   39879           0 :                 return -1;
   39880             :         }
   39881           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   39882           0 :         if (object->in.credential == NULL) {
   39883           0 :                 PyErr_NoMemory();
   39884           0 :                 return -1;
   39885             :         }
   39886           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   39887           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39888           0 :                 PyErr_NoMemory();
   39889           0 :                 return -1;
   39890             :         }
   39891           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   39892           0 :         return 0;
   39893             : }
   39894             : 
   39895           0 : static PyObject *py_netr_DatabaseSync2_in_get_return_authenticator(PyObject *obj, void *closure)
   39896             : {
   39897           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39898           0 :         PyObject *py_return_authenticator;
   39899           0 :         if (object->in.return_authenticator == NULL) {
   39900           0 :                 Py_RETURN_NONE;
   39901             :         }
   39902           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   39903           0 :         return py_return_authenticator;
   39904             : }
   39905             : 
   39906           0 : static int py_netr_DatabaseSync2_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   39907             : {
   39908           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39909           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   39910           0 :         if (value == NULL) {
   39911           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   39912           0 :                 return -1;
   39913             :         }
   39914           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   39915           0 :         if (object->in.return_authenticator == NULL) {
   39916           0 :                 PyErr_NoMemory();
   39917           0 :                 return -1;
   39918             :         }
   39919           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   39920           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39921           0 :                 PyErr_NoMemory();
   39922           0 :                 return -1;
   39923             :         }
   39924           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   39925           0 :         return 0;
   39926             : }
   39927             : 
   39928           0 : static PyObject *py_netr_DatabaseSync2_out_get_return_authenticator(PyObject *obj, void *closure)
   39929             : {
   39930           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39931           0 :         PyObject *py_return_authenticator;
   39932           0 :         if (object->out.return_authenticator == NULL) {
   39933           0 :                 Py_RETURN_NONE;
   39934             :         }
   39935           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   39936           0 :         return py_return_authenticator;
   39937             : }
   39938             : 
   39939           0 : static int py_netr_DatabaseSync2_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   39940             : {
   39941           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39942           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   39943           0 :         if (value == NULL) {
   39944           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   39945           0 :                 return -1;
   39946             :         }
   39947           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   39948           0 :         if (object->out.return_authenticator == NULL) {
   39949           0 :                 PyErr_NoMemory();
   39950           0 :                 return -1;
   39951             :         }
   39952           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   39953           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39954           0 :                 PyErr_NoMemory();
   39955           0 :                 return -1;
   39956             :         }
   39957           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   39958           0 :         return 0;
   39959             : }
   39960             : 
   39961           0 : static PyObject *py_netr_DatabaseSync2_in_get_database_id(PyObject *obj, void *closure)
   39962             : {
   39963           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39964           0 :         PyObject *py_database_id;
   39965           0 :         py_database_id = PyLong_FromUnsignedLongLong((uint32_t)object->in.database_id);
   39966           0 :         return py_database_id;
   39967             : }
   39968             : 
   39969           0 : static int py_netr_DatabaseSync2_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
   39970             : {
   39971           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39972           0 :         if (value == NULL) {
   39973           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.database_id");
   39974           0 :                 return -1;
   39975             :         }
   39976             :         {
   39977           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
   39978           0 :                 if (PyLong_Check(value)) {
   39979           0 :                         unsigned long long test_var;
   39980           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39981           0 :                         if (PyErr_Occurred() != NULL) {
   39982           0 :                                 return -1;
   39983             :                         }
   39984           0 :                         if (test_var > uint_max) {
   39985           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39986             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39987           0 :                                 return -1;
   39988             :                         }
   39989           0 :                         object->in.database_id = test_var;
   39990             :                 } else {
   39991           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39992             :                           PyLong_Type.tp_name);
   39993           0 :                         return -1;
   39994             :                 }
   39995             :         }
   39996           0 :         return 0;
   39997             : }
   39998             : 
   39999           0 : static PyObject *py_netr_DatabaseSync2_in_get_restart_state(PyObject *obj, void *closure)
   40000             : {
   40001           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   40002           0 :         PyObject *py_restart_state;
   40003           0 :         py_restart_state = PyLong_FromLong((uint16_t)object->in.restart_state);
   40004           0 :         return py_restart_state;
   40005             : }
   40006             : 
   40007           0 : static int py_netr_DatabaseSync2_in_set_restart_state(PyObject *py_obj, PyObject *value, void *closure)
   40008             : {
   40009           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40010           0 :         if (value == NULL) {
   40011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.restart_state");
   40012           0 :                 return -1;
   40013             :         }
   40014             :         {
   40015           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.restart_state));
   40016           0 :                 if (PyLong_Check(value)) {
   40017           0 :                         unsigned long long test_var;
   40018           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40019           0 :                         if (PyErr_Occurred() != NULL) {
   40020           0 :                                 return -1;
   40021             :                         }
   40022           0 :                         if (test_var > uint_max) {
   40023           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40024             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40025           0 :                                 return -1;
   40026             :                         }
   40027           0 :                         object->in.restart_state = test_var;
   40028             :                 } else {
   40029           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40030             :                           PyLong_Type.tp_name);
   40031           0 :                         return -1;
   40032             :                 }
   40033             :         }
   40034           0 :         return 0;
   40035             : }
   40036             : 
   40037           0 : static PyObject *py_netr_DatabaseSync2_in_get_sync_context(PyObject *obj, void *closure)
   40038             : {
   40039           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   40040           0 :         PyObject *py_sync_context;
   40041           0 :         if (object->in.sync_context == NULL) {
   40042           0 :                 Py_RETURN_NONE;
   40043             :         }
   40044           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*object->in.sync_context);
   40045           0 :         return py_sync_context;
   40046             : }
   40047             : 
   40048           0 : static int py_netr_DatabaseSync2_in_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   40049             : {
   40050           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40051           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sync_context));
   40052           0 :         if (value == NULL) {
   40053           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sync_context");
   40054           0 :                 return -1;
   40055             :         }
   40056           0 :         object->in.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sync_context);
   40057           0 :         if (object->in.sync_context == NULL) {
   40058           0 :                 PyErr_NoMemory();
   40059           0 :                 return -1;
   40060             :         }
   40061             :         {
   40062           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sync_context));
   40063           0 :                 if (PyLong_Check(value)) {
   40064           0 :                         unsigned long long test_var;
   40065           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40066           0 :                         if (PyErr_Occurred() != NULL) {
   40067           0 :                                 return -1;
   40068             :                         }
   40069           0 :                         if (test_var > uint_max) {
   40070           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40071             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40072           0 :                                 return -1;
   40073             :                         }
   40074           0 :                         *object->in.sync_context = test_var;
   40075             :                 } else {
   40076           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40077             :                           PyLong_Type.tp_name);
   40078           0 :                         return -1;
   40079             :                 }
   40080             :         }
   40081           0 :         return 0;
   40082             : }
   40083             : 
   40084           0 : static PyObject *py_netr_DatabaseSync2_out_get_sync_context(PyObject *obj, void *closure)
   40085             : {
   40086           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   40087           0 :         PyObject *py_sync_context;
   40088           0 :         if (object->out.sync_context == NULL) {
   40089           0 :                 Py_RETURN_NONE;
   40090             :         }
   40091           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*object->out.sync_context);
   40092           0 :         return py_sync_context;
   40093             : }
   40094             : 
   40095           0 : static int py_netr_DatabaseSync2_out_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   40096             : {
   40097           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40098           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sync_context));
   40099           0 :         if (value == NULL) {
   40100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sync_context");
   40101           0 :                 return -1;
   40102             :         }
   40103           0 :         object->out.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sync_context);
   40104           0 :         if (object->out.sync_context == NULL) {
   40105           0 :                 PyErr_NoMemory();
   40106           0 :                 return -1;
   40107             :         }
   40108             :         {
   40109           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sync_context));
   40110           0 :                 if (PyLong_Check(value)) {
   40111           0 :                         unsigned long long test_var;
   40112           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40113           0 :                         if (PyErr_Occurred() != NULL) {
   40114           0 :                                 return -1;
   40115             :                         }
   40116           0 :                         if (test_var > uint_max) {
   40117           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40118             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40119           0 :                                 return -1;
   40120             :                         }
   40121           0 :                         *object->out.sync_context = test_var;
   40122             :                 } else {
   40123           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40124             :                           PyLong_Type.tp_name);
   40125           0 :                         return -1;
   40126             :                 }
   40127             :         }
   40128           0 :         return 0;
   40129             : }
   40130             : 
   40131           0 : static PyObject *py_netr_DatabaseSync2_out_get_delta_enum_array(PyObject *obj, void *closure)
   40132             : {
   40133           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   40134           0 :         PyObject *py_delta_enum_array;
   40135           0 :         if (object->out.delta_enum_array == NULL) {
   40136           0 :                 Py_RETURN_NONE;
   40137             :         }
   40138           0 :         if (*object->out.delta_enum_array == NULL) {
   40139           0 :                 py_delta_enum_array = Py_None;
   40140           0 :                 Py_INCREF(py_delta_enum_array);
   40141             :         } else {
   40142           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   40143             :         }
   40144           0 :         return py_delta_enum_array;
   40145             : }
   40146             : 
   40147           0 : static int py_netr_DatabaseSync2_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   40148             : {
   40149           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40150           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   40151           0 :         if (value == NULL) {
   40152           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.delta_enum_array");
   40153           0 :                 return -1;
   40154             :         }
   40155           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   40156           0 :         if (object->out.delta_enum_array == NULL) {
   40157           0 :                 PyErr_NoMemory();
   40158           0 :                 return -1;
   40159             :         }
   40160           0 :         if (value == Py_None) {
   40161           0 :                 *object->out.delta_enum_array = NULL;
   40162             :         } else {
   40163           0 :                 *object->out.delta_enum_array = NULL;
   40164           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   40165           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40166           0 :                         PyErr_NoMemory();
   40167           0 :                         return -1;
   40168             :                 }
   40169           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   40170             :         }
   40171           0 :         return 0;
   40172             : }
   40173             : 
   40174           0 : static PyObject *py_netr_DatabaseSync2_in_get_preferredmaximumlength(PyObject *obj, void *closure)
   40175             : {
   40176           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   40177           0 :         PyObject *py_preferredmaximumlength;
   40178           0 :         py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)object->in.preferredmaximumlength);
   40179           0 :         return py_preferredmaximumlength;
   40180             : }
   40181             : 
   40182           0 : static int py_netr_DatabaseSync2_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
   40183             : {
   40184           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40185           0 :         if (value == NULL) {
   40186           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.preferredmaximumlength");
   40187           0 :                 return -1;
   40188             :         }
   40189             :         {
   40190           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
   40191           0 :                 if (PyLong_Check(value)) {
   40192           0 :                         unsigned long long test_var;
   40193           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40194           0 :                         if (PyErr_Occurred() != NULL) {
   40195           0 :                                 return -1;
   40196             :                         }
   40197           0 :                         if (test_var > uint_max) {
   40198           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40199             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40200           0 :                                 return -1;
   40201             :                         }
   40202           0 :                         object->in.preferredmaximumlength = test_var;
   40203             :                 } else {
   40204           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40205             :                           PyLong_Type.tp_name);
   40206           0 :                         return -1;
   40207             :                 }
   40208             :         }
   40209           0 :         return 0;
   40210             : }
   40211             : 
   40212           0 : static PyObject *py_netr_DatabaseSync2_get_result(PyObject *obj, void *closure)
   40213             : {
   40214           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   40215           0 :         PyObject *py_result;
   40216           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   40217           0 :         return py_result;
   40218             : }
   40219             : 
   40220           0 : static int py_netr_DatabaseSync2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   40221             : {
   40222           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40223           0 :         if (value == NULL) {
   40224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   40225           0 :                 return -1;
   40226             :         }
   40227           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   40228           0 :         return 0;
   40229             : }
   40230             : 
   40231             : static PyGetSetDef py_netr_DatabaseSync2_getsetters[] = {
   40232             :         {
   40233             :                 .name = discard_const_p(char, "in_logon_server"),
   40234             :                 .get = py_netr_DatabaseSync2_in_get_logon_server,
   40235             :                 .set = py_netr_DatabaseSync2_in_set_logon_server,
   40236             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   40237             :         },
   40238             :         {
   40239             :                 .name = discard_const_p(char, "in_computername"),
   40240             :                 .get = py_netr_DatabaseSync2_in_get_computername,
   40241             :                 .set = py_netr_DatabaseSync2_in_set_computername,
   40242             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   40243             :         },
   40244             :         {
   40245             :                 .name = discard_const_p(char, "in_credential"),
   40246             :                 .get = py_netr_DatabaseSync2_in_get_credential,
   40247             :                 .set = py_netr_DatabaseSync2_in_set_credential,
   40248             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   40249             :         },
   40250             :         {
   40251             :                 .name = discard_const_p(char, "in_return_authenticator"),
   40252             :                 .get = py_netr_DatabaseSync2_in_get_return_authenticator,
   40253             :                 .set = py_netr_DatabaseSync2_in_set_return_authenticator,
   40254             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   40255             :         },
   40256             :         {
   40257             :                 .name = discard_const_p(char, "out_return_authenticator"),
   40258             :                 .get = py_netr_DatabaseSync2_out_get_return_authenticator,
   40259             :                 .set = py_netr_DatabaseSync2_out_set_return_authenticator,
   40260             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   40261             :         },
   40262             :         {
   40263             :                 .name = discard_const_p(char, "in_database_id"),
   40264             :                 .get = py_netr_DatabaseSync2_in_get_database_id,
   40265             :                 .set = py_netr_DatabaseSync2_in_set_database_id,
   40266             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
   40267             :         },
   40268             :         {
   40269             :                 .name = discard_const_p(char, "in_restart_state"),
   40270             :                 .get = py_netr_DatabaseSync2_in_get_restart_state,
   40271             :                 .set = py_netr_DatabaseSync2_in_set_restart_state,
   40272             :                 .doc = discard_const_p(char, "PIDL-generated element of base type SyncStateEnum")
   40273             :         },
   40274             :         {
   40275             :                 .name = discard_const_p(char, "in_sync_context"),
   40276             :                 .get = py_netr_DatabaseSync2_in_get_sync_context,
   40277             :                 .set = py_netr_DatabaseSync2_in_set_sync_context,
   40278             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40279             :         },
   40280             :         {
   40281             :                 .name = discard_const_p(char, "out_sync_context"),
   40282             :                 .get = py_netr_DatabaseSync2_out_get_sync_context,
   40283             :                 .set = py_netr_DatabaseSync2_out_set_sync_context,
   40284             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40285             :         },
   40286             :         {
   40287             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   40288             :                 .get = py_netr_DatabaseSync2_out_get_delta_enum_array,
   40289             :                 .set = py_netr_DatabaseSync2_out_set_delta_enum_array,
   40290             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   40291             :         },
   40292             :         {
   40293             :                 .name = discard_const_p(char, "in_preferredmaximumlength"),
   40294             :                 .get = py_netr_DatabaseSync2_in_get_preferredmaximumlength,
   40295             :                 .set = py_netr_DatabaseSync2_in_set_preferredmaximumlength,
   40296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40297             :         },
   40298             :         {
   40299             :                 .name = discard_const_p(char, "result"),
   40300             :                 .get = py_netr_DatabaseSync2_get_result,
   40301             :                 .set = py_netr_DatabaseSync2_set_result,
   40302             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   40303             :         },
   40304             :         { .name = NULL }
   40305             : };
   40306             : 
   40307           0 : static PyObject *py_netr_DatabaseSync2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   40308             : {
   40309           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseSync2, type);
   40310           0 :         struct netr_DatabaseSync2 *_self = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(self);
   40311           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   40312           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   40313           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   40314           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   40315           0 :         _self->in.sync_context = talloc_zero(mem_ctx, uint32_t);
   40316           0 :         _self->out.sync_context = talloc_zero(mem_ctx, uint32_t);
   40317             :         /* a pointer to a NULL pointer */
   40318           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   40319           0 :         return self;
   40320             : }
   40321             : 
   40322           0 : static PyObject *py_netr_DatabaseSync2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   40323             : {
   40324             : 
   40325             : 
   40326           0 :         return PyLong_FromLong(16);
   40327             : }
   40328             : 
   40329           0 : static PyObject *py_netr_DatabaseSync2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   40330             : {
   40331           0 :         const struct ndr_interface_call *call = NULL;
   40332           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40333           0 :         PyObject *ret = NULL;
   40334           0 :         struct ndr_push *push = NULL;
   40335           0 :         DATA_BLOB blob;
   40336           0 :         enum ndr_err_code err;
   40337             : 
   40338           0 :         if (ndr_table_netlogon.num_calls < 17) {
   40339           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_pack");
   40340           0 :                 return NULL;
   40341             :         }
   40342           0 :         call = &ndr_table_netlogon.calls[16];
   40343             : 
   40344           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   40345           0 :         if (push == NULL) {
   40346           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40347           0 :                 return NULL;
   40348             :         }
   40349             : 
   40350           0 :         push->flags |= ndr_push_flags;
   40351             : 
   40352           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   40353           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40354           0 :                 TALLOC_FREE(push);
   40355           0 :                 PyErr_SetNdrError(err);
   40356           0 :                 return NULL;
   40357             :         }
   40358           0 :         blob = ndr_push_blob(push);
   40359           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   40360           0 :         TALLOC_FREE(push);
   40361           0 :         return ret;
   40362             : }
   40363             : 
   40364           0 : static PyObject *py_netr_DatabaseSync2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40365             : {
   40366           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40367           0 :         PyObject *bigendian_obj = NULL;
   40368           0 :         PyObject *ndr64_obj = NULL;
   40369           0 :         libndr_flags ndr_push_flags = 0;
   40370             : 
   40371           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   40372             :                 discard_const_p(char *, kwnames),
   40373             :                 &bigendian_obj,
   40374             :                 &ndr64_obj)) {
   40375           0 :                 return NULL;
   40376             :         }
   40377             : 
   40378           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40379           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40380             :         }
   40381           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40382           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40383             :         }
   40384             : 
   40385           0 :         return py_netr_DatabaseSync2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   40386             : }
   40387             : 
   40388           0 : static PyObject *py_netr_DatabaseSync2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40389             : {
   40390           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40391           0 :         PyObject *bigendian_obj = NULL;
   40392           0 :         PyObject *ndr64_obj = NULL;
   40393           0 :         libndr_flags ndr_push_flags = 0;
   40394             : 
   40395           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   40396             :                 discard_const_p(char *, kwnames),
   40397             :                 &bigendian_obj,
   40398             :                 &ndr64_obj)) {
   40399           0 :                 return NULL;
   40400             :         }
   40401             : 
   40402           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40403           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40404             :         }
   40405           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40406           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40407             :         }
   40408             : 
   40409           0 :         return py_netr_DatabaseSync2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   40410             : }
   40411             : 
   40412           0 : static PyObject *py_netr_DatabaseSync2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   40413             : {
   40414           0 :         const struct ndr_interface_call *call = NULL;
   40415           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40416           0 :         struct ndr_pull *pull = NULL;
   40417           0 :         enum ndr_err_code err;
   40418             : 
   40419           0 :         if (ndr_table_netlogon.num_calls < 17) {
   40420           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_unpack");
   40421           0 :                 return NULL;
   40422             :         }
   40423           0 :         call = &ndr_table_netlogon.calls[16];
   40424             : 
   40425           0 :         pull = ndr_pull_init_blob(blob, object);
   40426           0 :         if (pull == NULL) {
   40427           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40428           0 :                 return NULL;
   40429             :         }
   40430             : 
   40431           0 :         pull->flags |= ndr_pull_flags;
   40432             : 
   40433           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   40434           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40435           0 :                 TALLOC_FREE(pull);
   40436           0 :                 PyErr_SetNdrError(err);
   40437           0 :                 return NULL;
   40438             :         }
   40439           0 :         if (!allow_remaining) {
   40440           0 :                 uint32_t highest_ofs;
   40441             : 
   40442           0 :                 if (pull->offset > pull->relative_highest_offset) {
   40443           0 :                         highest_ofs = pull->offset;
   40444             :                 } else {
   40445           0 :                         highest_ofs = pull->relative_highest_offset;
   40446             :                 }
   40447           0 :                 if (highest_ofs < pull->data_size) {
   40448           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   40449             :                                 "not all bytes consumed ofs[%u] size[%u]",
   40450             :                                 highest_ofs, pull->data_size);
   40451           0 :                         TALLOC_FREE(pull);
   40452           0 :                         PyErr_SetNdrError(err);
   40453           0 :                         return NULL;
   40454             :                 }
   40455             :         }
   40456             : 
   40457           0 :         TALLOC_FREE(pull);
   40458           0 :         Py_RETURN_NONE;
   40459             : }
   40460             : 
   40461           0 : static PyObject *py_netr_DatabaseSync2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40462             : {
   40463           0 :         DATA_BLOB blob;
   40464           0 :         Py_ssize_t blob_length = 0;
   40465           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40466           0 :         PyObject *bigendian_obj = NULL;
   40467           0 :         PyObject *ndr64_obj = NULL;
   40468           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40469           0 :         PyObject *allow_remaining_obj = NULL;
   40470           0 :         bool allow_remaining = false;
   40471             : 
   40472           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   40473             :                 discard_const_p(char *, kwnames),
   40474             :                 &blob.data, &blob_length,
   40475             :                 &bigendian_obj,
   40476             :                 &ndr64_obj,
   40477             :                 &allow_remaining_obj)) {
   40478           0 :                 return NULL;
   40479             :         }
   40480           0 :         blob.length = blob_length;
   40481             : 
   40482           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40483           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40484             :         }
   40485           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40486           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40487             :         }
   40488             : 
   40489           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40490           0 :                 allow_remaining = true;
   40491             :         }
   40492             : 
   40493           0 :         return py_netr_DatabaseSync2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   40494             : }
   40495             : 
   40496           0 : static PyObject *py_netr_DatabaseSync2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40497             : {
   40498           0 :         DATA_BLOB blob;
   40499           0 :         Py_ssize_t blob_length = 0;
   40500           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40501           0 :         PyObject *bigendian_obj = NULL;
   40502           0 :         PyObject *ndr64_obj = NULL;
   40503           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40504           0 :         PyObject *allow_remaining_obj = NULL;
   40505           0 :         bool allow_remaining = false;
   40506             : 
   40507           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   40508             :                 discard_const_p(char *, kwnames),
   40509             :                 &blob.data, &blob_length,
   40510             :                 &bigendian_obj,
   40511             :                 &ndr64_obj,
   40512             :                 &allow_remaining_obj)) {
   40513           0 :                 return NULL;
   40514             :         }
   40515           0 :         blob.length = blob_length;
   40516             : 
   40517           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40518           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40519             :         }
   40520           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40521           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40522             :         }
   40523             : 
   40524           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40525           0 :                 allow_remaining = true;
   40526             :         }
   40527             : 
   40528           0 :         return py_netr_DatabaseSync2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   40529             : }
   40530             : 
   40531           0 : static PyObject *py_netr_DatabaseSync2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   40532             : {
   40533           0 :         const struct ndr_interface_call *call = NULL;
   40534           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40535           0 :         PyObject *ret;
   40536           0 :         char *retstr;
   40537             : 
   40538           0 :         if (ndr_table_netlogon.num_calls < 17) {
   40539           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_print");
   40540           0 :                 return NULL;
   40541             :         }
   40542           0 :         call = &ndr_table_netlogon.calls[16];
   40543             : 
   40544           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   40545           0 :         ret = PyUnicode_FromString(retstr);
   40546           0 :         TALLOC_FREE(retstr);
   40547             : 
   40548           0 :         return ret;
   40549             : }
   40550             : 
   40551           0 : static PyObject *py_netr_DatabaseSync2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40552             : {
   40553           0 :         return py_netr_DatabaseSync2_ndr_print(py_obj, "netr_DatabaseSync2_in", NDR_IN);
   40554             : }
   40555             : 
   40556           0 : static PyObject *py_netr_DatabaseSync2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40557             : {
   40558           0 :         return py_netr_DatabaseSync2_ndr_print(py_obj, "netr_DatabaseSync2_out", NDR_OUT);
   40559             : }
   40560             : 
   40561             : static PyMethodDef py_netr_DatabaseSync2_methods[] = {
   40562             :         { "opnum", (PyCFunction)py_netr_DatabaseSync2_ndr_opnum, METH_NOARGS|METH_CLASS,
   40563             :                 "netlogon.netr_DatabaseSync2.opnum() -> 16 (0x10) " },
   40564             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   40565             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   40566             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   40567             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   40568             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   40569             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   40570             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   40571             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   40572             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseSync2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   40573             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseSync2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   40574             :         { NULL, NULL, 0, NULL }
   40575             : };
   40576             : 
   40577             : 
   40578             : static PyTypeObject netr_DatabaseSync2_Type = {
   40579             :         PyVarObject_HEAD_INIT(NULL, 0)
   40580             :         .tp_name = "netlogon.netr_DatabaseSync2",
   40581             :         .tp_getset = py_netr_DatabaseSync2_getsetters,
   40582             :         .tp_methods = py_netr_DatabaseSync2_methods,
   40583             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   40584             :         .tp_new = py_netr_DatabaseSync2_new,
   40585             : };
   40586             : 
   40587           0 : static bool pack_py_netr_DatabaseSync2_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseSync2 *r)
   40588             : {
   40589           0 :         PyObject *py_logon_server;
   40590           0 :         PyObject *py_computername;
   40591           0 :         PyObject *py_credential;
   40592           0 :         PyObject *py_return_authenticator;
   40593           0 :         PyObject *py_database_id;
   40594           0 :         PyObject *py_restart_state;
   40595           0 :         PyObject *py_sync_context;
   40596           0 :         PyObject *py_preferredmaximumlength;
   40597           0 :         const char *kwnames[] = {
   40598             :                 "logon_server", "computername", "credential", "return_authenticator", "database_id", "restart_state", "sync_context", "preferredmaximumlength", NULL
   40599             :         };
   40600             : 
   40601           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:netr_DatabaseSync2", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_database_id, &py_restart_state, &py_sync_context, &py_preferredmaximumlength)) {
   40602           0 :                 return false;
   40603             :         }
   40604             : 
   40605           0 :         if (py_logon_server == NULL) {
   40606           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   40607           0 :                 return false;
   40608             :         }
   40609           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   40610           0 :         if (r->in.logon_server == NULL) {
   40611           0 :                 PyErr_NoMemory();
   40612           0 :                 return false;
   40613             :         }
   40614             :         {
   40615           0 :                 const char *test_str;
   40616           0 :                 const char *talloc_str;
   40617           0 :                 PyObject *unicode = NULL;
   40618           0 :                 if (PyUnicode_Check(py_logon_server)) {
   40619           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   40620           0 :                         if (unicode == NULL) {
   40621           0 :                                 PyErr_NoMemory();
   40622           0 :                                 return false;
   40623             :                         }
   40624           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40625           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   40626           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   40627             :                 } else {
   40628           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   40629           0 :                         return false;
   40630             :                 }
   40631           0 :                 talloc_str = talloc_strdup(r, test_str);
   40632           0 :                 if (unicode != NULL) {
   40633           0 :                         Py_DECREF(unicode);
   40634             :                 }
   40635           0 :                 if (talloc_str == NULL) {
   40636           0 :                         PyErr_NoMemory();
   40637           0 :                         return false;
   40638             :                 }
   40639           0 :                 r->in.logon_server = talloc_str;
   40640             :         }
   40641           0 :         if (py_computername == NULL) {
   40642           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   40643           0 :                 return false;
   40644             :         }
   40645           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   40646           0 :         if (r->in.computername == NULL) {
   40647           0 :                 PyErr_NoMemory();
   40648           0 :                 return false;
   40649             :         }
   40650             :         {
   40651           0 :                 const char *test_str;
   40652           0 :                 const char *talloc_str;
   40653           0 :                 PyObject *unicode = NULL;
   40654           0 :                 if (PyUnicode_Check(py_computername)) {
   40655           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   40656           0 :                         if (unicode == NULL) {
   40657           0 :                                 PyErr_NoMemory();
   40658           0 :                                 return false;
   40659             :                         }
   40660           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40661           0 :                 } else if (PyBytes_Check(py_computername)) {
   40662           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   40663             :                 } else {
   40664           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   40665           0 :                         return false;
   40666             :                 }
   40667           0 :                 talloc_str = talloc_strdup(r, test_str);
   40668           0 :                 if (unicode != NULL) {
   40669           0 :                         Py_DECREF(unicode);
   40670             :                 }
   40671           0 :                 if (talloc_str == NULL) {
   40672           0 :                         PyErr_NoMemory();
   40673           0 :                         return false;
   40674             :                 }
   40675           0 :                 r->in.computername = talloc_str;
   40676             :         }
   40677           0 :         if (py_credential == NULL) {
   40678           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   40679           0 :                 return false;
   40680             :         }
   40681           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   40682           0 :         if (r->in.credential == NULL) {
   40683           0 :                 PyErr_NoMemory();
   40684           0 :                 return false;
   40685             :         }
   40686           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   40687           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   40688           0 :                 PyErr_NoMemory();
   40689           0 :                 return false;
   40690             :         }
   40691           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   40692           0 :         if (py_return_authenticator == NULL) {
   40693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   40694           0 :                 return false;
   40695             :         }
   40696           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   40697           0 :         if (r->in.return_authenticator == NULL) {
   40698           0 :                 PyErr_NoMemory();
   40699           0 :                 return false;
   40700             :         }
   40701           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   40702           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   40703           0 :                 PyErr_NoMemory();
   40704           0 :                 return false;
   40705             :         }
   40706           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   40707           0 :         if (py_database_id == NULL) {
   40708           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.database_id");
   40709           0 :                 return false;
   40710             :         }
   40711             :         {
   40712           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
   40713           0 :                 if (PyLong_Check(py_database_id)) {
   40714           0 :                         unsigned long long test_var;
   40715           0 :                         test_var = PyLong_AsUnsignedLongLong(py_database_id);
   40716           0 :                         if (PyErr_Occurred() != NULL) {
   40717           0 :                                 return false;
   40718             :                         }
   40719           0 :                         if (test_var > uint_max) {
   40720           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40721             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40722           0 :                                 return false;
   40723             :                         }
   40724           0 :                         r->in.database_id = test_var;
   40725             :                 } else {
   40726           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40727             :                           PyLong_Type.tp_name);
   40728           0 :                         return false;
   40729             :                 }
   40730             :         }
   40731           0 :         if (py_restart_state == NULL) {
   40732           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.restart_state");
   40733           0 :                 return false;
   40734             :         }
   40735             :         {
   40736           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.restart_state));
   40737           0 :                 if (PyLong_Check(py_restart_state)) {
   40738           0 :                         unsigned long long test_var;
   40739           0 :                         test_var = PyLong_AsUnsignedLongLong(py_restart_state);
   40740           0 :                         if (PyErr_Occurred() != NULL) {
   40741           0 :                                 return false;
   40742             :                         }
   40743           0 :                         if (test_var > uint_max) {
   40744           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40745             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40746           0 :                                 return false;
   40747             :                         }
   40748           0 :                         r->in.restart_state = test_var;
   40749             :                 } else {
   40750           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40751             :                           PyLong_Type.tp_name);
   40752           0 :                         return false;
   40753             :                 }
   40754             :         }
   40755           0 :         if (py_sync_context == NULL) {
   40756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sync_context");
   40757           0 :                 return false;
   40758             :         }
   40759           0 :         r->in.sync_context = talloc_ptrtype(r, r->in.sync_context);
   40760           0 :         if (r->in.sync_context == NULL) {
   40761           0 :                 PyErr_NoMemory();
   40762           0 :                 return false;
   40763             :         }
   40764             :         {
   40765           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sync_context));
   40766           0 :                 if (PyLong_Check(py_sync_context)) {
   40767           0 :                         unsigned long long test_var;
   40768           0 :                         test_var = PyLong_AsUnsignedLongLong(py_sync_context);
   40769           0 :                         if (PyErr_Occurred() != NULL) {
   40770           0 :                                 return false;
   40771             :                         }
   40772           0 :                         if (test_var > uint_max) {
   40773           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40774             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40775           0 :                                 return false;
   40776             :                         }
   40777           0 :                         *r->in.sync_context = test_var;
   40778             :                 } else {
   40779           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40780             :                           PyLong_Type.tp_name);
   40781           0 :                         return false;
   40782             :                 }
   40783             :         }
   40784           0 :         if (py_preferredmaximumlength == NULL) {
   40785           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.preferredmaximumlength");
   40786           0 :                 return false;
   40787             :         }
   40788             :         {
   40789           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
   40790           0 :                 if (PyLong_Check(py_preferredmaximumlength)) {
   40791           0 :                         unsigned long long test_var;
   40792           0 :                         test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
   40793           0 :                         if (PyErr_Occurred() != NULL) {
   40794           0 :                                 return false;
   40795             :                         }
   40796           0 :                         if (test_var > uint_max) {
   40797           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40798             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40799           0 :                                 return false;
   40800             :                         }
   40801           0 :                         r->in.preferredmaximumlength = test_var;
   40802             :                 } else {
   40803           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40804             :                           PyLong_Type.tp_name);
   40805           0 :                         return false;
   40806             :                 }
   40807             :         }
   40808           0 :         return true;
   40809             : }
   40810             : 
   40811           0 : static PyObject *unpack_py_netr_DatabaseSync2_args_out(struct netr_DatabaseSync2 *r)
   40812             : {
   40813           0 :         PyObject *result;
   40814           0 :         PyObject *py_return_authenticator;
   40815           0 :         PyObject *py_sync_context;
   40816           0 :         PyObject *py_delta_enum_array;
   40817           0 :         result = PyTuple_New(3);
   40818           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   40819           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   40820           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*r->out.sync_context);
   40821           0 :         PyTuple_SetItem(result, 1, py_sync_context);
   40822           0 :         if (*r->out.delta_enum_array == NULL) {
   40823           0 :                 py_delta_enum_array = Py_None;
   40824           0 :                 Py_INCREF(py_delta_enum_array);
   40825             :         } else {
   40826           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   40827             :         }
   40828           0 :         PyTuple_SetItem(result, 2, py_delta_enum_array);
   40829           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   40830           0 :                 PyErr_SetNTSTATUS(r->out.result);
   40831           0 :                 return NULL;
   40832             :         }
   40833             : 
   40834           0 :         return result;
   40835             : }
   40836             : 
   40837             : 
   40838           0 : static PyObject *py_netr_DatabaseRedo_in_get_logon_server(PyObject *obj, void *closure)
   40839             : {
   40840           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40841           0 :         PyObject *py_logon_server;
   40842           0 :         if (object->in.logon_server == NULL) {
   40843           0 :                 Py_RETURN_NONE;
   40844             :         }
   40845           0 :         if (object->in.logon_server == NULL) {
   40846           0 :                 py_logon_server = Py_None;
   40847           0 :                 Py_INCREF(py_logon_server);
   40848             :         } else {
   40849           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   40850             :         }
   40851           0 :         return py_logon_server;
   40852             : }
   40853             : 
   40854           0 : static int py_netr_DatabaseRedo_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   40855             : {
   40856           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40857           0 :         if (value == NULL) {
   40858           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   40859           0 :                 return -1;
   40860             :         }
   40861           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   40862           0 :         if (object->in.logon_server == NULL) {
   40863           0 :                 PyErr_NoMemory();
   40864           0 :                 return -1;
   40865             :         }
   40866             :         {
   40867           0 :                 const char *test_str;
   40868           0 :                 const char *talloc_str;
   40869           0 :                 PyObject *unicode = NULL;
   40870           0 :                 if (PyUnicode_Check(value)) {
   40871           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   40872           0 :                         if (unicode == NULL) {
   40873           0 :                                 PyErr_NoMemory();
   40874           0 :                                 return -1;
   40875             :                         }
   40876           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40877           0 :                 } else if (PyBytes_Check(value)) {
   40878           0 :                         test_str = PyBytes_AS_STRING(value);
   40879             :                 } else {
   40880           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   40881           0 :                         return -1;
   40882             :                 }
   40883           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   40884           0 :                 if (unicode != NULL) {
   40885           0 :                         Py_DECREF(unicode);
   40886             :                 }
   40887           0 :                 if (talloc_str == NULL) {
   40888           0 :                         PyErr_NoMemory();
   40889           0 :                         return -1;
   40890             :                 }
   40891           0 :                 object->in.logon_server = talloc_str;
   40892             :         }
   40893           0 :         return 0;
   40894             : }
   40895             : 
   40896           0 : static PyObject *py_netr_DatabaseRedo_in_get_computername(PyObject *obj, void *closure)
   40897             : {
   40898           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40899           0 :         PyObject *py_computername;
   40900           0 :         if (object->in.computername == NULL) {
   40901           0 :                 Py_RETURN_NONE;
   40902             :         }
   40903           0 :         if (object->in.computername == NULL) {
   40904           0 :                 py_computername = Py_None;
   40905           0 :                 Py_INCREF(py_computername);
   40906             :         } else {
   40907           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   40908             :         }
   40909           0 :         return py_computername;
   40910             : }
   40911             : 
   40912           0 : static int py_netr_DatabaseRedo_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   40913             : {
   40914           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40915           0 :         if (value == NULL) {
   40916           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   40917           0 :                 return -1;
   40918             :         }
   40919           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   40920           0 :         if (object->in.computername == NULL) {
   40921           0 :                 PyErr_NoMemory();
   40922           0 :                 return -1;
   40923             :         }
   40924             :         {
   40925           0 :                 const char *test_str;
   40926           0 :                 const char *talloc_str;
   40927           0 :                 PyObject *unicode = NULL;
   40928           0 :                 if (PyUnicode_Check(value)) {
   40929           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   40930           0 :                         if (unicode == NULL) {
   40931           0 :                                 PyErr_NoMemory();
   40932           0 :                                 return -1;
   40933             :                         }
   40934           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40935           0 :                 } else if (PyBytes_Check(value)) {
   40936           0 :                         test_str = PyBytes_AS_STRING(value);
   40937             :                 } else {
   40938           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   40939           0 :                         return -1;
   40940             :                 }
   40941           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   40942           0 :                 if (unicode != NULL) {
   40943           0 :                         Py_DECREF(unicode);
   40944             :                 }
   40945           0 :                 if (talloc_str == NULL) {
   40946           0 :                         PyErr_NoMemory();
   40947           0 :                         return -1;
   40948             :                 }
   40949           0 :                 object->in.computername = talloc_str;
   40950             :         }
   40951           0 :         return 0;
   40952             : }
   40953             : 
   40954           0 : static PyObject *py_netr_DatabaseRedo_in_get_credential(PyObject *obj, void *closure)
   40955             : {
   40956           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40957           0 :         PyObject *py_credential;
   40958           0 :         if (object->in.credential == NULL) {
   40959           0 :                 Py_RETURN_NONE;
   40960             :         }
   40961           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   40962           0 :         return py_credential;
   40963             : }
   40964             : 
   40965           0 : static int py_netr_DatabaseRedo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   40966             : {
   40967           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40968           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   40969           0 :         if (value == NULL) {
   40970           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   40971           0 :                 return -1;
   40972             :         }
   40973           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   40974           0 :         if (object->in.credential == NULL) {
   40975           0 :                 PyErr_NoMemory();
   40976           0 :                 return -1;
   40977             :         }
   40978           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   40979           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40980           0 :                 PyErr_NoMemory();
   40981           0 :                 return -1;
   40982             :         }
   40983           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   40984           0 :         return 0;
   40985             : }
   40986             : 
   40987           0 : static PyObject *py_netr_DatabaseRedo_in_get_return_authenticator(PyObject *obj, void *closure)
   40988             : {
   40989           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40990           0 :         PyObject *py_return_authenticator;
   40991           0 :         if (object->in.return_authenticator == NULL) {
   40992           0 :                 Py_RETURN_NONE;
   40993             :         }
   40994           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   40995           0 :         return py_return_authenticator;
   40996             : }
   40997             : 
   40998           0 : static int py_netr_DatabaseRedo_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   40999             : {
   41000           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41001           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   41002           0 :         if (value == NULL) {
   41003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   41004           0 :                 return -1;
   41005             :         }
   41006           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   41007           0 :         if (object->in.return_authenticator == NULL) {
   41008           0 :                 PyErr_NoMemory();
   41009           0 :                 return -1;
   41010             :         }
   41011           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   41012           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41013           0 :                 PyErr_NoMemory();
   41014           0 :                 return -1;
   41015             :         }
   41016           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   41017           0 :         return 0;
   41018             : }
   41019             : 
   41020           0 : static PyObject *py_netr_DatabaseRedo_out_get_return_authenticator(PyObject *obj, void *closure)
   41021             : {
   41022           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   41023           0 :         PyObject *py_return_authenticator;
   41024           0 :         if (object->out.return_authenticator == NULL) {
   41025           0 :                 Py_RETURN_NONE;
   41026             :         }
   41027           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   41028           0 :         return py_return_authenticator;
   41029             : }
   41030             : 
   41031           0 : static int py_netr_DatabaseRedo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   41032             : {
   41033           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41034           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   41035           0 :         if (value == NULL) {
   41036           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   41037           0 :                 return -1;
   41038             :         }
   41039           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   41040           0 :         if (object->out.return_authenticator == NULL) {
   41041           0 :                 PyErr_NoMemory();
   41042           0 :                 return -1;
   41043             :         }
   41044           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   41045           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41046           0 :                 PyErr_NoMemory();
   41047           0 :                 return -1;
   41048             :         }
   41049           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   41050           0 :         return 0;
   41051             : }
   41052             : 
   41053           0 : static PyObject *py_netr_DatabaseRedo_in_get_change_log_entry(PyObject *obj, void *closure)
   41054             : {
   41055           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   41056           0 :         PyObject *py_change_log_entry;
   41057           0 :         py_change_log_entry = pytalloc_reference_ex(&netr_ChangeLogEntry_Type, pytalloc_get_mem_ctx(obj), &object->in.change_log_entry);
   41058           0 :         return py_change_log_entry;
   41059             : }
   41060             : 
   41061           0 : static int py_netr_DatabaseRedo_in_set_change_log_entry(PyObject *py_obj, PyObject *value, void *closure)
   41062             : {
   41063           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41064           0 :         if (value == NULL) {
   41065           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.change_log_entry");
   41066           0 :                 return -1;
   41067             :         }
   41068           0 :         PY_CHECK_TYPE(&netr_ChangeLogEntry_Type, value, return -1;);
   41069           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41070           0 :                 PyErr_NoMemory();
   41071           0 :                 return -1;
   41072             :         }
   41073           0 :         object->in.change_log_entry = *(struct netr_ChangeLogEntry *)pytalloc_get_ptr(value);
   41074           0 :         return 0;
   41075             : }
   41076             : 
   41077           0 : static PyObject *py_netr_DatabaseRedo_in_get_change_log_entry_size(PyObject *obj, void *closure)
   41078             : {
   41079           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   41080           0 :         PyObject *py_change_log_entry_size;
   41081           0 :         py_change_log_entry_size = PyLong_FromUnsignedLongLong((uint32_t)object->in.change_log_entry_size);
   41082           0 :         return py_change_log_entry_size;
   41083             : }
   41084             : 
   41085           0 : static int py_netr_DatabaseRedo_in_set_change_log_entry_size(PyObject *py_obj, PyObject *value, void *closure)
   41086             : {
   41087           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41088           0 :         if (value == NULL) {
   41089           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.change_log_entry_size");
   41090           0 :                 return -1;
   41091             :         }
   41092             :         {
   41093           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.change_log_entry_size));
   41094           0 :                 if (PyLong_Check(value)) {
   41095           0 :                         unsigned long long test_var;
   41096           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41097           0 :                         if (PyErr_Occurred() != NULL) {
   41098           0 :                                 return -1;
   41099             :                         }
   41100           0 :                         if (test_var > uint_max) {
   41101           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41102             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41103           0 :                                 return -1;
   41104             :                         }
   41105           0 :                         object->in.change_log_entry_size = test_var;
   41106             :                 } else {
   41107           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41108             :                           PyLong_Type.tp_name);
   41109           0 :                         return -1;
   41110             :                 }
   41111             :         }
   41112           0 :         return 0;
   41113             : }
   41114             : 
   41115           0 : static PyObject *py_netr_DatabaseRedo_out_get_delta_enum_array(PyObject *obj, void *closure)
   41116             : {
   41117           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   41118           0 :         PyObject *py_delta_enum_array;
   41119           0 :         if (object->out.delta_enum_array == NULL) {
   41120           0 :                 Py_RETURN_NONE;
   41121             :         }
   41122           0 :         if (*object->out.delta_enum_array == NULL) {
   41123           0 :                 py_delta_enum_array = Py_None;
   41124           0 :                 Py_INCREF(py_delta_enum_array);
   41125             :         } else {
   41126           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   41127             :         }
   41128           0 :         return py_delta_enum_array;
   41129             : }
   41130             : 
   41131           0 : static int py_netr_DatabaseRedo_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   41132             : {
   41133           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41134           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   41135           0 :         if (value == NULL) {
   41136           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.delta_enum_array");
   41137           0 :                 return -1;
   41138             :         }
   41139           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   41140           0 :         if (object->out.delta_enum_array == NULL) {
   41141           0 :                 PyErr_NoMemory();
   41142           0 :                 return -1;
   41143             :         }
   41144           0 :         if (value == Py_None) {
   41145           0 :                 *object->out.delta_enum_array = NULL;
   41146             :         } else {
   41147           0 :                 *object->out.delta_enum_array = NULL;
   41148           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   41149           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41150           0 :                         PyErr_NoMemory();
   41151           0 :                         return -1;
   41152             :                 }
   41153           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   41154             :         }
   41155           0 :         return 0;
   41156             : }
   41157             : 
   41158           0 : static PyObject *py_netr_DatabaseRedo_get_result(PyObject *obj, void *closure)
   41159             : {
   41160           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   41161           0 :         PyObject *py_result;
   41162           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   41163           0 :         return py_result;
   41164             : }
   41165             : 
   41166           0 : static int py_netr_DatabaseRedo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41167             : {
   41168           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41169           0 :         if (value == NULL) {
   41170           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   41171           0 :                 return -1;
   41172             :         }
   41173           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   41174           0 :         return 0;
   41175             : }
   41176             : 
   41177             : static PyGetSetDef py_netr_DatabaseRedo_getsetters[] = {
   41178             :         {
   41179             :                 .name = discard_const_p(char, "in_logon_server"),
   41180             :                 .get = py_netr_DatabaseRedo_in_get_logon_server,
   41181             :                 .set = py_netr_DatabaseRedo_in_set_logon_server,
   41182             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41183             :         },
   41184             :         {
   41185             :                 .name = discard_const_p(char, "in_computername"),
   41186             :                 .get = py_netr_DatabaseRedo_in_get_computername,
   41187             :                 .set = py_netr_DatabaseRedo_in_set_computername,
   41188             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41189             :         },
   41190             :         {
   41191             :                 .name = discard_const_p(char, "in_credential"),
   41192             :                 .get = py_netr_DatabaseRedo_in_get_credential,
   41193             :                 .set = py_netr_DatabaseRedo_in_set_credential,
   41194             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   41195             :         },
   41196             :         {
   41197             :                 .name = discard_const_p(char, "in_return_authenticator"),
   41198             :                 .get = py_netr_DatabaseRedo_in_get_return_authenticator,
   41199             :                 .set = py_netr_DatabaseRedo_in_set_return_authenticator,
   41200             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   41201             :         },
   41202             :         {
   41203             :                 .name = discard_const_p(char, "out_return_authenticator"),
   41204             :                 .get = py_netr_DatabaseRedo_out_get_return_authenticator,
   41205             :                 .set = py_netr_DatabaseRedo_out_set_return_authenticator,
   41206             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   41207             :         },
   41208             :         {
   41209             :                 .name = discard_const_p(char, "in_change_log_entry"),
   41210             :                 .get = py_netr_DatabaseRedo_in_get_change_log_entry,
   41211             :                 .set = py_netr_DatabaseRedo_in_set_change_log_entry,
   41212             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogEntry")
   41213             :         },
   41214             :         {
   41215             :                 .name = discard_const_p(char, "in_change_log_entry_size"),
   41216             :                 .get = py_netr_DatabaseRedo_in_get_change_log_entry_size,
   41217             :                 .set = py_netr_DatabaseRedo_in_set_change_log_entry_size,
   41218             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41219             :         },
   41220             :         {
   41221             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   41222             :                 .get = py_netr_DatabaseRedo_out_get_delta_enum_array,
   41223             :                 .set = py_netr_DatabaseRedo_out_set_delta_enum_array,
   41224             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   41225             :         },
   41226             :         {
   41227             :                 .name = discard_const_p(char, "result"),
   41228             :                 .get = py_netr_DatabaseRedo_get_result,
   41229             :                 .set = py_netr_DatabaseRedo_set_result,
   41230             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   41231             :         },
   41232             :         { .name = NULL }
   41233             : };
   41234             : 
   41235           0 : static PyObject *py_netr_DatabaseRedo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   41236             : {
   41237           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseRedo, type);
   41238           0 :         struct netr_DatabaseRedo *_self = (struct netr_DatabaseRedo *)pytalloc_get_ptr(self);
   41239           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   41240           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   41241           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   41242           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   41243             :         /* a pointer to a NULL pointer */
   41244           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   41245           0 :         return self;
   41246             : }
   41247             : 
   41248           0 : static PyObject *py_netr_DatabaseRedo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   41249             : {
   41250             : 
   41251             : 
   41252           0 :         return PyLong_FromLong(17);
   41253             : }
   41254             : 
   41255           0 : static PyObject *py_netr_DatabaseRedo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   41256             : {
   41257           0 :         const struct ndr_interface_call *call = NULL;
   41258           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41259           0 :         PyObject *ret = NULL;
   41260           0 :         struct ndr_push *push = NULL;
   41261           0 :         DATA_BLOB blob;
   41262           0 :         enum ndr_err_code err;
   41263             : 
   41264           0 :         if (ndr_table_netlogon.num_calls < 18) {
   41265           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_pack");
   41266           0 :                 return NULL;
   41267             :         }
   41268           0 :         call = &ndr_table_netlogon.calls[17];
   41269             : 
   41270           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   41271           0 :         if (push == NULL) {
   41272           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41273           0 :                 return NULL;
   41274             :         }
   41275             : 
   41276           0 :         push->flags |= ndr_push_flags;
   41277             : 
   41278           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   41279           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41280           0 :                 TALLOC_FREE(push);
   41281           0 :                 PyErr_SetNdrError(err);
   41282           0 :                 return NULL;
   41283             :         }
   41284           0 :         blob = ndr_push_blob(push);
   41285           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   41286           0 :         TALLOC_FREE(push);
   41287           0 :         return ret;
   41288             : }
   41289             : 
   41290           0 : static PyObject *py_netr_DatabaseRedo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41291             : {
   41292           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41293           0 :         PyObject *bigendian_obj = NULL;
   41294           0 :         PyObject *ndr64_obj = NULL;
   41295           0 :         libndr_flags ndr_push_flags = 0;
   41296             : 
   41297           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   41298             :                 discard_const_p(char *, kwnames),
   41299             :                 &bigendian_obj,
   41300             :                 &ndr64_obj)) {
   41301           0 :                 return NULL;
   41302             :         }
   41303             : 
   41304           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41305           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41306             :         }
   41307           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41308           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41309             :         }
   41310             : 
   41311           0 :         return py_netr_DatabaseRedo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   41312             : }
   41313             : 
   41314           0 : static PyObject *py_netr_DatabaseRedo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41315             : {
   41316           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41317           0 :         PyObject *bigendian_obj = NULL;
   41318           0 :         PyObject *ndr64_obj = NULL;
   41319           0 :         libndr_flags ndr_push_flags = 0;
   41320             : 
   41321           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   41322             :                 discard_const_p(char *, kwnames),
   41323             :                 &bigendian_obj,
   41324             :                 &ndr64_obj)) {
   41325           0 :                 return NULL;
   41326             :         }
   41327             : 
   41328           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41329           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41330             :         }
   41331           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41332           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41333             :         }
   41334             : 
   41335           0 :         return py_netr_DatabaseRedo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   41336             : }
   41337             : 
   41338           0 : static PyObject *py_netr_DatabaseRedo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   41339             : {
   41340           0 :         const struct ndr_interface_call *call = NULL;
   41341           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41342           0 :         struct ndr_pull *pull = NULL;
   41343           0 :         enum ndr_err_code err;
   41344             : 
   41345           0 :         if (ndr_table_netlogon.num_calls < 18) {
   41346           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_unpack");
   41347           0 :                 return NULL;
   41348             :         }
   41349           0 :         call = &ndr_table_netlogon.calls[17];
   41350             : 
   41351           0 :         pull = ndr_pull_init_blob(blob, object);
   41352           0 :         if (pull == NULL) {
   41353           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41354           0 :                 return NULL;
   41355             :         }
   41356             : 
   41357           0 :         pull->flags |= ndr_pull_flags;
   41358             : 
   41359           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   41360           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41361           0 :                 TALLOC_FREE(pull);
   41362           0 :                 PyErr_SetNdrError(err);
   41363           0 :                 return NULL;
   41364             :         }
   41365           0 :         if (!allow_remaining) {
   41366           0 :                 uint32_t highest_ofs;
   41367             : 
   41368           0 :                 if (pull->offset > pull->relative_highest_offset) {
   41369           0 :                         highest_ofs = pull->offset;
   41370             :                 } else {
   41371           0 :                         highest_ofs = pull->relative_highest_offset;
   41372             :                 }
   41373           0 :                 if (highest_ofs < pull->data_size) {
   41374           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   41375             :                                 "not all bytes consumed ofs[%u] size[%u]",
   41376             :                                 highest_ofs, pull->data_size);
   41377           0 :                         TALLOC_FREE(pull);
   41378           0 :                         PyErr_SetNdrError(err);
   41379           0 :                         return NULL;
   41380             :                 }
   41381             :         }
   41382             : 
   41383           0 :         TALLOC_FREE(pull);
   41384           0 :         Py_RETURN_NONE;
   41385             : }
   41386             : 
   41387           0 : static PyObject *py_netr_DatabaseRedo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41388             : {
   41389           0 :         DATA_BLOB blob;
   41390           0 :         Py_ssize_t blob_length = 0;
   41391           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41392           0 :         PyObject *bigendian_obj = NULL;
   41393           0 :         PyObject *ndr64_obj = NULL;
   41394           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41395           0 :         PyObject *allow_remaining_obj = NULL;
   41396           0 :         bool allow_remaining = false;
   41397             : 
   41398           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   41399             :                 discard_const_p(char *, kwnames),
   41400             :                 &blob.data, &blob_length,
   41401             :                 &bigendian_obj,
   41402             :                 &ndr64_obj,
   41403             :                 &allow_remaining_obj)) {
   41404           0 :                 return NULL;
   41405             :         }
   41406           0 :         blob.length = blob_length;
   41407             : 
   41408           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41409           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41410             :         }
   41411           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41412           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41413             :         }
   41414             : 
   41415           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41416           0 :                 allow_remaining = true;
   41417             :         }
   41418             : 
   41419           0 :         return py_netr_DatabaseRedo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   41420             : }
   41421             : 
   41422           0 : static PyObject *py_netr_DatabaseRedo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41423             : {
   41424           0 :         DATA_BLOB blob;
   41425           0 :         Py_ssize_t blob_length = 0;
   41426           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41427           0 :         PyObject *bigendian_obj = NULL;
   41428           0 :         PyObject *ndr64_obj = NULL;
   41429           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41430           0 :         PyObject *allow_remaining_obj = NULL;
   41431           0 :         bool allow_remaining = false;
   41432             : 
   41433           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   41434             :                 discard_const_p(char *, kwnames),
   41435             :                 &blob.data, &blob_length,
   41436             :                 &bigendian_obj,
   41437             :                 &ndr64_obj,
   41438             :                 &allow_remaining_obj)) {
   41439           0 :                 return NULL;
   41440             :         }
   41441           0 :         blob.length = blob_length;
   41442             : 
   41443           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41444           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41445             :         }
   41446           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41447           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41448             :         }
   41449             : 
   41450           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41451           0 :                 allow_remaining = true;
   41452             :         }
   41453             : 
   41454           0 :         return py_netr_DatabaseRedo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   41455             : }
   41456             : 
   41457           0 : static PyObject *py_netr_DatabaseRedo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   41458             : {
   41459           0 :         const struct ndr_interface_call *call = NULL;
   41460           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41461           0 :         PyObject *ret;
   41462           0 :         char *retstr;
   41463             : 
   41464           0 :         if (ndr_table_netlogon.num_calls < 18) {
   41465           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_print");
   41466           0 :                 return NULL;
   41467             :         }
   41468           0 :         call = &ndr_table_netlogon.calls[17];
   41469             : 
   41470           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   41471           0 :         ret = PyUnicode_FromString(retstr);
   41472           0 :         TALLOC_FREE(retstr);
   41473             : 
   41474           0 :         return ret;
   41475             : }
   41476             : 
   41477           0 : static PyObject *py_netr_DatabaseRedo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41478             : {
   41479           0 :         return py_netr_DatabaseRedo_ndr_print(py_obj, "netr_DatabaseRedo_in", NDR_IN);
   41480             : }
   41481             : 
   41482           0 : static PyObject *py_netr_DatabaseRedo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41483             : {
   41484           0 :         return py_netr_DatabaseRedo_ndr_print(py_obj, "netr_DatabaseRedo_out", NDR_OUT);
   41485             : }
   41486             : 
   41487             : static PyMethodDef py_netr_DatabaseRedo_methods[] = {
   41488             :         { "opnum", (PyCFunction)py_netr_DatabaseRedo_ndr_opnum, METH_NOARGS|METH_CLASS,
   41489             :                 "netlogon.netr_DatabaseRedo.opnum() -> 17 (0x11) " },
   41490             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   41491             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   41492             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   41493             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   41494             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   41495             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   41496             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   41497             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   41498             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseRedo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   41499             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseRedo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   41500             :         { NULL, NULL, 0, NULL }
   41501             : };
   41502             : 
   41503             : 
   41504             : static PyTypeObject netr_DatabaseRedo_Type = {
   41505             :         PyVarObject_HEAD_INIT(NULL, 0)
   41506             :         .tp_name = "netlogon.netr_DatabaseRedo",
   41507             :         .tp_getset = py_netr_DatabaseRedo_getsetters,
   41508             :         .tp_methods = py_netr_DatabaseRedo_methods,
   41509             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   41510             :         .tp_new = py_netr_DatabaseRedo_new,
   41511             : };
   41512             : 
   41513           0 : static bool pack_py_netr_DatabaseRedo_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseRedo *r)
   41514             : {
   41515           0 :         PyObject *py_logon_server;
   41516           0 :         PyObject *py_computername;
   41517           0 :         PyObject *py_credential;
   41518           0 :         PyObject *py_return_authenticator;
   41519           0 :         PyObject *py_change_log_entry;
   41520           0 :         PyObject *py_change_log_entry_size;
   41521           0 :         const char *kwnames[] = {
   41522             :                 "logon_server", "computername", "credential", "return_authenticator", "change_log_entry", "change_log_entry_size", NULL
   41523             :         };
   41524             : 
   41525           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_DatabaseRedo", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_change_log_entry, &py_change_log_entry_size)) {
   41526           0 :                 return false;
   41527             :         }
   41528             : 
   41529           0 :         if (py_logon_server == NULL) {
   41530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   41531           0 :                 return false;
   41532             :         }
   41533           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   41534           0 :         if (r->in.logon_server == NULL) {
   41535           0 :                 PyErr_NoMemory();
   41536           0 :                 return false;
   41537             :         }
   41538             :         {
   41539           0 :                 const char *test_str;
   41540           0 :                 const char *talloc_str;
   41541           0 :                 PyObject *unicode = NULL;
   41542           0 :                 if (PyUnicode_Check(py_logon_server)) {
   41543           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   41544           0 :                         if (unicode == NULL) {
   41545           0 :                                 PyErr_NoMemory();
   41546           0 :                                 return false;
   41547             :                         }
   41548           0 :                         test_str = PyBytes_AS_STRING(unicode);
   41549           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   41550           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   41551             :                 } else {
   41552           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   41553           0 :                         return false;
   41554             :                 }
   41555           0 :                 talloc_str = talloc_strdup(r, test_str);
   41556           0 :                 if (unicode != NULL) {
   41557           0 :                         Py_DECREF(unicode);
   41558             :                 }
   41559           0 :                 if (talloc_str == NULL) {
   41560           0 :                         PyErr_NoMemory();
   41561           0 :                         return false;
   41562             :                 }
   41563           0 :                 r->in.logon_server = talloc_str;
   41564             :         }
   41565           0 :         if (py_computername == NULL) {
   41566           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   41567           0 :                 return false;
   41568             :         }
   41569           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   41570           0 :         if (r->in.computername == NULL) {
   41571           0 :                 PyErr_NoMemory();
   41572           0 :                 return false;
   41573             :         }
   41574             :         {
   41575           0 :                 const char *test_str;
   41576           0 :                 const char *talloc_str;
   41577           0 :                 PyObject *unicode = NULL;
   41578           0 :                 if (PyUnicode_Check(py_computername)) {
   41579           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   41580           0 :                         if (unicode == NULL) {
   41581           0 :                                 PyErr_NoMemory();
   41582           0 :                                 return false;
   41583             :                         }
   41584           0 :                         test_str = PyBytes_AS_STRING(unicode);
   41585           0 :                 } else if (PyBytes_Check(py_computername)) {
   41586           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   41587             :                 } else {
   41588           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   41589           0 :                         return false;
   41590             :                 }
   41591           0 :                 talloc_str = talloc_strdup(r, test_str);
   41592           0 :                 if (unicode != NULL) {
   41593           0 :                         Py_DECREF(unicode);
   41594             :                 }
   41595           0 :                 if (talloc_str == NULL) {
   41596           0 :                         PyErr_NoMemory();
   41597           0 :                         return false;
   41598             :                 }
   41599           0 :                 r->in.computername = talloc_str;
   41600             :         }
   41601           0 :         if (py_credential == NULL) {
   41602           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   41603           0 :                 return false;
   41604             :         }
   41605           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   41606           0 :         if (r->in.credential == NULL) {
   41607           0 :                 PyErr_NoMemory();
   41608           0 :                 return false;
   41609             :         }
   41610           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   41611           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   41612           0 :                 PyErr_NoMemory();
   41613           0 :                 return false;
   41614             :         }
   41615           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   41616           0 :         if (py_return_authenticator == NULL) {
   41617           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   41618           0 :                 return false;
   41619             :         }
   41620           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   41621           0 :         if (r->in.return_authenticator == NULL) {
   41622           0 :                 PyErr_NoMemory();
   41623           0 :                 return false;
   41624             :         }
   41625           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   41626           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   41627           0 :                 PyErr_NoMemory();
   41628           0 :                 return false;
   41629             :         }
   41630           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   41631           0 :         if (py_change_log_entry == NULL) {
   41632           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.change_log_entry");
   41633           0 :                 return false;
   41634             :         }
   41635           0 :         PY_CHECK_TYPE(&netr_ChangeLogEntry_Type, py_change_log_entry, return false;);
   41636           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_change_log_entry)) == NULL) {
   41637           0 :                 PyErr_NoMemory();
   41638           0 :                 return false;
   41639             :         }
   41640           0 :         r->in.change_log_entry = *(struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_change_log_entry);
   41641           0 :         if (py_change_log_entry_size == NULL) {
   41642           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.change_log_entry_size");
   41643           0 :                 return false;
   41644             :         }
   41645             :         {
   41646           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.change_log_entry_size));
   41647           0 :                 if (PyLong_Check(py_change_log_entry_size)) {
   41648           0 :                         unsigned long long test_var;
   41649           0 :                         test_var = PyLong_AsUnsignedLongLong(py_change_log_entry_size);
   41650           0 :                         if (PyErr_Occurred() != NULL) {
   41651           0 :                                 return false;
   41652             :                         }
   41653           0 :                         if (test_var > uint_max) {
   41654           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41655             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41656           0 :                                 return false;
   41657             :                         }
   41658           0 :                         r->in.change_log_entry_size = test_var;
   41659             :                 } else {
   41660           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41661             :                           PyLong_Type.tp_name);
   41662           0 :                         return false;
   41663             :                 }
   41664             :         }
   41665           0 :         return true;
   41666             : }
   41667             : 
   41668           0 : static PyObject *unpack_py_netr_DatabaseRedo_args_out(struct netr_DatabaseRedo *r)
   41669             : {
   41670           0 :         PyObject *result;
   41671           0 :         PyObject *py_return_authenticator;
   41672           0 :         PyObject *py_delta_enum_array;
   41673           0 :         result = PyTuple_New(2);
   41674           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   41675           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   41676           0 :         if (*r->out.delta_enum_array == NULL) {
   41677           0 :                 py_delta_enum_array = Py_None;
   41678           0 :                 Py_INCREF(py_delta_enum_array);
   41679             :         } else {
   41680           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   41681             :         }
   41682           0 :         PyTuple_SetItem(result, 1, py_delta_enum_array);
   41683           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   41684           0 :                 PyErr_SetNTSTATUS(r->out.result);
   41685           0 :                 return NULL;
   41686             :         }
   41687             : 
   41688           0 :         return result;
   41689             : }
   41690             : 
   41691             : 
   41692           0 : static PyObject *py_netr_LogonControl2Ex_in_get_logon_server(PyObject *obj, void *closure)
   41693             : {
   41694           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41695           0 :         PyObject *py_logon_server;
   41696           0 :         if (object->in.logon_server == NULL) {
   41697           0 :                 Py_RETURN_NONE;
   41698             :         }
   41699           0 :         if (object->in.logon_server == NULL) {
   41700           0 :                 py_logon_server = Py_None;
   41701           0 :                 Py_INCREF(py_logon_server);
   41702             :         } else {
   41703           0 :                 if (object->in.logon_server == NULL) {
   41704           0 :                         py_logon_server = Py_None;
   41705           0 :                         Py_INCREF(py_logon_server);
   41706             :                 } else {
   41707           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   41708             :                 }
   41709             :         }
   41710           0 :         return py_logon_server;
   41711             : }
   41712             : 
   41713           0 : static int py_netr_LogonControl2Ex_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   41714             : {
   41715           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41716           0 :         if (value == NULL) {
   41717           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   41718           0 :                 return -1;
   41719             :         }
   41720           0 :         if (value == Py_None) {
   41721           0 :                 object->in.logon_server = NULL;
   41722             :         } else {
   41723           0 :                 object->in.logon_server = NULL;
   41724             :                 {
   41725           0 :                         const char *test_str;
   41726           0 :                         const char *talloc_str;
   41727           0 :                         PyObject *unicode = NULL;
   41728           0 :                         if (PyUnicode_Check(value)) {
   41729           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   41730           0 :                                 if (unicode == NULL) {
   41731           0 :                                         PyErr_NoMemory();
   41732           0 :                                         return -1;
   41733             :                                 }
   41734           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   41735           0 :                         } else if (PyBytes_Check(value)) {
   41736           0 :                                 test_str = PyBytes_AS_STRING(value);
   41737             :                         } else {
   41738           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   41739           0 :                                 return -1;
   41740             :                         }
   41741           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   41742           0 :                         if (unicode != NULL) {
   41743           0 :                                 Py_DECREF(unicode);
   41744             :                         }
   41745           0 :                         if (talloc_str == NULL) {
   41746           0 :                                 PyErr_NoMemory();
   41747           0 :                                 return -1;
   41748             :                         }
   41749           0 :                         object->in.logon_server = talloc_str;
   41750             :                 }
   41751             :         }
   41752           0 :         return 0;
   41753             : }
   41754             : 
   41755           0 : static PyObject *py_netr_LogonControl2Ex_in_get_function_code(PyObject *obj, void *closure)
   41756             : {
   41757           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41758           0 :         PyObject *py_function_code;
   41759           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)object->in.function_code);
   41760           0 :         return py_function_code;
   41761             : }
   41762             : 
   41763           0 : static int py_netr_LogonControl2Ex_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   41764             : {
   41765           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41766           0 :         if (value == NULL) {
   41767           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.function_code");
   41768           0 :                 return -1;
   41769             :         }
   41770             :         {
   41771           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   41772           0 :                 if (PyLong_Check(value)) {
   41773           0 :                         unsigned long long test_var;
   41774           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41775           0 :                         if (PyErr_Occurred() != NULL) {
   41776           0 :                                 return -1;
   41777             :                         }
   41778           0 :                         if (test_var > uint_max) {
   41779           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41780             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41781           0 :                                 return -1;
   41782             :                         }
   41783           0 :                         object->in.function_code = test_var;
   41784             :                 } else {
   41785           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41786             :                           PyLong_Type.tp_name);
   41787           0 :                         return -1;
   41788             :                 }
   41789             :         }
   41790           0 :         return 0;
   41791             : }
   41792             : 
   41793           0 : static PyObject *py_netr_LogonControl2Ex_in_get_level(PyObject *obj, void *closure)
   41794             : {
   41795           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41796           0 :         PyObject *py_level;
   41797           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   41798           0 :         return py_level;
   41799             : }
   41800             : 
   41801           0 : static int py_netr_LogonControl2Ex_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   41802             : {
   41803           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41804           0 :         if (value == NULL) {
   41805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   41806           0 :                 return -1;
   41807             :         }
   41808             :         {
   41809           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   41810           0 :                 if (PyLong_Check(value)) {
   41811           0 :                         unsigned long long test_var;
   41812           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41813           0 :                         if (PyErr_Occurred() != NULL) {
   41814           0 :                                 return -1;
   41815             :                         }
   41816           0 :                         if (test_var > uint_max) {
   41817           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41818             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41819           0 :                                 return -1;
   41820             :                         }
   41821           0 :                         object->in.level = test_var;
   41822             :                 } else {
   41823           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41824             :                           PyLong_Type.tp_name);
   41825           0 :                         return -1;
   41826             :                 }
   41827             :         }
   41828           0 :         return 0;
   41829             : }
   41830             : 
   41831           0 : static PyObject *py_netr_LogonControl2Ex_in_get_data(PyObject *obj, void *closure)
   41832             : {
   41833           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41834           0 :         PyObject *py_data;
   41835           0 :         if (object->in.data == NULL) {
   41836           0 :                 Py_RETURN_NONE;
   41837             :         }
   41838           0 :         py_data = pyrpc_import_union(&netr_CONTROL_DATA_INFORMATION_Type, object->in.data, object->in.function_code, object->in.data, "union netr_CONTROL_DATA_INFORMATION");
   41839           0 :         if (py_data == NULL) {
   41840           0 :                 return NULL;
   41841             :         }
   41842           0 :         return py_data;
   41843             : }
   41844             : 
   41845           0 : static int py_netr_LogonControl2Ex_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
   41846             : {
   41847           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41848           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
   41849           0 :         if (value == NULL) {
   41850           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.data");
   41851           0 :                 return -1;
   41852             :         }
   41853           0 :         object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
   41854           0 :         if (object->in.data == NULL) {
   41855           0 :                 PyErr_NoMemory();
   41856           0 :                 return -1;
   41857             :         }
   41858             :         {
   41859           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   41860           0 :                 data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(&netr_CONTROL_DATA_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.function_code, value, "union netr_CONTROL_DATA_INFORMATION");
   41861           0 :                 if (data_switch_1 == NULL) {
   41862           0 :                         return -1;
   41863             :                 }
   41864           0 :                 object->in.data = data_switch_1;
   41865             :         }
   41866           0 :         return 0;
   41867             : }
   41868             : 
   41869           0 : static PyObject *py_netr_LogonControl2Ex_out_get_query(PyObject *obj, void *closure)
   41870             : {
   41871           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41872           0 :         PyObject *py_query;
   41873           0 :         if (object->out.query == NULL) {
   41874           0 :                 Py_RETURN_NONE;
   41875             :         }
   41876           0 :         py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, object->out.query, object->in.level, object->out.query, "union netr_CONTROL_QUERY_INFORMATION");
   41877           0 :         if (py_query == NULL) {
   41878           0 :                 return NULL;
   41879             :         }
   41880           0 :         return py_query;
   41881             : }
   41882             : 
   41883           0 : static int py_netr_LogonControl2Ex_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   41884             : {
   41885           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41886           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   41887           0 :         if (value == NULL) {
   41888           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.query");
   41889           0 :                 return -1;
   41890             :         }
   41891           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   41892           0 :         if (object->out.query == NULL) {
   41893           0 :                 PyErr_NoMemory();
   41894           0 :                 return -1;
   41895             :         }
   41896             :         {
   41897           0 :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   41898           0 :                 query_switch_1 = (union netr_CONTROL_QUERY_INFORMATION *)pyrpc_export_union(&netr_CONTROL_QUERY_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_CONTROL_QUERY_INFORMATION");
   41899           0 :                 if (query_switch_1 == NULL) {
   41900           0 :                         return -1;
   41901             :                 }
   41902           0 :                 object->out.query = query_switch_1;
   41903             :         }
   41904           0 :         return 0;
   41905             : }
   41906             : 
   41907           0 : static PyObject *py_netr_LogonControl2Ex_get_result(PyObject *obj, void *closure)
   41908             : {
   41909           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41910           0 :         PyObject *py_result;
   41911           0 :         py_result = PyErr_FromWERROR(object->out.result);
   41912           0 :         return py_result;
   41913             : }
   41914             : 
   41915           0 : static int py_netr_LogonControl2Ex_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41916             : {
   41917           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41918           0 :         if (value == NULL) {
   41919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   41920           0 :                 return -1;
   41921             :         }
   41922           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   41923           0 :         return 0;
   41924             : }
   41925             : 
   41926             : static PyGetSetDef py_netr_LogonControl2Ex_getsetters[] = {
   41927             :         {
   41928             :                 .name = discard_const_p(char, "in_logon_server"),
   41929             :                 .get = py_netr_LogonControl2Ex_in_get_logon_server,
   41930             :                 .set = py_netr_LogonControl2Ex_in_set_logon_server,
   41931             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41932             :         },
   41933             :         {
   41934             :                 .name = discard_const_p(char, "in_function_code"),
   41935             :                 .get = py_netr_LogonControl2Ex_in_get_function_code,
   41936             :                 .set = py_netr_LogonControl2Ex_in_set_function_code,
   41937             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   41938             :         },
   41939             :         {
   41940             :                 .name = discard_const_p(char, "in_level"),
   41941             :                 .get = py_netr_LogonControl2Ex_in_get_level,
   41942             :                 .set = py_netr_LogonControl2Ex_in_set_level,
   41943             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41944             :         },
   41945             :         {
   41946             :                 .name = discard_const_p(char, "in_data"),
   41947             :                 .get = py_netr_LogonControl2Ex_in_get_data,
   41948             :                 .set = py_netr_LogonControl2Ex_in_set_data,
   41949             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
   41950             :         },
   41951             :         {
   41952             :                 .name = discard_const_p(char, "out_query"),
   41953             :                 .get = py_netr_LogonControl2Ex_out_get_query,
   41954             :                 .set = py_netr_LogonControl2Ex_out_set_query,
   41955             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   41956             :         },
   41957             :         {
   41958             :                 .name = discard_const_p(char, "result"),
   41959             :                 .get = py_netr_LogonControl2Ex_get_result,
   41960             :                 .set = py_netr_LogonControl2Ex_set_result,
   41961             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   41962             :         },
   41963             :         { .name = NULL }
   41964             : };
   41965             : 
   41966           0 : static PyObject *py_netr_LogonControl2Ex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   41967             : {
   41968           0 :         PyObject *self = pytalloc_new(struct netr_LogonControl2Ex, type);
   41969           0 :         struct netr_LogonControl2Ex *_self = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(self);
   41970           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   41971           0 :         _self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   41972           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   41973           0 :         return self;
   41974             : }
   41975             : 
   41976           0 : static PyObject *py_netr_LogonControl2Ex_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   41977             : {
   41978             : 
   41979             : 
   41980           0 :         return PyLong_FromLong(18);
   41981             : }
   41982             : 
   41983           0 : static PyObject *py_netr_LogonControl2Ex_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   41984             : {
   41985           0 :         const struct ndr_interface_call *call = NULL;
   41986           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41987           0 :         PyObject *ret = NULL;
   41988           0 :         struct ndr_push *push = NULL;
   41989           0 :         DATA_BLOB blob;
   41990           0 :         enum ndr_err_code err;
   41991             : 
   41992           0 :         if (ndr_table_netlogon.num_calls < 19) {
   41993           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_pack");
   41994           0 :                 return NULL;
   41995             :         }
   41996           0 :         call = &ndr_table_netlogon.calls[18];
   41997             : 
   41998           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   41999           0 :         if (push == NULL) {
   42000           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42001           0 :                 return NULL;
   42002             :         }
   42003             : 
   42004           0 :         push->flags |= ndr_push_flags;
   42005             : 
   42006           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42007           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42008           0 :                 TALLOC_FREE(push);
   42009           0 :                 PyErr_SetNdrError(err);
   42010           0 :                 return NULL;
   42011             :         }
   42012           0 :         blob = ndr_push_blob(push);
   42013           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42014           0 :         TALLOC_FREE(push);
   42015           0 :         return ret;
   42016             : }
   42017             : 
   42018           0 : static PyObject *py_netr_LogonControl2Ex_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42019             : {
   42020           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42021           0 :         PyObject *bigendian_obj = NULL;
   42022           0 :         PyObject *ndr64_obj = NULL;
   42023           0 :         libndr_flags ndr_push_flags = 0;
   42024             : 
   42025           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42026             :                 discard_const_p(char *, kwnames),
   42027             :                 &bigendian_obj,
   42028             :                 &ndr64_obj)) {
   42029           0 :                 return NULL;
   42030             :         }
   42031             : 
   42032           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42033           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42034             :         }
   42035           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42036           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42037             :         }
   42038             : 
   42039           0 :         return py_netr_LogonControl2Ex_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42040             : }
   42041             : 
   42042           0 : static PyObject *py_netr_LogonControl2Ex_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42043             : {
   42044           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42045           0 :         PyObject *bigendian_obj = NULL;
   42046           0 :         PyObject *ndr64_obj = NULL;
   42047           0 :         libndr_flags ndr_push_flags = 0;
   42048             : 
   42049           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42050             :                 discard_const_p(char *, kwnames),
   42051             :                 &bigendian_obj,
   42052             :                 &ndr64_obj)) {
   42053           0 :                 return NULL;
   42054             :         }
   42055             : 
   42056           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42057           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42058             :         }
   42059           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42060           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42061             :         }
   42062             : 
   42063           0 :         return py_netr_LogonControl2Ex_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42064             : }
   42065             : 
   42066           0 : static PyObject *py_netr_LogonControl2Ex_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   42067             : {
   42068           0 :         const struct ndr_interface_call *call = NULL;
   42069           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   42070           0 :         struct ndr_pull *pull = NULL;
   42071           0 :         enum ndr_err_code err;
   42072             : 
   42073           0 :         if (ndr_table_netlogon.num_calls < 19) {
   42074           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_unpack");
   42075           0 :                 return NULL;
   42076             :         }
   42077           0 :         call = &ndr_table_netlogon.calls[18];
   42078             : 
   42079           0 :         pull = ndr_pull_init_blob(blob, object);
   42080           0 :         if (pull == NULL) {
   42081           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42082           0 :                 return NULL;
   42083             :         }
   42084             : 
   42085           0 :         pull->flags |= ndr_pull_flags;
   42086             : 
   42087           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42088           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42089           0 :                 TALLOC_FREE(pull);
   42090           0 :                 PyErr_SetNdrError(err);
   42091           0 :                 return NULL;
   42092             :         }
   42093           0 :         if (!allow_remaining) {
   42094           0 :                 uint32_t highest_ofs;
   42095             : 
   42096           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42097           0 :                         highest_ofs = pull->offset;
   42098             :                 } else {
   42099           0 :                         highest_ofs = pull->relative_highest_offset;
   42100             :                 }
   42101           0 :                 if (highest_ofs < pull->data_size) {
   42102           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42103             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42104             :                                 highest_ofs, pull->data_size);
   42105           0 :                         TALLOC_FREE(pull);
   42106           0 :                         PyErr_SetNdrError(err);
   42107           0 :                         return NULL;
   42108             :                 }
   42109             :         }
   42110             : 
   42111           0 :         TALLOC_FREE(pull);
   42112           0 :         Py_RETURN_NONE;
   42113             : }
   42114             : 
   42115           0 : static PyObject *py_netr_LogonControl2Ex_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42116             : {
   42117           0 :         DATA_BLOB blob;
   42118           0 :         Py_ssize_t blob_length = 0;
   42119           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42120           0 :         PyObject *bigendian_obj = NULL;
   42121           0 :         PyObject *ndr64_obj = NULL;
   42122           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42123           0 :         PyObject *allow_remaining_obj = NULL;
   42124           0 :         bool allow_remaining = false;
   42125             : 
   42126           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42127             :                 discard_const_p(char *, kwnames),
   42128             :                 &blob.data, &blob_length,
   42129             :                 &bigendian_obj,
   42130             :                 &ndr64_obj,
   42131             :                 &allow_remaining_obj)) {
   42132           0 :                 return NULL;
   42133             :         }
   42134           0 :         blob.length = blob_length;
   42135             : 
   42136           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42137           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42138             :         }
   42139           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42140           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42141             :         }
   42142             : 
   42143           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42144           0 :                 allow_remaining = true;
   42145             :         }
   42146             : 
   42147           0 :         return py_netr_LogonControl2Ex_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42148             : }
   42149             : 
   42150           0 : static PyObject *py_netr_LogonControl2Ex_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42151             : {
   42152           0 :         DATA_BLOB blob;
   42153           0 :         Py_ssize_t blob_length = 0;
   42154           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42155           0 :         PyObject *bigendian_obj = NULL;
   42156           0 :         PyObject *ndr64_obj = NULL;
   42157           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42158           0 :         PyObject *allow_remaining_obj = NULL;
   42159           0 :         bool allow_remaining = false;
   42160             : 
   42161           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42162             :                 discard_const_p(char *, kwnames),
   42163             :                 &blob.data, &blob_length,
   42164             :                 &bigendian_obj,
   42165             :                 &ndr64_obj,
   42166             :                 &allow_remaining_obj)) {
   42167           0 :                 return NULL;
   42168             :         }
   42169           0 :         blob.length = blob_length;
   42170             : 
   42171           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42172           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42173             :         }
   42174           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42175           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42176             :         }
   42177             : 
   42178           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42179           0 :                 allow_remaining = true;
   42180             :         }
   42181             : 
   42182           0 :         return py_netr_LogonControl2Ex_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42183             : }
   42184             : 
   42185           0 : static PyObject *py_netr_LogonControl2Ex_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   42186             : {
   42187           0 :         const struct ndr_interface_call *call = NULL;
   42188           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   42189           0 :         PyObject *ret;
   42190           0 :         char *retstr;
   42191             : 
   42192           0 :         if (ndr_table_netlogon.num_calls < 19) {
   42193           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_print");
   42194           0 :                 return NULL;
   42195             :         }
   42196           0 :         call = &ndr_table_netlogon.calls[18];
   42197             : 
   42198           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42199           0 :         ret = PyUnicode_FromString(retstr);
   42200           0 :         TALLOC_FREE(retstr);
   42201             : 
   42202           0 :         return ret;
   42203             : }
   42204             : 
   42205           0 : static PyObject *py_netr_LogonControl2Ex_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42206             : {
   42207           0 :         return py_netr_LogonControl2Ex_ndr_print(py_obj, "netr_LogonControl2Ex_in", NDR_IN);
   42208             : }
   42209             : 
   42210           0 : static PyObject *py_netr_LogonControl2Ex_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42211             : {
   42212           0 :         return py_netr_LogonControl2Ex_ndr_print(py_obj, "netr_LogonControl2Ex_out", NDR_OUT);
   42213             : }
   42214             : 
   42215             : static PyMethodDef py_netr_LogonControl2Ex_methods[] = {
   42216             :         { "opnum", (PyCFunction)py_netr_LogonControl2Ex_ndr_opnum, METH_NOARGS|METH_CLASS,
   42217             :                 "netlogon.netr_LogonControl2Ex.opnum() -> 18 (0x12) " },
   42218             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42219             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42220             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42221             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42222             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42223             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42224             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42225             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42226             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonControl2Ex_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42227             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonControl2Ex_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42228             :         { NULL, NULL, 0, NULL }
   42229             : };
   42230             : 
   42231             : 
   42232             : static PyTypeObject netr_LogonControl2Ex_Type = {
   42233             :         PyVarObject_HEAD_INIT(NULL, 0)
   42234             :         .tp_name = "netlogon.netr_LogonControl2Ex",
   42235             :         .tp_getset = py_netr_LogonControl2Ex_getsetters,
   42236             :         .tp_methods = py_netr_LogonControl2Ex_methods,
   42237             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42238             :         .tp_new = py_netr_LogonControl2Ex_new,
   42239             : };
   42240             : 
   42241          81 : static bool pack_py_netr_LogonControl2Ex_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl2Ex *r)
   42242             : {
   42243           0 :         PyObject *py_logon_server;
   42244           0 :         PyObject *py_function_code;
   42245           0 :         PyObject *py_level;
   42246           0 :         PyObject *py_data;
   42247          81 :         const char *kwnames[] = {
   42248             :                 "logon_server", "function_code", "level", "data", NULL
   42249             :         };
   42250             : 
   42251          81 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_LogonControl2Ex", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level, &py_data)) {
   42252           0 :                 return false;
   42253             :         }
   42254             : 
   42255          81 :         if (py_logon_server == NULL) {
   42256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   42257           0 :                 return false;
   42258             :         }
   42259          81 :         if (py_logon_server == Py_None) {
   42260           0 :                 r->in.logon_server = NULL;
   42261             :         } else {
   42262          81 :                 r->in.logon_server = NULL;
   42263             :                 {
   42264           0 :                         const char *test_str;
   42265           0 :                         const char *talloc_str;
   42266          81 :                         PyObject *unicode = NULL;
   42267          81 :                         if (PyUnicode_Check(py_logon_server)) {
   42268          81 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   42269          81 :                                 if (unicode == NULL) {
   42270           0 :                                         PyErr_NoMemory();
   42271           0 :                                         return false;
   42272             :                                 }
   42273          81 :                                 test_str = PyBytes_AS_STRING(unicode);
   42274           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   42275           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   42276             :                         } else {
   42277           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   42278           0 :                                 return false;
   42279             :                         }
   42280          81 :                         talloc_str = talloc_strdup(r, test_str);
   42281          81 :                         if (unicode != NULL) {
   42282          81 :                                 Py_DECREF(unicode);
   42283             :                         }
   42284          81 :                         if (talloc_str == NULL) {
   42285           0 :                                 PyErr_NoMemory();
   42286           0 :                                 return false;
   42287             :                         }
   42288          81 :                         r->in.logon_server = talloc_str;
   42289             :                 }
   42290             :         }
   42291          81 :         if (py_function_code == NULL) {
   42292           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.function_code");
   42293           0 :                 return false;
   42294             :         }
   42295             :         {
   42296          81 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   42297          81 :                 if (PyLong_Check(py_function_code)) {
   42298           0 :                         unsigned long long test_var;
   42299          81 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   42300          81 :                         if (PyErr_Occurred() != NULL) {
   42301           0 :                                 return false;
   42302             :                         }
   42303          81 :                         if (test_var > uint_max) {
   42304           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42305             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42306           0 :                                 return false;
   42307             :                         }
   42308          81 :                         r->in.function_code = test_var;
   42309             :                 } else {
   42310           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42311             :                           PyLong_Type.tp_name);
   42312           0 :                         return false;
   42313             :                 }
   42314             :         }
   42315          81 :         if (py_level == NULL) {
   42316           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   42317           0 :                 return false;
   42318             :         }
   42319             :         {
   42320          81 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   42321          81 :                 if (PyLong_Check(py_level)) {
   42322           0 :                         unsigned long long test_var;
   42323          81 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   42324          81 :                         if (PyErr_Occurred() != NULL) {
   42325           0 :                                 return false;
   42326             :                         }
   42327          81 :                         if (test_var > uint_max) {
   42328           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42329             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42330           0 :                                 return false;
   42331             :                         }
   42332          81 :                         r->in.level = test_var;
   42333             :                 } else {
   42334           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42335             :                           PyLong_Type.tp_name);
   42336           0 :                         return false;
   42337             :                 }
   42338             :         }
   42339          81 :         if (py_data == NULL) {
   42340           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.data");
   42341           0 :                 return false;
   42342             :         }
   42343          81 :         r->in.data = talloc_ptrtype(r, r->in.data);
   42344          81 :         if (r->in.data == NULL) {
   42345           0 :                 PyErr_NoMemory();
   42346           0 :                 return false;
   42347             :         }
   42348             :         {
   42349           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   42350          81 :                 data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(&netr_CONTROL_DATA_INFORMATION_Type, r, r->in.function_code, py_data, "union netr_CONTROL_DATA_INFORMATION");
   42351          81 :                 if (data_switch_1 == NULL) {
   42352           0 :                         return false;
   42353             :                 }
   42354          81 :                 r->in.data = data_switch_1;
   42355             :         }
   42356          81 :         return true;
   42357             : }
   42358             : 
   42359          81 : static PyObject *unpack_py_netr_LogonControl2Ex_args_out(struct netr_LogonControl2Ex *r)
   42360             : {
   42361           0 :         PyObject *result;
   42362           0 :         PyObject *py_query;
   42363          81 :         py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, r->out.query, r->in.level, r->out.query, "union netr_CONTROL_QUERY_INFORMATION");
   42364          81 :         if (py_query == NULL) {
   42365           0 :                 return NULL;
   42366             :         }
   42367          81 :         result = py_query;
   42368          81 :         if (!W_ERROR_IS_OK(r->out.result)) {
   42369           0 :                 PyErr_SetWERROR(r->out.result);
   42370           0 :                 return NULL;
   42371             :         }
   42372             : 
   42373          81 :         return result;
   42374             : }
   42375             : 
   42376             : 
   42377           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_in_get_server_name(PyObject *obj, void *closure)
   42378             : {
   42379           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(obj);
   42380           0 :         PyObject *py_server_name;
   42381           0 :         if (object->in.server_name == NULL) {
   42382           0 :                 Py_RETURN_NONE;
   42383             :         }
   42384           0 :         if (object->in.server_name == NULL) {
   42385           0 :                 py_server_name = Py_None;
   42386           0 :                 Py_INCREF(py_server_name);
   42387             :         } else {
   42388           0 :                 if (object->in.server_name == NULL) {
   42389           0 :                         py_server_name = Py_None;
   42390           0 :                         Py_INCREF(py_server_name);
   42391             :                 } else {
   42392           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   42393             :                 }
   42394             :         }
   42395           0 :         return py_server_name;
   42396             : }
   42397             : 
   42398           0 : static int py_netr_NetrEnumerateTrustedDomains_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   42399             : {
   42400           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42401           0 :         if (value == NULL) {
   42402           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   42403           0 :                 return -1;
   42404             :         }
   42405           0 :         if (value == Py_None) {
   42406           0 :                 object->in.server_name = NULL;
   42407             :         } else {
   42408           0 :                 object->in.server_name = NULL;
   42409             :                 {
   42410           0 :                         const char *test_str;
   42411           0 :                         const char *talloc_str;
   42412           0 :                         PyObject *unicode = NULL;
   42413           0 :                         if (PyUnicode_Check(value)) {
   42414           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42415           0 :                                 if (unicode == NULL) {
   42416           0 :                                         PyErr_NoMemory();
   42417           0 :                                         return -1;
   42418             :                                 }
   42419           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42420           0 :                         } else if (PyBytes_Check(value)) {
   42421           0 :                                 test_str = PyBytes_AS_STRING(value);
   42422             :                         } else {
   42423           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42424           0 :                                 return -1;
   42425             :                         }
   42426           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42427           0 :                         if (unicode != NULL) {
   42428           0 :                                 Py_DECREF(unicode);
   42429             :                         }
   42430           0 :                         if (talloc_str == NULL) {
   42431           0 :                                 PyErr_NoMemory();
   42432           0 :                                 return -1;
   42433             :                         }
   42434           0 :                         object->in.server_name = talloc_str;
   42435             :                 }
   42436             :         }
   42437           0 :         return 0;
   42438             : }
   42439             : 
   42440           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_out_get_trusted_domains_blob(PyObject *obj, void *closure)
   42441             : {
   42442           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(obj);
   42443           0 :         PyObject *py_trusted_domains_blob;
   42444           0 :         if (object->out.trusted_domains_blob == NULL) {
   42445           0 :                 Py_RETURN_NONE;
   42446             :         }
   42447           0 :         py_trusted_domains_blob = pytalloc_reference_ex(&netr_Blob_Type, object->out.trusted_domains_blob, object->out.trusted_domains_blob);
   42448           0 :         return py_trusted_domains_blob;
   42449             : }
   42450             : 
   42451           0 : static int py_netr_NetrEnumerateTrustedDomains_out_set_trusted_domains_blob(PyObject *py_obj, PyObject *value, void *closure)
   42452             : {
   42453           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42454           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trusted_domains_blob));
   42455           0 :         if (value == NULL) {
   42456           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.trusted_domains_blob");
   42457           0 :                 return -1;
   42458             :         }
   42459           0 :         object->out.trusted_domains_blob = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trusted_domains_blob);
   42460           0 :         if (object->out.trusted_domains_blob == NULL) {
   42461           0 :                 PyErr_NoMemory();
   42462           0 :                 return -1;
   42463             :         }
   42464           0 :         PY_CHECK_TYPE(&netr_Blob_Type, value, return -1;);
   42465           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42466           0 :                 PyErr_NoMemory();
   42467           0 :                 return -1;
   42468             :         }
   42469           0 :         object->out.trusted_domains_blob = (struct netr_Blob *)pytalloc_get_ptr(value);
   42470           0 :         return 0;
   42471             : }
   42472             : 
   42473           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_get_result(PyObject *obj, void *closure)
   42474             : {
   42475           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(obj);
   42476           0 :         PyObject *py_result;
   42477           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   42478           0 :         return py_result;
   42479             : }
   42480             : 
   42481           0 : static int py_netr_NetrEnumerateTrustedDomains_set_result(PyObject *py_obj, PyObject *value, void *closure)
   42482             : {
   42483           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42484           0 :         if (value == NULL) {
   42485           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   42486           0 :                 return -1;
   42487             :         }
   42488           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   42489           0 :         return 0;
   42490             : }
   42491             : 
   42492             : static PyGetSetDef py_netr_NetrEnumerateTrustedDomains_getsetters[] = {
   42493             :         {
   42494             :                 .name = discard_const_p(char, "in_server_name"),
   42495             :                 .get = py_netr_NetrEnumerateTrustedDomains_in_get_server_name,
   42496             :                 .set = py_netr_NetrEnumerateTrustedDomains_in_set_server_name,
   42497             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42498             :         },
   42499             :         {
   42500             :                 .name = discard_const_p(char, "out_trusted_domains_blob"),
   42501             :                 .get = py_netr_NetrEnumerateTrustedDomains_out_get_trusted_domains_blob,
   42502             :                 .set = py_netr_NetrEnumerateTrustedDomains_out_set_trusted_domains_blob,
   42503             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Blob")
   42504             :         },
   42505             :         {
   42506             :                 .name = discard_const_p(char, "result"),
   42507             :                 .get = py_netr_NetrEnumerateTrustedDomains_get_result,
   42508             :                 .set = py_netr_NetrEnumerateTrustedDomains_set_result,
   42509             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   42510             :         },
   42511             :         { .name = NULL }
   42512             : };
   42513             : 
   42514           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   42515             : {
   42516           0 :         PyObject *self = pytalloc_new(struct netr_NetrEnumerateTrustedDomains, type);
   42517           0 :         struct netr_NetrEnumerateTrustedDomains *_self = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(self);
   42518           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   42519           0 :         _self->out.trusted_domains_blob = talloc_zero(mem_ctx, struct netr_Blob);
   42520           0 :         return self;
   42521             : }
   42522             : 
   42523           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   42524             : {
   42525             : 
   42526             : 
   42527           0 :         return PyLong_FromLong(19);
   42528             : }
   42529             : 
   42530           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   42531             : {
   42532           0 :         const struct ndr_interface_call *call = NULL;
   42533           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42534           0 :         PyObject *ret = NULL;
   42535           0 :         struct ndr_push *push = NULL;
   42536           0 :         DATA_BLOB blob;
   42537           0 :         enum ndr_err_code err;
   42538             : 
   42539           0 :         if (ndr_table_netlogon.num_calls < 20) {
   42540           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_pack");
   42541           0 :                 return NULL;
   42542             :         }
   42543           0 :         call = &ndr_table_netlogon.calls[19];
   42544             : 
   42545           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   42546           0 :         if (push == NULL) {
   42547           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42548           0 :                 return NULL;
   42549             :         }
   42550             : 
   42551           0 :         push->flags |= ndr_push_flags;
   42552             : 
   42553           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42554           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42555           0 :                 TALLOC_FREE(push);
   42556           0 :                 PyErr_SetNdrError(err);
   42557           0 :                 return NULL;
   42558             :         }
   42559           0 :         blob = ndr_push_blob(push);
   42560           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42561           0 :         TALLOC_FREE(push);
   42562           0 :         return ret;
   42563             : }
   42564             : 
   42565           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42566             : {
   42567           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42568           0 :         PyObject *bigendian_obj = NULL;
   42569           0 :         PyObject *ndr64_obj = NULL;
   42570           0 :         libndr_flags ndr_push_flags = 0;
   42571             : 
   42572           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42573             :                 discard_const_p(char *, kwnames),
   42574             :                 &bigendian_obj,
   42575             :                 &ndr64_obj)) {
   42576           0 :                 return NULL;
   42577             :         }
   42578             : 
   42579           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42580           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42581             :         }
   42582           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42583           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42584             :         }
   42585             : 
   42586           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42587             : }
   42588             : 
   42589           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42590             : {
   42591           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42592           0 :         PyObject *bigendian_obj = NULL;
   42593           0 :         PyObject *ndr64_obj = NULL;
   42594           0 :         libndr_flags ndr_push_flags = 0;
   42595             : 
   42596           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42597             :                 discard_const_p(char *, kwnames),
   42598             :                 &bigendian_obj,
   42599             :                 &ndr64_obj)) {
   42600           0 :                 return NULL;
   42601             :         }
   42602             : 
   42603           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42604           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42605             :         }
   42606           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42607           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42608             :         }
   42609             : 
   42610           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42611             : }
   42612             : 
   42613           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   42614             : {
   42615           0 :         const struct ndr_interface_call *call = NULL;
   42616           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42617           0 :         struct ndr_pull *pull = NULL;
   42618           0 :         enum ndr_err_code err;
   42619             : 
   42620           0 :         if (ndr_table_netlogon.num_calls < 20) {
   42621           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_unpack");
   42622           0 :                 return NULL;
   42623             :         }
   42624           0 :         call = &ndr_table_netlogon.calls[19];
   42625             : 
   42626           0 :         pull = ndr_pull_init_blob(blob, object);
   42627           0 :         if (pull == NULL) {
   42628           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42629           0 :                 return NULL;
   42630             :         }
   42631             : 
   42632           0 :         pull->flags |= ndr_pull_flags;
   42633             : 
   42634           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42635           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42636           0 :                 TALLOC_FREE(pull);
   42637           0 :                 PyErr_SetNdrError(err);
   42638           0 :                 return NULL;
   42639             :         }
   42640           0 :         if (!allow_remaining) {
   42641           0 :                 uint32_t highest_ofs;
   42642             : 
   42643           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42644           0 :                         highest_ofs = pull->offset;
   42645             :                 } else {
   42646           0 :                         highest_ofs = pull->relative_highest_offset;
   42647             :                 }
   42648           0 :                 if (highest_ofs < pull->data_size) {
   42649           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42650             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42651             :                                 highest_ofs, pull->data_size);
   42652           0 :                         TALLOC_FREE(pull);
   42653           0 :                         PyErr_SetNdrError(err);
   42654           0 :                         return NULL;
   42655             :                 }
   42656             :         }
   42657             : 
   42658           0 :         TALLOC_FREE(pull);
   42659           0 :         Py_RETURN_NONE;
   42660             : }
   42661             : 
   42662           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42663             : {
   42664           0 :         DATA_BLOB blob;
   42665           0 :         Py_ssize_t blob_length = 0;
   42666           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42667           0 :         PyObject *bigendian_obj = NULL;
   42668           0 :         PyObject *ndr64_obj = NULL;
   42669           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42670           0 :         PyObject *allow_remaining_obj = NULL;
   42671           0 :         bool allow_remaining = false;
   42672             : 
   42673           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42674             :                 discard_const_p(char *, kwnames),
   42675             :                 &blob.data, &blob_length,
   42676             :                 &bigendian_obj,
   42677             :                 &ndr64_obj,
   42678             :                 &allow_remaining_obj)) {
   42679           0 :                 return NULL;
   42680             :         }
   42681           0 :         blob.length = blob_length;
   42682             : 
   42683           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42684           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42685             :         }
   42686           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42687           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42688             :         }
   42689             : 
   42690           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42691           0 :                 allow_remaining = true;
   42692             :         }
   42693             : 
   42694           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42695             : }
   42696             : 
   42697           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42698             : {
   42699           0 :         DATA_BLOB blob;
   42700           0 :         Py_ssize_t blob_length = 0;
   42701           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42702           0 :         PyObject *bigendian_obj = NULL;
   42703           0 :         PyObject *ndr64_obj = NULL;
   42704           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42705           0 :         PyObject *allow_remaining_obj = NULL;
   42706           0 :         bool allow_remaining = false;
   42707             : 
   42708           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42709             :                 discard_const_p(char *, kwnames),
   42710             :                 &blob.data, &blob_length,
   42711             :                 &bigendian_obj,
   42712             :                 &ndr64_obj,
   42713             :                 &allow_remaining_obj)) {
   42714           0 :                 return NULL;
   42715             :         }
   42716           0 :         blob.length = blob_length;
   42717             : 
   42718           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42719           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42720             :         }
   42721           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42722           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42723             :         }
   42724             : 
   42725           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42726           0 :                 allow_remaining = true;
   42727             :         }
   42728             : 
   42729           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42730             : }
   42731             : 
   42732           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   42733             : {
   42734           0 :         const struct ndr_interface_call *call = NULL;
   42735           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42736           0 :         PyObject *ret;
   42737           0 :         char *retstr;
   42738             : 
   42739           0 :         if (ndr_table_netlogon.num_calls < 20) {
   42740           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_print");
   42741           0 :                 return NULL;
   42742             :         }
   42743           0 :         call = &ndr_table_netlogon.calls[19];
   42744             : 
   42745           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42746           0 :         ret = PyUnicode_FromString(retstr);
   42747           0 :         TALLOC_FREE(retstr);
   42748             : 
   42749           0 :         return ret;
   42750             : }
   42751             : 
   42752           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42753             : {
   42754           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomains_in", NDR_IN);
   42755             : }
   42756             : 
   42757           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42758             : {
   42759           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomains_out", NDR_OUT);
   42760             : }
   42761             : 
   42762             : static PyMethodDef py_netr_NetrEnumerateTrustedDomains_methods[] = {
   42763             :         { "opnum", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_opnum, METH_NOARGS|METH_CLASS,
   42764             :                 "netlogon.netr_NetrEnumerateTrustedDomains.opnum() -> 19 (0x13) " },
   42765             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42766             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42767             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42768             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42769             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42770             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42771             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42772             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42773             :         { "__ndr_print_in__", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42774             :         { "__ndr_print_out__", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42775             :         { NULL, NULL, 0, NULL }
   42776             : };
   42777             : 
   42778             : 
   42779             : static PyTypeObject netr_NetrEnumerateTrustedDomains_Type = {
   42780             :         PyVarObject_HEAD_INIT(NULL, 0)
   42781             :         .tp_name = "netlogon.netr_NetrEnumerateTrustedDomains",
   42782             :         .tp_getset = py_netr_NetrEnumerateTrustedDomains_getsetters,
   42783             :         .tp_methods = py_netr_NetrEnumerateTrustedDomains_methods,
   42784             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42785             :         .tp_new = py_netr_NetrEnumerateTrustedDomains_new,
   42786             : };
   42787             : 
   42788           0 : static bool pack_py_netr_NetrEnumerateTrustedDomains_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrEnumerateTrustedDomains *r)
   42789             : {
   42790           0 :         PyObject *py_server_name;
   42791           0 :         const char *kwnames[] = {
   42792             :                 "server_name", NULL
   42793             :         };
   42794             : 
   42795           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_NetrEnumerateTrustedDomains", discard_const_p(char *, kwnames), &py_server_name)) {
   42796           0 :                 return false;
   42797             :         }
   42798             : 
   42799           0 :         if (py_server_name == NULL) {
   42800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   42801           0 :                 return false;
   42802             :         }
   42803           0 :         if (py_server_name == Py_None) {
   42804           0 :                 r->in.server_name = NULL;
   42805             :         } else {
   42806           0 :                 r->in.server_name = NULL;
   42807             :                 {
   42808           0 :                         const char *test_str;
   42809           0 :                         const char *talloc_str;
   42810           0 :                         PyObject *unicode = NULL;
   42811           0 :                         if (PyUnicode_Check(py_server_name)) {
   42812           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   42813           0 :                                 if (unicode == NULL) {
   42814           0 :                                         PyErr_NoMemory();
   42815           0 :                                         return false;
   42816             :                                 }
   42817           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42818           0 :                         } else if (PyBytes_Check(py_server_name)) {
   42819           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   42820             :                         } else {
   42821           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   42822           0 :                                 return false;
   42823             :                         }
   42824           0 :                         talloc_str = talloc_strdup(r, test_str);
   42825           0 :                         if (unicode != NULL) {
   42826           0 :                                 Py_DECREF(unicode);
   42827             :                         }
   42828           0 :                         if (talloc_str == NULL) {
   42829           0 :                                 PyErr_NoMemory();
   42830           0 :                                 return false;
   42831             :                         }
   42832           0 :                         r->in.server_name = talloc_str;
   42833             :                 }
   42834             :         }
   42835           0 :         return true;
   42836             : }
   42837             : 
   42838           0 : static PyObject *unpack_py_netr_NetrEnumerateTrustedDomains_args_out(struct netr_NetrEnumerateTrustedDomains *r)
   42839             : {
   42840           0 :         PyObject *result;
   42841           0 :         PyObject *py_trusted_domains_blob;
   42842           0 :         py_trusted_domains_blob = pytalloc_reference_ex(&netr_Blob_Type, r->out.trusted_domains_blob, r->out.trusted_domains_blob);
   42843           0 :         result = py_trusted_domains_blob;
   42844           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   42845           0 :                 PyErr_SetNTSTATUS(r->out.result);
   42846           0 :                 return NULL;
   42847             :         }
   42848             : 
   42849           0 :         return result;
   42850             : }
   42851             : 
   42852             : 
   42853           0 : static PyObject *py_netr_DsRGetDCName_in_get_server_unc(PyObject *obj, void *closure)
   42854             : {
   42855           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42856           0 :         PyObject *py_server_unc;
   42857           0 :         if (object->in.server_unc == NULL) {
   42858           0 :                 Py_RETURN_NONE;
   42859             :         }
   42860           0 :         if (object->in.server_unc == NULL) {
   42861           0 :                 py_server_unc = Py_None;
   42862           0 :                 Py_INCREF(py_server_unc);
   42863             :         } else {
   42864           0 :                 if (object->in.server_unc == NULL) {
   42865           0 :                         py_server_unc = Py_None;
   42866           0 :                         Py_INCREF(py_server_unc);
   42867             :                 } else {
   42868           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   42869             :                 }
   42870             :         }
   42871           0 :         return py_server_unc;
   42872             : }
   42873             : 
   42874           0 : static int py_netr_DsRGetDCName_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   42875             : {
   42876           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42877           0 :         if (value == NULL) {
   42878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   42879           0 :                 return -1;
   42880             :         }
   42881           0 :         if (value == Py_None) {
   42882           0 :                 object->in.server_unc = NULL;
   42883             :         } else {
   42884           0 :                 object->in.server_unc = NULL;
   42885             :                 {
   42886           0 :                         const char *test_str;
   42887           0 :                         const char *talloc_str;
   42888           0 :                         PyObject *unicode = NULL;
   42889           0 :                         if (PyUnicode_Check(value)) {
   42890           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42891           0 :                                 if (unicode == NULL) {
   42892           0 :                                         PyErr_NoMemory();
   42893           0 :                                         return -1;
   42894             :                                 }
   42895           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42896           0 :                         } else if (PyBytes_Check(value)) {
   42897           0 :                                 test_str = PyBytes_AS_STRING(value);
   42898             :                         } else {
   42899           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42900           0 :                                 return -1;
   42901             :                         }
   42902           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42903           0 :                         if (unicode != NULL) {
   42904           0 :                                 Py_DECREF(unicode);
   42905             :                         }
   42906           0 :                         if (talloc_str == NULL) {
   42907           0 :                                 PyErr_NoMemory();
   42908           0 :                                 return -1;
   42909             :                         }
   42910           0 :                         object->in.server_unc = talloc_str;
   42911             :                 }
   42912             :         }
   42913           0 :         return 0;
   42914             : }
   42915             : 
   42916           0 : static PyObject *py_netr_DsRGetDCName_in_get_domain_name(PyObject *obj, void *closure)
   42917             : {
   42918           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42919           0 :         PyObject *py_domain_name;
   42920           0 :         if (object->in.domain_name == NULL) {
   42921           0 :                 Py_RETURN_NONE;
   42922             :         }
   42923           0 :         if (object->in.domain_name == NULL) {
   42924           0 :                 py_domain_name = Py_None;
   42925           0 :                 Py_INCREF(py_domain_name);
   42926             :         } else {
   42927           0 :                 if (object->in.domain_name == NULL) {
   42928           0 :                         py_domain_name = Py_None;
   42929           0 :                         Py_INCREF(py_domain_name);
   42930             :                 } else {
   42931           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   42932             :                 }
   42933             :         }
   42934           0 :         return py_domain_name;
   42935             : }
   42936             : 
   42937           0 : static int py_netr_DsRGetDCName_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   42938             : {
   42939           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42940           0 :         if (value == NULL) {
   42941           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   42942           0 :                 return -1;
   42943             :         }
   42944           0 :         if (value == Py_None) {
   42945           0 :                 object->in.domain_name = NULL;
   42946             :         } else {
   42947           0 :                 object->in.domain_name = NULL;
   42948             :                 {
   42949           0 :                         const char *test_str;
   42950           0 :                         const char *talloc_str;
   42951           0 :                         PyObject *unicode = NULL;
   42952           0 :                         if (PyUnicode_Check(value)) {
   42953           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42954           0 :                                 if (unicode == NULL) {
   42955           0 :                                         PyErr_NoMemory();
   42956           0 :                                         return -1;
   42957             :                                 }
   42958           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42959           0 :                         } else if (PyBytes_Check(value)) {
   42960           0 :                                 test_str = PyBytes_AS_STRING(value);
   42961             :                         } else {
   42962           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42963           0 :                                 return -1;
   42964             :                         }
   42965           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42966           0 :                         if (unicode != NULL) {
   42967           0 :                                 Py_DECREF(unicode);
   42968             :                         }
   42969           0 :                         if (talloc_str == NULL) {
   42970           0 :                                 PyErr_NoMemory();
   42971           0 :                                 return -1;
   42972             :                         }
   42973           0 :                         object->in.domain_name = talloc_str;
   42974             :                 }
   42975             :         }
   42976           0 :         return 0;
   42977             : }
   42978             : 
   42979           0 : static PyObject *py_netr_DsRGetDCName_in_get_domain_guid(PyObject *obj, void *closure)
   42980             : {
   42981           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42982           0 :         PyObject *py_domain_guid;
   42983           0 :         if (object->in.domain_guid == NULL) {
   42984           0 :                 Py_RETURN_NONE;
   42985             :         }
   42986           0 :         if (object->in.domain_guid == NULL) {
   42987           0 :                 py_domain_guid = Py_None;
   42988           0 :                 Py_INCREF(py_domain_guid);
   42989             :         } else {
   42990           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   42991             :         }
   42992           0 :         return py_domain_guid;
   42993             : }
   42994             : 
   42995           0 : static int py_netr_DsRGetDCName_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   42996             : {
   42997           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42998           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   42999           0 :         if (value == NULL) {
   43000           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   43001           0 :                 return -1;
   43002             :         }
   43003           0 :         if (value == Py_None) {
   43004           0 :                 object->in.domain_guid = NULL;
   43005             :         } else {
   43006           0 :                 object->in.domain_guid = NULL;
   43007           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   43008           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43009           0 :                         PyErr_NoMemory();
   43010           0 :                         return -1;
   43011             :                 }
   43012           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   43013             :         }
   43014           0 :         return 0;
   43015             : }
   43016             : 
   43017           0 : static PyObject *py_netr_DsRGetDCName_in_get_site_guid(PyObject *obj, void *closure)
   43018             : {
   43019           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   43020           0 :         PyObject *py_site_guid;
   43021           0 :         if (object->in.site_guid == NULL) {
   43022           0 :                 Py_RETURN_NONE;
   43023             :         }
   43024           0 :         if (object->in.site_guid == NULL) {
   43025           0 :                 py_site_guid = Py_None;
   43026           0 :                 Py_INCREF(py_site_guid);
   43027             :         } else {
   43028           0 :                 py_site_guid = pytalloc_reference_ex(GUID_Type, object->in.site_guid, object->in.site_guid);
   43029             :         }
   43030           0 :         return py_site_guid;
   43031             : }
   43032             : 
   43033           0 : static int py_netr_DsRGetDCName_in_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
   43034             : {
   43035           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   43036           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.site_guid));
   43037           0 :         if (value == NULL) {
   43038           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_guid");
   43039           0 :                 return -1;
   43040             :         }
   43041           0 :         if (value == Py_None) {
   43042           0 :                 object->in.site_guid = NULL;
   43043             :         } else {
   43044           0 :                 object->in.site_guid = NULL;
   43045           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   43046           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43047           0 :                         PyErr_NoMemory();
   43048           0 :                         return -1;
   43049             :                 }
   43050           0 :                 object->in.site_guid = (struct GUID *)pytalloc_get_ptr(value);
   43051             :         }
   43052           0 :         return 0;
   43053             : }
   43054             : 
   43055           0 : static PyObject *py_netr_DsRGetDCName_in_get_flags(PyObject *obj, void *closure)
   43056             : {
   43057           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   43058           0 :         PyObject *py_flags;
   43059           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   43060           0 :         return py_flags;
   43061             : }
   43062             : 
   43063           0 : static int py_netr_DsRGetDCName_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   43064             : {
   43065           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   43066           0 :         if (value == NULL) {
   43067           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   43068           0 :                 return -1;
   43069             :         }
   43070             :         {
   43071           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   43072           0 :                 if (PyLong_Check(value)) {
   43073           0 :                         unsigned long long test_var;
   43074           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43075           0 :                         if (PyErr_Occurred() != NULL) {
   43076           0 :                                 return -1;
   43077             :                         }
   43078           0 :                         if (test_var > uint_max) {
   43079           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43080             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43081           0 :                                 return -1;
   43082             :                         }
   43083           0 :                         object->in.flags = test_var;
   43084             :                 } else {
   43085           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43086             :                           PyLong_Type.tp_name);
   43087           0 :                         return -1;
   43088             :                 }
   43089             :         }
   43090           0 :         return 0;
   43091             : }
   43092             : 
   43093           0 : static PyObject *py_netr_DsRGetDCName_out_get_info(PyObject *obj, void *closure)
   43094             : {
   43095           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   43096           0 :         PyObject *py_info;
   43097           0 :         if (object->out.info == NULL) {
   43098           0 :                 Py_RETURN_NONE;
   43099             :         }
   43100           0 :         if (*object->out.info == NULL) {
   43101           0 :                 py_info = Py_None;
   43102           0 :                 Py_INCREF(py_info);
   43103             :         } else {
   43104           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
   43105             :         }
   43106           0 :         return py_info;
   43107             : }
   43108             : 
   43109           0 : static int py_netr_DsRGetDCName_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   43110             : {
   43111           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   43112           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   43113           0 :         if (value == NULL) {
   43114           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   43115           0 :                 return -1;
   43116             :         }
   43117           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   43118           0 :         if (object->out.info == NULL) {
   43119           0 :                 PyErr_NoMemory();
   43120           0 :                 return -1;
   43121             :         }
   43122           0 :         if (value == Py_None) {
   43123           0 :                 *object->out.info = NULL;
   43124             :         } else {
   43125           0 :                 *object->out.info = NULL;
   43126           0 :                 PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
   43127           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43128           0 :                         PyErr_NoMemory();
   43129           0 :                         return -1;
   43130             :                 }
   43131           0 :                 *object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   43132             :         }
   43133           0 :         return 0;
   43134             : }
   43135             : 
   43136           0 : static PyObject *py_netr_DsRGetDCName_get_result(PyObject *obj, void *closure)
   43137             : {
   43138           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   43139           0 :         PyObject *py_result;
   43140           0 :         py_result = PyErr_FromWERROR(object->out.result);
   43141           0 :         return py_result;
   43142             : }
   43143             : 
   43144           0 : static int py_netr_DsRGetDCName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43145             : {
   43146           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   43147           0 :         if (value == NULL) {
   43148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   43149           0 :                 return -1;
   43150             :         }
   43151           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   43152           0 :         return 0;
   43153             : }
   43154             : 
   43155             : static PyGetSetDef py_netr_DsRGetDCName_getsetters[] = {
   43156             :         {
   43157             :                 .name = discard_const_p(char, "in_server_unc"),
   43158             :                 .get = py_netr_DsRGetDCName_in_get_server_unc,
   43159             :                 .set = py_netr_DsRGetDCName_in_set_server_unc,
   43160             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43161             :         },
   43162             :         {
   43163             :                 .name = discard_const_p(char, "in_domain_name"),
   43164             :                 .get = py_netr_DsRGetDCName_in_get_domain_name,
   43165             :                 .set = py_netr_DsRGetDCName_in_set_domain_name,
   43166             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43167             :         },
   43168             :         {
   43169             :                 .name = discard_const_p(char, "in_domain_guid"),
   43170             :                 .get = py_netr_DsRGetDCName_in_get_domain_guid,
   43171             :                 .set = py_netr_DsRGetDCName_in_set_domain_guid,
   43172             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   43173             :         },
   43174             :         {
   43175             :                 .name = discard_const_p(char, "in_site_guid"),
   43176             :                 .get = py_netr_DsRGetDCName_in_get_site_guid,
   43177             :                 .set = py_netr_DsRGetDCName_in_set_site_guid,
   43178             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   43179             :         },
   43180             :         {
   43181             :                 .name = discard_const_p(char, "in_flags"),
   43182             :                 .get = py_netr_DsRGetDCName_in_get_flags,
   43183             :                 .set = py_netr_DsRGetDCName_in_set_flags,
   43184             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
   43185             :         },
   43186             :         {
   43187             :                 .name = discard_const_p(char, "out_info"),
   43188             :                 .get = py_netr_DsRGetDCName_out_get_info,
   43189             :                 .set = py_netr_DsRGetDCName_out_set_info,
   43190             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   43191             :         },
   43192             :         {
   43193             :                 .name = discard_const_p(char, "result"),
   43194             :                 .get = py_netr_DsRGetDCName_get_result,
   43195             :                 .set = py_netr_DsRGetDCName_set_result,
   43196             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   43197             :         },
   43198             :         { .name = NULL }
   43199             : };
   43200             : 
   43201           0 : static PyObject *py_netr_DsRGetDCName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   43202             : {
   43203           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetDCName, type);
   43204           0 :         struct netr_DsRGetDCName *_self = (struct netr_DsRGetDCName *)pytalloc_get_ptr(self);
   43205           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   43206             :         /* a pointer to a NULL pointer */
   43207           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   43208           0 :         return self;
   43209             : }
   43210             : 
   43211           0 : static PyObject *py_netr_DsRGetDCName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   43212             : {
   43213             : 
   43214             : 
   43215           0 :         return PyLong_FromLong(20);
   43216             : }
   43217             : 
   43218           0 : static PyObject *py_netr_DsRGetDCName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   43219             : {
   43220           0 :         const struct ndr_interface_call *call = NULL;
   43221           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   43222           0 :         PyObject *ret = NULL;
   43223           0 :         struct ndr_push *push = NULL;
   43224           0 :         DATA_BLOB blob;
   43225           0 :         enum ndr_err_code err;
   43226             : 
   43227           0 :         if (ndr_table_netlogon.num_calls < 21) {
   43228           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_pack");
   43229           0 :                 return NULL;
   43230             :         }
   43231           0 :         call = &ndr_table_netlogon.calls[20];
   43232             : 
   43233           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   43234           0 :         if (push == NULL) {
   43235           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43236           0 :                 return NULL;
   43237             :         }
   43238             : 
   43239           0 :         push->flags |= ndr_push_flags;
   43240             : 
   43241           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   43242           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43243           0 :                 TALLOC_FREE(push);
   43244           0 :                 PyErr_SetNdrError(err);
   43245           0 :                 return NULL;
   43246             :         }
   43247           0 :         blob = ndr_push_blob(push);
   43248           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   43249           0 :         TALLOC_FREE(push);
   43250           0 :         return ret;
   43251             : }
   43252             : 
   43253           0 : static PyObject *py_netr_DsRGetDCName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43254             : {
   43255           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43256           0 :         PyObject *bigendian_obj = NULL;
   43257           0 :         PyObject *ndr64_obj = NULL;
   43258           0 :         libndr_flags ndr_push_flags = 0;
   43259             : 
   43260           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   43261             :                 discard_const_p(char *, kwnames),
   43262             :                 &bigendian_obj,
   43263             :                 &ndr64_obj)) {
   43264           0 :                 return NULL;
   43265             :         }
   43266             : 
   43267           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43268           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43269             :         }
   43270           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43271           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43272             :         }
   43273             : 
   43274           0 :         return py_netr_DsRGetDCName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   43275             : }
   43276             : 
   43277           0 : static PyObject *py_netr_DsRGetDCName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43278             : {
   43279           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43280           0 :         PyObject *bigendian_obj = NULL;
   43281           0 :         PyObject *ndr64_obj = NULL;
   43282           0 :         libndr_flags ndr_push_flags = 0;
   43283             : 
   43284           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   43285             :                 discard_const_p(char *, kwnames),
   43286             :                 &bigendian_obj,
   43287             :                 &ndr64_obj)) {
   43288           0 :                 return NULL;
   43289             :         }
   43290             : 
   43291           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43292           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43293             :         }
   43294           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43295           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43296             :         }
   43297             : 
   43298           0 :         return py_netr_DsRGetDCName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   43299             : }
   43300             : 
   43301           0 : static PyObject *py_netr_DsRGetDCName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   43302             : {
   43303           0 :         const struct ndr_interface_call *call = NULL;
   43304           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   43305           0 :         struct ndr_pull *pull = NULL;
   43306           0 :         enum ndr_err_code err;
   43307             : 
   43308           0 :         if (ndr_table_netlogon.num_calls < 21) {
   43309           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_unpack");
   43310           0 :                 return NULL;
   43311             :         }
   43312           0 :         call = &ndr_table_netlogon.calls[20];
   43313             : 
   43314           0 :         pull = ndr_pull_init_blob(blob, object);
   43315           0 :         if (pull == NULL) {
   43316           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43317           0 :                 return NULL;
   43318             :         }
   43319             : 
   43320           0 :         pull->flags |= ndr_pull_flags;
   43321             : 
   43322           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   43323           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43324           0 :                 TALLOC_FREE(pull);
   43325           0 :                 PyErr_SetNdrError(err);
   43326           0 :                 return NULL;
   43327             :         }
   43328           0 :         if (!allow_remaining) {
   43329           0 :                 uint32_t highest_ofs;
   43330             : 
   43331           0 :                 if (pull->offset > pull->relative_highest_offset) {
   43332           0 :                         highest_ofs = pull->offset;
   43333             :                 } else {
   43334           0 :                         highest_ofs = pull->relative_highest_offset;
   43335             :                 }
   43336           0 :                 if (highest_ofs < pull->data_size) {
   43337           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   43338             :                                 "not all bytes consumed ofs[%u] size[%u]",
   43339             :                                 highest_ofs, pull->data_size);
   43340           0 :                         TALLOC_FREE(pull);
   43341           0 :                         PyErr_SetNdrError(err);
   43342           0 :                         return NULL;
   43343             :                 }
   43344             :         }
   43345             : 
   43346           0 :         TALLOC_FREE(pull);
   43347           0 :         Py_RETURN_NONE;
   43348             : }
   43349             : 
   43350           0 : static PyObject *py_netr_DsRGetDCName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43351             : {
   43352           0 :         DATA_BLOB blob;
   43353           0 :         Py_ssize_t blob_length = 0;
   43354           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43355           0 :         PyObject *bigendian_obj = NULL;
   43356           0 :         PyObject *ndr64_obj = NULL;
   43357           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43358           0 :         PyObject *allow_remaining_obj = NULL;
   43359           0 :         bool allow_remaining = false;
   43360             : 
   43361           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   43362             :                 discard_const_p(char *, kwnames),
   43363             :                 &blob.data, &blob_length,
   43364             :                 &bigendian_obj,
   43365             :                 &ndr64_obj,
   43366             :                 &allow_remaining_obj)) {
   43367           0 :                 return NULL;
   43368             :         }
   43369           0 :         blob.length = blob_length;
   43370             : 
   43371           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43372           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43373             :         }
   43374           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43375           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43376             :         }
   43377             : 
   43378           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43379           0 :                 allow_remaining = true;
   43380             :         }
   43381             : 
   43382           0 :         return py_netr_DsRGetDCName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   43383             : }
   43384             : 
   43385           0 : static PyObject *py_netr_DsRGetDCName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43386             : {
   43387           0 :         DATA_BLOB blob;
   43388           0 :         Py_ssize_t blob_length = 0;
   43389           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43390           0 :         PyObject *bigendian_obj = NULL;
   43391           0 :         PyObject *ndr64_obj = NULL;
   43392           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43393           0 :         PyObject *allow_remaining_obj = NULL;
   43394           0 :         bool allow_remaining = false;
   43395             : 
   43396           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   43397             :                 discard_const_p(char *, kwnames),
   43398             :                 &blob.data, &blob_length,
   43399             :                 &bigendian_obj,
   43400             :                 &ndr64_obj,
   43401             :                 &allow_remaining_obj)) {
   43402           0 :                 return NULL;
   43403             :         }
   43404           0 :         blob.length = blob_length;
   43405             : 
   43406           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43407           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43408             :         }
   43409           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43410           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43411             :         }
   43412             : 
   43413           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43414           0 :                 allow_remaining = true;
   43415             :         }
   43416             : 
   43417           0 :         return py_netr_DsRGetDCName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   43418             : }
   43419             : 
   43420           0 : static PyObject *py_netr_DsRGetDCName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   43421             : {
   43422           0 :         const struct ndr_interface_call *call = NULL;
   43423           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   43424           0 :         PyObject *ret;
   43425           0 :         char *retstr;
   43426             : 
   43427           0 :         if (ndr_table_netlogon.num_calls < 21) {
   43428           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_print");
   43429           0 :                 return NULL;
   43430             :         }
   43431           0 :         call = &ndr_table_netlogon.calls[20];
   43432             : 
   43433           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   43434           0 :         ret = PyUnicode_FromString(retstr);
   43435           0 :         TALLOC_FREE(retstr);
   43436             : 
   43437           0 :         return ret;
   43438             : }
   43439             : 
   43440           0 : static PyObject *py_netr_DsRGetDCName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43441             : {
   43442           0 :         return py_netr_DsRGetDCName_ndr_print(py_obj, "netr_DsRGetDCName_in", NDR_IN);
   43443             : }
   43444             : 
   43445           0 : static PyObject *py_netr_DsRGetDCName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43446             : {
   43447           0 :         return py_netr_DsRGetDCName_ndr_print(py_obj, "netr_DsRGetDCName_out", NDR_OUT);
   43448             : }
   43449             : 
   43450             : static PyMethodDef py_netr_DsRGetDCName_methods[] = {
   43451             :         { "opnum", (PyCFunction)py_netr_DsRGetDCName_ndr_opnum, METH_NOARGS|METH_CLASS,
   43452             :                 "netlogon.netr_DsRGetDCName.opnum() -> 20 (0x14) " },
   43453             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   43454             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   43455             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   43456             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   43457             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   43458             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   43459             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   43460             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   43461             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetDCName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   43462             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetDCName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   43463             :         { NULL, NULL, 0, NULL }
   43464             : };
   43465             : 
   43466             : 
   43467             : static PyTypeObject netr_DsRGetDCName_Type = {
   43468             :         PyVarObject_HEAD_INIT(NULL, 0)
   43469             :         .tp_name = "netlogon.netr_DsRGetDCName",
   43470             :         .tp_getset = py_netr_DsRGetDCName_getsetters,
   43471             :         .tp_methods = py_netr_DsRGetDCName_methods,
   43472             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   43473             :         .tp_new = py_netr_DsRGetDCName_new,
   43474             : };
   43475             : 
   43476           0 : static bool pack_py_netr_DsRGetDCName_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCName *r)
   43477             : {
   43478           0 :         PyObject *py_server_unc;
   43479           0 :         PyObject *py_domain_name;
   43480           0 :         PyObject *py_domain_guid;
   43481           0 :         PyObject *py_site_guid;
   43482           0 :         PyObject *py_flags;
   43483           0 :         const char *kwnames[] = {
   43484             :                 "server_unc", "domain_name", "domain_guid", "site_guid", "flags", NULL
   43485             :         };
   43486             : 
   43487           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_DsRGetDCName", discard_const_p(char *, kwnames), &py_server_unc, &py_domain_name, &py_domain_guid, &py_site_guid, &py_flags)) {
   43488           0 :                 return false;
   43489             :         }
   43490             : 
   43491           0 :         if (py_server_unc == NULL) {
   43492           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   43493           0 :                 return false;
   43494             :         }
   43495           0 :         if (py_server_unc == Py_None) {
   43496           0 :                 r->in.server_unc = NULL;
   43497             :         } else {
   43498           0 :                 r->in.server_unc = NULL;
   43499             :                 {
   43500           0 :                         const char *test_str;
   43501           0 :                         const char *talloc_str;
   43502           0 :                         PyObject *unicode = NULL;
   43503           0 :                         if (PyUnicode_Check(py_server_unc)) {
   43504           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   43505           0 :                                 if (unicode == NULL) {
   43506           0 :                                         PyErr_NoMemory();
   43507           0 :                                         return false;
   43508             :                                 }
   43509           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43510           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   43511           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   43512             :                         } else {
   43513           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   43514           0 :                                 return false;
   43515             :                         }
   43516           0 :                         talloc_str = talloc_strdup(r, test_str);
   43517           0 :                         if (unicode != NULL) {
   43518           0 :                                 Py_DECREF(unicode);
   43519             :                         }
   43520           0 :                         if (talloc_str == NULL) {
   43521           0 :                                 PyErr_NoMemory();
   43522           0 :                                 return false;
   43523             :                         }
   43524           0 :                         r->in.server_unc = talloc_str;
   43525             :                 }
   43526             :         }
   43527           0 :         if (py_domain_name == NULL) {
   43528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   43529           0 :                 return false;
   43530             :         }
   43531           0 :         if (py_domain_name == Py_None) {
   43532           0 :                 r->in.domain_name = NULL;
   43533             :         } else {
   43534           0 :                 r->in.domain_name = NULL;
   43535             :                 {
   43536           0 :                         const char *test_str;
   43537           0 :                         const char *talloc_str;
   43538           0 :                         PyObject *unicode = NULL;
   43539           0 :                         if (PyUnicode_Check(py_domain_name)) {
   43540           0 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   43541           0 :                                 if (unicode == NULL) {
   43542           0 :                                         PyErr_NoMemory();
   43543           0 :                                         return false;
   43544             :                                 }
   43545           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43546           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   43547           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   43548             :                         } else {
   43549           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   43550           0 :                                 return false;
   43551             :                         }
   43552           0 :                         talloc_str = talloc_strdup(r, test_str);
   43553           0 :                         if (unicode != NULL) {
   43554           0 :                                 Py_DECREF(unicode);
   43555             :                         }
   43556           0 :                         if (talloc_str == NULL) {
   43557           0 :                                 PyErr_NoMemory();
   43558           0 :                                 return false;
   43559             :                         }
   43560           0 :                         r->in.domain_name = talloc_str;
   43561             :                 }
   43562             :         }
   43563           0 :         if (py_domain_guid == NULL) {
   43564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   43565           0 :                 return false;
   43566             :         }
   43567           0 :         if (py_domain_guid == Py_None) {
   43568           0 :                 r->in.domain_guid = NULL;
   43569             :         } else {
   43570           0 :                 r->in.domain_guid = NULL;
   43571           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   43572           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   43573           0 :                         PyErr_NoMemory();
   43574           0 :                         return false;
   43575             :                 }
   43576           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   43577             :         }
   43578           0 :         if (py_site_guid == NULL) {
   43579           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_guid");
   43580           0 :                 return false;
   43581             :         }
   43582           0 :         if (py_site_guid == Py_None) {
   43583           0 :                 r->in.site_guid = NULL;
   43584             :         } else {
   43585           0 :                 r->in.site_guid = NULL;
   43586           0 :                 PY_CHECK_TYPE(GUID_Type, py_site_guid, return false;);
   43587           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_site_guid)) == NULL) {
   43588           0 :                         PyErr_NoMemory();
   43589           0 :                         return false;
   43590             :                 }
   43591           0 :                 r->in.site_guid = (struct GUID *)pytalloc_get_ptr(py_site_guid);
   43592             :         }
   43593           0 :         if (py_flags == NULL) {
   43594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   43595           0 :                 return false;
   43596             :         }
   43597             :         {
   43598           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   43599           0 :                 if (PyLong_Check(py_flags)) {
   43600           0 :                         unsigned long long test_var;
   43601           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   43602           0 :                         if (PyErr_Occurred() != NULL) {
   43603           0 :                                 return false;
   43604             :                         }
   43605           0 :                         if (test_var > uint_max) {
   43606           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43607             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43608           0 :                                 return false;
   43609             :                         }
   43610           0 :                         r->in.flags = test_var;
   43611             :                 } else {
   43612           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43613             :                           PyLong_Type.tp_name);
   43614           0 :                         return false;
   43615             :                 }
   43616             :         }
   43617           0 :         return true;
   43618             : }
   43619             : 
   43620           0 : static PyObject *unpack_py_netr_DsRGetDCName_args_out(struct netr_DsRGetDCName *r)
   43621             : {
   43622           0 :         PyObject *result;
   43623           0 :         PyObject *py_info;
   43624           0 :         if (*r->out.info == NULL) {
   43625           0 :                 py_info = Py_None;
   43626           0 :                 Py_INCREF(py_info);
   43627             :         } else {
   43628           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
   43629             :         }
   43630           0 :         result = py_info;
   43631           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   43632           0 :                 PyErr_SetWERROR(r->out.result);
   43633           0 :                 return NULL;
   43634             :         }
   43635             : 
   43636           0 :         return result;
   43637             : }
   43638             : 
   43639             : 
   43640           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_server_name(PyObject *obj, void *closure)
   43641             : {
   43642           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43643           0 :         PyObject *py_server_name;
   43644           0 :         if (object->in.server_name == NULL) {
   43645           0 :                 Py_RETURN_NONE;
   43646             :         }
   43647           0 :         if (object->in.server_name == NULL) {
   43648           0 :                 py_server_name = Py_None;
   43649           0 :                 Py_INCREF(py_server_name);
   43650             :         } else {
   43651           0 :                 py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   43652             :         }
   43653           0 :         return py_server_name;
   43654             : }
   43655             : 
   43656           0 : static int py_netr_LogonGetCapabilities_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   43657             : {
   43658           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43659           0 :         if (value == NULL) {
   43660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   43661           0 :                 return -1;
   43662             :         }
   43663           0 :         object->in.server_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server_name);
   43664           0 :         if (object->in.server_name == NULL) {
   43665           0 :                 PyErr_NoMemory();
   43666           0 :                 return -1;
   43667             :         }
   43668             :         {
   43669           0 :                 const char *test_str;
   43670           0 :                 const char *talloc_str;
   43671           0 :                 PyObject *unicode = NULL;
   43672           0 :                 if (PyUnicode_Check(value)) {
   43673           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43674           0 :                         if (unicode == NULL) {
   43675           0 :                                 PyErr_NoMemory();
   43676           0 :                                 return -1;
   43677             :                         }
   43678           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43679           0 :                 } else if (PyBytes_Check(value)) {
   43680           0 :                         test_str = PyBytes_AS_STRING(value);
   43681             :                 } else {
   43682           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43683           0 :                         return -1;
   43684             :                 }
   43685           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43686           0 :                 if (unicode != NULL) {
   43687           0 :                         Py_DECREF(unicode);
   43688             :                 }
   43689           0 :                 if (talloc_str == NULL) {
   43690           0 :                         PyErr_NoMemory();
   43691           0 :                         return -1;
   43692             :                 }
   43693           0 :                 object->in.server_name = talloc_str;
   43694             :         }
   43695           0 :         return 0;
   43696             : }
   43697             : 
   43698           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_computer_name(PyObject *obj, void *closure)
   43699             : {
   43700           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43701           0 :         PyObject *py_computer_name;
   43702           0 :         if (object->in.computer_name == NULL) {
   43703           0 :                 Py_RETURN_NONE;
   43704             :         }
   43705           0 :         if (object->in.computer_name == NULL) {
   43706           0 :                 py_computer_name = Py_None;
   43707           0 :                 Py_INCREF(py_computer_name);
   43708             :         } else {
   43709           0 :                 if (object->in.computer_name == NULL) {
   43710           0 :                         py_computer_name = Py_None;
   43711           0 :                         Py_INCREF(py_computer_name);
   43712             :                 } else {
   43713           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   43714             :                 }
   43715             :         }
   43716           0 :         return py_computer_name;
   43717             : }
   43718             : 
   43719           0 : static int py_netr_LogonGetCapabilities_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   43720             : {
   43721           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43722           0 :         if (value == NULL) {
   43723           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   43724           0 :                 return -1;
   43725             :         }
   43726           0 :         if (value == Py_None) {
   43727           0 :                 object->in.computer_name = NULL;
   43728             :         } else {
   43729           0 :                 object->in.computer_name = NULL;
   43730             :                 {
   43731           0 :                         const char *test_str;
   43732           0 :                         const char *talloc_str;
   43733           0 :                         PyObject *unicode = NULL;
   43734           0 :                         if (PyUnicode_Check(value)) {
   43735           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43736           0 :                                 if (unicode == NULL) {
   43737           0 :                                         PyErr_NoMemory();
   43738           0 :                                         return -1;
   43739             :                                 }
   43740           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43741           0 :                         } else if (PyBytes_Check(value)) {
   43742           0 :                                 test_str = PyBytes_AS_STRING(value);
   43743             :                         } else {
   43744           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43745           0 :                                 return -1;
   43746             :                         }
   43747           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43748           0 :                         if (unicode != NULL) {
   43749           0 :                                 Py_DECREF(unicode);
   43750             :                         }
   43751           0 :                         if (talloc_str == NULL) {
   43752           0 :                                 PyErr_NoMemory();
   43753           0 :                                 return -1;
   43754             :                         }
   43755           0 :                         object->in.computer_name = talloc_str;
   43756             :                 }
   43757             :         }
   43758           0 :         return 0;
   43759             : }
   43760             : 
   43761           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_credential(PyObject *obj, void *closure)
   43762             : {
   43763           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43764           0 :         PyObject *py_credential;
   43765           0 :         if (object->in.credential == NULL) {
   43766           0 :                 Py_RETURN_NONE;
   43767             :         }
   43768           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   43769           0 :         return py_credential;
   43770             : }
   43771             : 
   43772           0 : static int py_netr_LogonGetCapabilities_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   43773             : {
   43774           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43775           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   43776           0 :         if (value == NULL) {
   43777           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   43778           0 :                 return -1;
   43779             :         }
   43780           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   43781           0 :         if (object->in.credential == NULL) {
   43782           0 :                 PyErr_NoMemory();
   43783           0 :                 return -1;
   43784             :         }
   43785           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   43786           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43787           0 :                 PyErr_NoMemory();
   43788           0 :                 return -1;
   43789             :         }
   43790           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   43791           0 :         return 0;
   43792             : }
   43793             : 
   43794           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_return_authenticator(PyObject *obj, void *closure)
   43795             : {
   43796           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43797           0 :         PyObject *py_return_authenticator;
   43798           0 :         if (object->in.return_authenticator == NULL) {
   43799           0 :                 Py_RETURN_NONE;
   43800             :         }
   43801           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   43802           0 :         return py_return_authenticator;
   43803             : }
   43804             : 
   43805           0 : static int py_netr_LogonGetCapabilities_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   43806             : {
   43807           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43808           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   43809           0 :         if (value == NULL) {
   43810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   43811           0 :                 return -1;
   43812             :         }
   43813           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   43814           0 :         if (object->in.return_authenticator == NULL) {
   43815           0 :                 PyErr_NoMemory();
   43816           0 :                 return -1;
   43817             :         }
   43818           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   43819           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43820           0 :                 PyErr_NoMemory();
   43821           0 :                 return -1;
   43822             :         }
   43823           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   43824           0 :         return 0;
   43825             : }
   43826             : 
   43827           0 : static PyObject *py_netr_LogonGetCapabilities_out_get_return_authenticator(PyObject *obj, void *closure)
   43828             : {
   43829           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43830           0 :         PyObject *py_return_authenticator;
   43831           0 :         if (object->out.return_authenticator == NULL) {
   43832           0 :                 Py_RETURN_NONE;
   43833             :         }
   43834           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   43835           0 :         return py_return_authenticator;
   43836             : }
   43837             : 
   43838           0 : static int py_netr_LogonGetCapabilities_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   43839             : {
   43840           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43841           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   43842           0 :         if (value == NULL) {
   43843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   43844           0 :                 return -1;
   43845             :         }
   43846           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   43847           0 :         if (object->out.return_authenticator == NULL) {
   43848           0 :                 PyErr_NoMemory();
   43849           0 :                 return -1;
   43850             :         }
   43851           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   43852           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43853           0 :                 PyErr_NoMemory();
   43854           0 :                 return -1;
   43855             :         }
   43856           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   43857           0 :         return 0;
   43858             : }
   43859             : 
   43860           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_query_level(PyObject *obj, void *closure)
   43861             : {
   43862           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43863           0 :         PyObject *py_query_level;
   43864           0 :         py_query_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.query_level);
   43865           0 :         return py_query_level;
   43866             : }
   43867             : 
   43868           0 : static int py_netr_LogonGetCapabilities_in_set_query_level(PyObject *py_obj, PyObject *value, void *closure)
   43869             : {
   43870           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43871           0 :         if (value == NULL) {
   43872           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.query_level");
   43873           0 :                 return -1;
   43874             :         }
   43875             :         {
   43876           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.query_level));
   43877           0 :                 if (PyLong_Check(value)) {
   43878           0 :                         unsigned long long test_var;
   43879           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43880           0 :                         if (PyErr_Occurred() != NULL) {
   43881           0 :                                 return -1;
   43882             :                         }
   43883           0 :                         if (test_var > uint_max) {
   43884           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43885             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43886           0 :                                 return -1;
   43887             :                         }
   43888           0 :                         object->in.query_level = test_var;
   43889             :                 } else {
   43890           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43891             :                           PyLong_Type.tp_name);
   43892           0 :                         return -1;
   43893             :                 }
   43894             :         }
   43895           0 :         return 0;
   43896             : }
   43897             : 
   43898           0 : static PyObject *py_netr_LogonGetCapabilities_out_get_capabilities(PyObject *obj, void *closure)
   43899             : {
   43900           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43901           0 :         PyObject *py_capabilities;
   43902           0 :         if (object->out.capabilities == NULL) {
   43903           0 :                 Py_RETURN_NONE;
   43904             :         }
   43905           0 :         py_capabilities = pyrpc_import_union(&netr_Capabilities_Type, object->out.capabilities, object->in.query_level, object->out.capabilities, "union netr_Capabilities");
   43906           0 :         if (py_capabilities == NULL) {
   43907           0 :                 return NULL;
   43908             :         }
   43909           0 :         return py_capabilities;
   43910             : }
   43911             : 
   43912           0 : static int py_netr_LogonGetCapabilities_out_set_capabilities(PyObject *py_obj, PyObject *value, void *closure)
   43913             : {
   43914           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43915           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.capabilities));
   43916           0 :         if (value == NULL) {
   43917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.capabilities");
   43918           0 :                 return -1;
   43919             :         }
   43920           0 :         object->out.capabilities = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.capabilities);
   43921           0 :         if (object->out.capabilities == NULL) {
   43922           0 :                 PyErr_NoMemory();
   43923           0 :                 return -1;
   43924             :         }
   43925             :         {
   43926           0 :                 union netr_Capabilities *capabilities_switch_1;
   43927           0 :                 capabilities_switch_1 = (union netr_Capabilities *)pyrpc_export_union(&netr_Capabilities_Type, pytalloc_get_mem_ctx(py_obj), object->in.query_level, value, "union netr_Capabilities");
   43928           0 :                 if (capabilities_switch_1 == NULL) {
   43929           0 :                         return -1;
   43930             :                 }
   43931           0 :                 object->out.capabilities = capabilities_switch_1;
   43932             :         }
   43933           0 :         return 0;
   43934             : }
   43935             : 
   43936           0 : static PyObject *py_netr_LogonGetCapabilities_get_result(PyObject *obj, void *closure)
   43937             : {
   43938           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43939           0 :         PyObject *py_result;
   43940           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   43941           0 :         return py_result;
   43942             : }
   43943             : 
   43944           0 : static int py_netr_LogonGetCapabilities_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43945             : {
   43946           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43947           0 :         if (value == NULL) {
   43948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   43949           0 :                 return -1;
   43950             :         }
   43951           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   43952           0 :         return 0;
   43953             : }
   43954             : 
   43955             : static PyGetSetDef py_netr_LogonGetCapabilities_getsetters[] = {
   43956             :         {
   43957             :                 .name = discard_const_p(char, "in_server_name"),
   43958             :                 .get = py_netr_LogonGetCapabilities_in_get_server_name,
   43959             :                 .set = py_netr_LogonGetCapabilities_in_set_server_name,
   43960             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43961             :         },
   43962             :         {
   43963             :                 .name = discard_const_p(char, "in_computer_name"),
   43964             :                 .get = py_netr_LogonGetCapabilities_in_get_computer_name,
   43965             :                 .set = py_netr_LogonGetCapabilities_in_set_computer_name,
   43966             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43967             :         },
   43968             :         {
   43969             :                 .name = discard_const_p(char, "in_credential"),
   43970             :                 .get = py_netr_LogonGetCapabilities_in_get_credential,
   43971             :                 .set = py_netr_LogonGetCapabilities_in_set_credential,
   43972             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   43973             :         },
   43974             :         {
   43975             :                 .name = discard_const_p(char, "in_return_authenticator"),
   43976             :                 .get = py_netr_LogonGetCapabilities_in_get_return_authenticator,
   43977             :                 .set = py_netr_LogonGetCapabilities_in_set_return_authenticator,
   43978             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   43979             :         },
   43980             :         {
   43981             :                 .name = discard_const_p(char, "out_return_authenticator"),
   43982             :                 .get = py_netr_LogonGetCapabilities_out_get_return_authenticator,
   43983             :                 .set = py_netr_LogonGetCapabilities_out_set_return_authenticator,
   43984             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   43985             :         },
   43986             :         {
   43987             :                 .name = discard_const_p(char, "in_query_level"),
   43988             :                 .get = py_netr_LogonGetCapabilities_in_get_query_level,
   43989             :                 .set = py_netr_LogonGetCapabilities_in_set_query_level,
   43990             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   43991             :         },
   43992             :         {
   43993             :                 .name = discard_const_p(char, "out_capabilities"),
   43994             :                 .get = py_netr_LogonGetCapabilities_out_get_capabilities,
   43995             :                 .set = py_netr_LogonGetCapabilities_out_set_capabilities,
   43996             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Capabilities")
   43997             :         },
   43998             :         {
   43999             :                 .name = discard_const_p(char, "result"),
   44000             :                 .get = py_netr_LogonGetCapabilities_get_result,
   44001             :                 .set = py_netr_LogonGetCapabilities_set_result,
   44002             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   44003             :         },
   44004             :         { .name = NULL }
   44005             : };
   44006             : 
   44007           0 : static PyObject *py_netr_LogonGetCapabilities_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44008             : {
   44009           0 :         PyObject *self = pytalloc_new(struct netr_LogonGetCapabilities, type);
   44010           0 :         struct netr_LogonGetCapabilities *_self = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(self);
   44011           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   44012           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   44013           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   44014           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   44015           0 :         _self->out.capabilities = talloc_zero(mem_ctx, union netr_Capabilities);
   44016           0 :         return self;
   44017             : }
   44018             : 
   44019           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   44020             : {
   44021             : 
   44022             : 
   44023           0 :         return PyLong_FromLong(21);
   44024             : }
   44025             : 
   44026           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   44027             : {
   44028           0 :         const struct ndr_interface_call *call = NULL;
   44029           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   44030           0 :         PyObject *ret = NULL;
   44031           0 :         struct ndr_push *push = NULL;
   44032           0 :         DATA_BLOB blob;
   44033           0 :         enum ndr_err_code err;
   44034             : 
   44035           0 :         if (ndr_table_netlogon.num_calls < 22) {
   44036           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_pack");
   44037           0 :                 return NULL;
   44038             :         }
   44039           0 :         call = &ndr_table_netlogon.calls[21];
   44040             : 
   44041           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   44042           0 :         if (push == NULL) {
   44043           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44044           0 :                 return NULL;
   44045             :         }
   44046             : 
   44047           0 :         push->flags |= ndr_push_flags;
   44048             : 
   44049           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   44050           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44051           0 :                 TALLOC_FREE(push);
   44052           0 :                 PyErr_SetNdrError(err);
   44053           0 :                 return NULL;
   44054             :         }
   44055           0 :         blob = ndr_push_blob(push);
   44056           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   44057           0 :         TALLOC_FREE(push);
   44058           0 :         return ret;
   44059             : }
   44060             : 
   44061           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44062             : {
   44063           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44064           0 :         PyObject *bigendian_obj = NULL;
   44065           0 :         PyObject *ndr64_obj = NULL;
   44066           0 :         libndr_flags ndr_push_flags = 0;
   44067             : 
   44068           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   44069             :                 discard_const_p(char *, kwnames),
   44070             :                 &bigendian_obj,
   44071             :                 &ndr64_obj)) {
   44072           0 :                 return NULL;
   44073             :         }
   44074             : 
   44075           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44076           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44077             :         }
   44078           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44079           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44080             :         }
   44081             : 
   44082           0 :         return py_netr_LogonGetCapabilities_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   44083             : }
   44084             : 
   44085           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44086             : {
   44087           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44088           0 :         PyObject *bigendian_obj = NULL;
   44089           0 :         PyObject *ndr64_obj = NULL;
   44090           0 :         libndr_flags ndr_push_flags = 0;
   44091             : 
   44092           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   44093             :                 discard_const_p(char *, kwnames),
   44094             :                 &bigendian_obj,
   44095             :                 &ndr64_obj)) {
   44096           0 :                 return NULL;
   44097             :         }
   44098             : 
   44099           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44100           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44101             :         }
   44102           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44103           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44104             :         }
   44105             : 
   44106           0 :         return py_netr_LogonGetCapabilities_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   44107             : }
   44108             : 
   44109           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   44110             : {
   44111           0 :         const struct ndr_interface_call *call = NULL;
   44112           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   44113           0 :         struct ndr_pull *pull = NULL;
   44114           0 :         enum ndr_err_code err;
   44115             : 
   44116           0 :         if (ndr_table_netlogon.num_calls < 22) {
   44117           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_unpack");
   44118           0 :                 return NULL;
   44119             :         }
   44120           0 :         call = &ndr_table_netlogon.calls[21];
   44121             : 
   44122           0 :         pull = ndr_pull_init_blob(blob, object);
   44123           0 :         if (pull == NULL) {
   44124           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44125           0 :                 return NULL;
   44126             :         }
   44127             : 
   44128           0 :         pull->flags |= ndr_pull_flags;
   44129             : 
   44130           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44131           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44132           0 :                 TALLOC_FREE(pull);
   44133           0 :                 PyErr_SetNdrError(err);
   44134           0 :                 return NULL;
   44135             :         }
   44136           0 :         if (!allow_remaining) {
   44137           0 :                 uint32_t highest_ofs;
   44138             : 
   44139           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44140           0 :                         highest_ofs = pull->offset;
   44141             :                 } else {
   44142           0 :                         highest_ofs = pull->relative_highest_offset;
   44143             :                 }
   44144           0 :                 if (highest_ofs < pull->data_size) {
   44145           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44146             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44147             :                                 highest_ofs, pull->data_size);
   44148           0 :                         TALLOC_FREE(pull);
   44149           0 :                         PyErr_SetNdrError(err);
   44150           0 :                         return NULL;
   44151             :                 }
   44152             :         }
   44153             : 
   44154           0 :         TALLOC_FREE(pull);
   44155           0 :         Py_RETURN_NONE;
   44156             : }
   44157             : 
   44158           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44159             : {
   44160           0 :         DATA_BLOB blob;
   44161           0 :         Py_ssize_t blob_length = 0;
   44162           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44163           0 :         PyObject *bigendian_obj = NULL;
   44164           0 :         PyObject *ndr64_obj = NULL;
   44165           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44166           0 :         PyObject *allow_remaining_obj = NULL;
   44167           0 :         bool allow_remaining = false;
   44168             : 
   44169           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44170             :                 discard_const_p(char *, kwnames),
   44171             :                 &blob.data, &blob_length,
   44172             :                 &bigendian_obj,
   44173             :                 &ndr64_obj,
   44174             :                 &allow_remaining_obj)) {
   44175           0 :                 return NULL;
   44176             :         }
   44177           0 :         blob.length = blob_length;
   44178             : 
   44179           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44180           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44181             :         }
   44182           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44183           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44184             :         }
   44185             : 
   44186           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44187           0 :                 allow_remaining = true;
   44188             :         }
   44189             : 
   44190           0 :         return py_netr_LogonGetCapabilities_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44191             : }
   44192             : 
   44193           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44194             : {
   44195           0 :         DATA_BLOB blob;
   44196           0 :         Py_ssize_t blob_length = 0;
   44197           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44198           0 :         PyObject *bigendian_obj = NULL;
   44199           0 :         PyObject *ndr64_obj = NULL;
   44200           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44201           0 :         PyObject *allow_remaining_obj = NULL;
   44202           0 :         bool allow_remaining = false;
   44203             : 
   44204           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44205             :                 discard_const_p(char *, kwnames),
   44206             :                 &blob.data, &blob_length,
   44207             :                 &bigendian_obj,
   44208             :                 &ndr64_obj,
   44209             :                 &allow_remaining_obj)) {
   44210           0 :                 return NULL;
   44211             :         }
   44212           0 :         blob.length = blob_length;
   44213             : 
   44214           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44215           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44216             :         }
   44217           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44218           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44219             :         }
   44220             : 
   44221           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44222           0 :                 allow_remaining = true;
   44223             :         }
   44224             : 
   44225           0 :         return py_netr_LogonGetCapabilities_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44226             : }
   44227             : 
   44228           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   44229             : {
   44230           0 :         const struct ndr_interface_call *call = NULL;
   44231           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   44232           0 :         PyObject *ret;
   44233           0 :         char *retstr;
   44234             : 
   44235           0 :         if (ndr_table_netlogon.num_calls < 22) {
   44236           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_print");
   44237           0 :                 return NULL;
   44238             :         }
   44239           0 :         call = &ndr_table_netlogon.calls[21];
   44240             : 
   44241           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44242           0 :         ret = PyUnicode_FromString(retstr);
   44243           0 :         TALLOC_FREE(retstr);
   44244             : 
   44245           0 :         return ret;
   44246             : }
   44247             : 
   44248           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44249             : {
   44250           0 :         return py_netr_LogonGetCapabilities_ndr_print(py_obj, "netr_LogonGetCapabilities_in", NDR_IN);
   44251             : }
   44252             : 
   44253           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44254             : {
   44255           0 :         return py_netr_LogonGetCapabilities_ndr_print(py_obj, "netr_LogonGetCapabilities_out", NDR_OUT);
   44256             : }
   44257             : 
   44258             : static PyMethodDef py_netr_LogonGetCapabilities_methods[] = {
   44259             :         { "opnum", (PyCFunction)py_netr_LogonGetCapabilities_ndr_opnum, METH_NOARGS|METH_CLASS,
   44260             :                 "netlogon.netr_LogonGetCapabilities.opnum() -> 21 (0x15) " },
   44261             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44262             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44263             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44264             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44265             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44266             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44267             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44268             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44269             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonGetCapabilities_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44270             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonGetCapabilities_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44271             :         { NULL, NULL, 0, NULL }
   44272             : };
   44273             : 
   44274             : 
   44275             : static PyTypeObject netr_LogonGetCapabilities_Type = {
   44276             :         PyVarObject_HEAD_INIT(NULL, 0)
   44277             :         .tp_name = "netlogon.netr_LogonGetCapabilities",
   44278             :         .tp_getset = py_netr_LogonGetCapabilities_getsetters,
   44279             :         .tp_methods = py_netr_LogonGetCapabilities_methods,
   44280             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44281             :         .tp_new = py_netr_LogonGetCapabilities_new,
   44282             : };
   44283             : 
   44284           0 : static bool pack_py_netr_LogonGetCapabilities_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetCapabilities *r)
   44285             : {
   44286           0 :         PyObject *py_server_name;
   44287           0 :         PyObject *py_computer_name;
   44288           0 :         PyObject *py_credential;
   44289           0 :         PyObject *py_return_authenticator;
   44290           0 :         PyObject *py_query_level;
   44291           0 :         const char *kwnames[] = {
   44292             :                 "server_name", "computer_name", "credential", "return_authenticator", "query_level", NULL
   44293             :         };
   44294             : 
   44295           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_LogonGetCapabilities", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_query_level)) {
   44296           0 :                 return false;
   44297             :         }
   44298             : 
   44299           0 :         if (py_server_name == NULL) {
   44300           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   44301           0 :                 return false;
   44302             :         }
   44303           0 :         r->in.server_name = talloc_ptrtype(r, r->in.server_name);
   44304           0 :         if (r->in.server_name == NULL) {
   44305           0 :                 PyErr_NoMemory();
   44306           0 :                 return false;
   44307             :         }
   44308             :         {
   44309           0 :                 const char *test_str;
   44310           0 :                 const char *talloc_str;
   44311           0 :                 PyObject *unicode = NULL;
   44312           0 :                 if (PyUnicode_Check(py_server_name)) {
   44313           0 :                         unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   44314           0 :                         if (unicode == NULL) {
   44315           0 :                                 PyErr_NoMemory();
   44316           0 :                                 return false;
   44317             :                         }
   44318           0 :                         test_str = PyBytes_AS_STRING(unicode);
   44319           0 :                 } else if (PyBytes_Check(py_server_name)) {
   44320           0 :                         test_str = PyBytes_AS_STRING(py_server_name);
   44321             :                 } else {
   44322           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   44323           0 :                         return false;
   44324             :                 }
   44325           0 :                 talloc_str = talloc_strdup(r, test_str);
   44326           0 :                 if (unicode != NULL) {
   44327           0 :                         Py_DECREF(unicode);
   44328             :                 }
   44329           0 :                 if (talloc_str == NULL) {
   44330           0 :                         PyErr_NoMemory();
   44331           0 :                         return false;
   44332             :                 }
   44333           0 :                 r->in.server_name = talloc_str;
   44334             :         }
   44335           0 :         if (py_computer_name == NULL) {
   44336           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   44337           0 :                 return false;
   44338             :         }
   44339           0 :         if (py_computer_name == Py_None) {
   44340           0 :                 r->in.computer_name = NULL;
   44341             :         } else {
   44342           0 :                 r->in.computer_name = NULL;
   44343             :                 {
   44344           0 :                         const char *test_str;
   44345           0 :                         const char *talloc_str;
   44346           0 :                         PyObject *unicode = NULL;
   44347           0 :                         if (PyUnicode_Check(py_computer_name)) {
   44348           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   44349           0 :                                 if (unicode == NULL) {
   44350           0 :                                         PyErr_NoMemory();
   44351           0 :                                         return false;
   44352             :                                 }
   44353           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44354           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   44355           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   44356             :                         } else {
   44357           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   44358           0 :                                 return false;
   44359             :                         }
   44360           0 :                         talloc_str = talloc_strdup(r, test_str);
   44361           0 :                         if (unicode != NULL) {
   44362           0 :                                 Py_DECREF(unicode);
   44363             :                         }
   44364           0 :                         if (talloc_str == NULL) {
   44365           0 :                                 PyErr_NoMemory();
   44366           0 :                                 return false;
   44367             :                         }
   44368           0 :                         r->in.computer_name = talloc_str;
   44369             :                 }
   44370             :         }
   44371           0 :         if (py_credential == NULL) {
   44372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   44373           0 :                 return false;
   44374             :         }
   44375           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   44376           0 :         if (r->in.credential == NULL) {
   44377           0 :                 PyErr_NoMemory();
   44378           0 :                 return false;
   44379             :         }
   44380           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   44381           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   44382           0 :                 PyErr_NoMemory();
   44383           0 :                 return false;
   44384             :         }
   44385           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   44386           0 :         if (py_return_authenticator == NULL) {
   44387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   44388           0 :                 return false;
   44389             :         }
   44390           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   44391           0 :         if (r->in.return_authenticator == NULL) {
   44392           0 :                 PyErr_NoMemory();
   44393           0 :                 return false;
   44394             :         }
   44395           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   44396           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   44397           0 :                 PyErr_NoMemory();
   44398           0 :                 return false;
   44399             :         }
   44400           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   44401           0 :         if (py_query_level == NULL) {
   44402           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.query_level");
   44403           0 :                 return false;
   44404             :         }
   44405             :         {
   44406           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.query_level));
   44407           0 :                 if (PyLong_Check(py_query_level)) {
   44408           0 :                         unsigned long long test_var;
   44409           0 :                         test_var = PyLong_AsUnsignedLongLong(py_query_level);
   44410           0 :                         if (PyErr_Occurred() != NULL) {
   44411           0 :                                 return false;
   44412             :                         }
   44413           0 :                         if (test_var > uint_max) {
   44414           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44415             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44416           0 :                                 return false;
   44417             :                         }
   44418           0 :                         r->in.query_level = test_var;
   44419             :                 } else {
   44420           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44421             :                           PyLong_Type.tp_name);
   44422           0 :                         return false;
   44423             :                 }
   44424             :         }
   44425           0 :         return true;
   44426             : }
   44427             : 
   44428           0 : static PyObject *unpack_py_netr_LogonGetCapabilities_args_out(struct netr_LogonGetCapabilities *r)
   44429             : {
   44430           0 :         PyObject *result;
   44431           0 :         PyObject *py_return_authenticator;
   44432           0 :         PyObject *py_capabilities;
   44433           0 :         result = PyTuple_New(2);
   44434           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   44435           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   44436           0 :         py_capabilities = pyrpc_import_union(&netr_Capabilities_Type, r->out.capabilities, r->in.query_level, r->out.capabilities, "union netr_Capabilities");
   44437           0 :         if (py_capabilities == NULL) {
   44438           0 :                 return NULL;
   44439             :         }
   44440           0 :         PyTuple_SetItem(result, 1, py_capabilities);
   44441           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   44442           0 :                 PyErr_SetNTSTATUS(r->out.result);
   44443           0 :                 return NULL;
   44444             :         }
   44445             : 
   44446           0 :         return result;
   44447             : }
   44448             : 
   44449             : 
   44450           0 : static PyObject *py_netr_LogonGetTrustRid_in_get_server_name(PyObject *obj, void *closure)
   44451             : {
   44452           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(obj);
   44453           0 :         PyObject *py_server_name;
   44454           0 :         if (object->in.server_name == NULL) {
   44455           0 :                 Py_RETURN_NONE;
   44456             :         }
   44457           0 :         if (object->in.server_name == NULL) {
   44458           0 :                 py_server_name = Py_None;
   44459           0 :                 Py_INCREF(py_server_name);
   44460             :         } else {
   44461           0 :                 if (object->in.server_name == NULL) {
   44462           0 :                         py_server_name = Py_None;
   44463           0 :                         Py_INCREF(py_server_name);
   44464             :                 } else {
   44465           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   44466             :                 }
   44467             :         }
   44468           0 :         return py_server_name;
   44469             : }
   44470             : 
   44471           0 : static int py_netr_LogonGetTrustRid_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   44472             : {
   44473           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44474           0 :         if (value == NULL) {
   44475           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   44476           0 :                 return -1;
   44477             :         }
   44478           0 :         if (value == Py_None) {
   44479           0 :                 object->in.server_name = NULL;
   44480             :         } else {
   44481           0 :                 object->in.server_name = NULL;
   44482             :                 {
   44483           0 :                         const char *test_str;
   44484           0 :                         const char *talloc_str;
   44485           0 :                         PyObject *unicode = NULL;
   44486           0 :                         if (PyUnicode_Check(value)) {
   44487           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44488           0 :                                 if (unicode == NULL) {
   44489           0 :                                         PyErr_NoMemory();
   44490           0 :                                         return -1;
   44491             :                                 }
   44492           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44493           0 :                         } else if (PyBytes_Check(value)) {
   44494           0 :                                 test_str = PyBytes_AS_STRING(value);
   44495             :                         } else {
   44496           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44497           0 :                                 return -1;
   44498             :                         }
   44499           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44500           0 :                         if (unicode != NULL) {
   44501           0 :                                 Py_DECREF(unicode);
   44502             :                         }
   44503           0 :                         if (talloc_str == NULL) {
   44504           0 :                                 PyErr_NoMemory();
   44505           0 :                                 return -1;
   44506             :                         }
   44507           0 :                         object->in.server_name = talloc_str;
   44508             :                 }
   44509             :         }
   44510           0 :         return 0;
   44511             : }
   44512             : 
   44513           0 : static PyObject *py_netr_LogonGetTrustRid_in_get_domain_name(PyObject *obj, void *closure)
   44514             : {
   44515           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(obj);
   44516           0 :         PyObject *py_domain_name;
   44517           0 :         if (object->in.domain_name == NULL) {
   44518           0 :                 Py_RETURN_NONE;
   44519             :         }
   44520           0 :         if (object->in.domain_name == NULL) {
   44521           0 :                 py_domain_name = Py_None;
   44522           0 :                 Py_INCREF(py_domain_name);
   44523             :         } else {
   44524           0 :                 if (object->in.domain_name == NULL) {
   44525           0 :                         py_domain_name = Py_None;
   44526           0 :                         Py_INCREF(py_domain_name);
   44527             :                 } else {
   44528           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   44529             :                 }
   44530             :         }
   44531           0 :         return py_domain_name;
   44532             : }
   44533             : 
   44534           0 : static int py_netr_LogonGetTrustRid_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   44535             : {
   44536           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44537           0 :         if (value == NULL) {
   44538           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   44539           0 :                 return -1;
   44540             :         }
   44541           0 :         if (value == Py_None) {
   44542           0 :                 object->in.domain_name = NULL;
   44543             :         } else {
   44544           0 :                 object->in.domain_name = NULL;
   44545             :                 {
   44546           0 :                         const char *test_str;
   44547           0 :                         const char *talloc_str;
   44548           0 :                         PyObject *unicode = NULL;
   44549           0 :                         if (PyUnicode_Check(value)) {
   44550           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44551           0 :                                 if (unicode == NULL) {
   44552           0 :                                         PyErr_NoMemory();
   44553           0 :                                         return -1;
   44554             :                                 }
   44555           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44556           0 :                         } else if (PyBytes_Check(value)) {
   44557           0 :                                 test_str = PyBytes_AS_STRING(value);
   44558             :                         } else {
   44559           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44560           0 :                                 return -1;
   44561             :                         }
   44562           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44563           0 :                         if (unicode != NULL) {
   44564           0 :                                 Py_DECREF(unicode);
   44565             :                         }
   44566           0 :                         if (talloc_str == NULL) {
   44567           0 :                                 PyErr_NoMemory();
   44568           0 :                                 return -1;
   44569             :                         }
   44570           0 :                         object->in.domain_name = talloc_str;
   44571             :                 }
   44572             :         }
   44573           0 :         return 0;
   44574             : }
   44575             : 
   44576           0 : static PyObject *py_netr_LogonGetTrustRid_out_get_rid(PyObject *obj, void *closure)
   44577             : {
   44578           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(obj);
   44579           0 :         PyObject *py_rid;
   44580           0 :         if (object->out.rid == NULL) {
   44581           0 :                 Py_RETURN_NONE;
   44582             :         }
   44583           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)*object->out.rid);
   44584           0 :         return py_rid;
   44585             : }
   44586             : 
   44587           0 : static int py_netr_LogonGetTrustRid_out_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   44588             : {
   44589           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44590           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rid));
   44591           0 :         if (value == NULL) {
   44592           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.rid");
   44593           0 :                 return -1;
   44594             :         }
   44595           0 :         object->out.rid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rid);
   44596           0 :         if (object->out.rid == NULL) {
   44597           0 :                 PyErr_NoMemory();
   44598           0 :                 return -1;
   44599             :         }
   44600             :         {
   44601           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.rid));
   44602           0 :                 if (PyLong_Check(value)) {
   44603           0 :                         unsigned long long test_var;
   44604           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44605           0 :                         if (PyErr_Occurred() != NULL) {
   44606           0 :                                 return -1;
   44607             :                         }
   44608           0 :                         if (test_var > uint_max) {
   44609           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44610             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44611           0 :                                 return -1;
   44612             :                         }
   44613           0 :                         *object->out.rid = test_var;
   44614             :                 } else {
   44615           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44616             :                           PyLong_Type.tp_name);
   44617           0 :                         return -1;
   44618             :                 }
   44619             :         }
   44620           0 :         return 0;
   44621             : }
   44622             : 
   44623           0 : static PyObject *py_netr_LogonGetTrustRid_get_result(PyObject *obj, void *closure)
   44624             : {
   44625           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(obj);
   44626           0 :         PyObject *py_result;
   44627           0 :         py_result = PyErr_FromWERROR(object->out.result);
   44628           0 :         return py_result;
   44629             : }
   44630             : 
   44631           0 : static int py_netr_LogonGetTrustRid_set_result(PyObject *py_obj, PyObject *value, void *closure)
   44632             : {
   44633           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44634           0 :         if (value == NULL) {
   44635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   44636           0 :                 return -1;
   44637             :         }
   44638           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   44639           0 :         return 0;
   44640             : }
   44641             : 
   44642             : static PyGetSetDef py_netr_LogonGetTrustRid_getsetters[] = {
   44643             :         {
   44644             :                 .name = discard_const_p(char, "in_server_name"),
   44645             :                 .get = py_netr_LogonGetTrustRid_in_get_server_name,
   44646             :                 .set = py_netr_LogonGetTrustRid_in_set_server_name,
   44647             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44648             :         },
   44649             :         {
   44650             :                 .name = discard_const_p(char, "in_domain_name"),
   44651             :                 .get = py_netr_LogonGetTrustRid_in_get_domain_name,
   44652             :                 .set = py_netr_LogonGetTrustRid_in_set_domain_name,
   44653             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44654             :         },
   44655             :         {
   44656             :                 .name = discard_const_p(char, "out_rid"),
   44657             :                 .get = py_netr_LogonGetTrustRid_out_get_rid,
   44658             :                 .set = py_netr_LogonGetTrustRid_out_set_rid,
   44659             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   44660             :         },
   44661             :         {
   44662             :                 .name = discard_const_p(char, "result"),
   44663             :                 .get = py_netr_LogonGetTrustRid_get_result,
   44664             :                 .set = py_netr_LogonGetTrustRid_set_result,
   44665             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   44666             :         },
   44667             :         { .name = NULL }
   44668             : };
   44669             : 
   44670           0 : static PyObject *py_netr_LogonGetTrustRid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44671             : {
   44672           0 :         PyObject *self = pytalloc_new(struct netr_LogonGetTrustRid, type);
   44673           0 :         struct netr_LogonGetTrustRid *_self = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(self);
   44674           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   44675           0 :         _self->out.rid = talloc_zero(mem_ctx, uint32_t);
   44676           0 :         return self;
   44677             : }
   44678             : 
   44679           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   44680             : {
   44681             : 
   44682             : 
   44683           0 :         return PyLong_FromLong(23);
   44684             : }
   44685             : 
   44686           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   44687             : {
   44688           0 :         const struct ndr_interface_call *call = NULL;
   44689           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44690           0 :         PyObject *ret = NULL;
   44691           0 :         struct ndr_push *push = NULL;
   44692           0 :         DATA_BLOB blob;
   44693           0 :         enum ndr_err_code err;
   44694             : 
   44695           0 :         if (ndr_table_netlogon.num_calls < 24) {
   44696           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_pack");
   44697           0 :                 return NULL;
   44698             :         }
   44699           0 :         call = &ndr_table_netlogon.calls[23];
   44700             : 
   44701           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   44702           0 :         if (push == NULL) {
   44703           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44704           0 :                 return NULL;
   44705             :         }
   44706             : 
   44707           0 :         push->flags |= ndr_push_flags;
   44708             : 
   44709           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   44710           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44711           0 :                 TALLOC_FREE(push);
   44712           0 :                 PyErr_SetNdrError(err);
   44713           0 :                 return NULL;
   44714             :         }
   44715           0 :         blob = ndr_push_blob(push);
   44716           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   44717           0 :         TALLOC_FREE(push);
   44718           0 :         return ret;
   44719             : }
   44720             : 
   44721           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44722             : {
   44723           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44724           0 :         PyObject *bigendian_obj = NULL;
   44725           0 :         PyObject *ndr64_obj = NULL;
   44726           0 :         libndr_flags ndr_push_flags = 0;
   44727             : 
   44728           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   44729             :                 discard_const_p(char *, kwnames),
   44730             :                 &bigendian_obj,
   44731             :                 &ndr64_obj)) {
   44732           0 :                 return NULL;
   44733             :         }
   44734             : 
   44735           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44736           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44737             :         }
   44738           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44739           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44740             :         }
   44741             : 
   44742           0 :         return py_netr_LogonGetTrustRid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   44743             : }
   44744             : 
   44745           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44746             : {
   44747           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44748           0 :         PyObject *bigendian_obj = NULL;
   44749           0 :         PyObject *ndr64_obj = NULL;
   44750           0 :         libndr_flags ndr_push_flags = 0;
   44751             : 
   44752           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   44753             :                 discard_const_p(char *, kwnames),
   44754             :                 &bigendian_obj,
   44755             :                 &ndr64_obj)) {
   44756           0 :                 return NULL;
   44757             :         }
   44758             : 
   44759           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44760           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44761             :         }
   44762           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44763           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44764             :         }
   44765             : 
   44766           0 :         return py_netr_LogonGetTrustRid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   44767             : }
   44768             : 
   44769           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   44770             : {
   44771           0 :         const struct ndr_interface_call *call = NULL;
   44772           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44773           0 :         struct ndr_pull *pull = NULL;
   44774           0 :         enum ndr_err_code err;
   44775             : 
   44776           0 :         if (ndr_table_netlogon.num_calls < 24) {
   44777           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_unpack");
   44778           0 :                 return NULL;
   44779             :         }
   44780           0 :         call = &ndr_table_netlogon.calls[23];
   44781             : 
   44782           0 :         pull = ndr_pull_init_blob(blob, object);
   44783           0 :         if (pull == NULL) {
   44784           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44785           0 :                 return NULL;
   44786             :         }
   44787             : 
   44788           0 :         pull->flags |= ndr_pull_flags;
   44789             : 
   44790           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44791           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44792           0 :                 TALLOC_FREE(pull);
   44793           0 :                 PyErr_SetNdrError(err);
   44794           0 :                 return NULL;
   44795             :         }
   44796           0 :         if (!allow_remaining) {
   44797           0 :                 uint32_t highest_ofs;
   44798             : 
   44799           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44800           0 :                         highest_ofs = pull->offset;
   44801             :                 } else {
   44802           0 :                         highest_ofs = pull->relative_highest_offset;
   44803             :                 }
   44804           0 :                 if (highest_ofs < pull->data_size) {
   44805           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44806             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44807             :                                 highest_ofs, pull->data_size);
   44808           0 :                         TALLOC_FREE(pull);
   44809           0 :                         PyErr_SetNdrError(err);
   44810           0 :                         return NULL;
   44811             :                 }
   44812             :         }
   44813             : 
   44814           0 :         TALLOC_FREE(pull);
   44815           0 :         Py_RETURN_NONE;
   44816             : }
   44817             : 
   44818           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44819             : {
   44820           0 :         DATA_BLOB blob;
   44821           0 :         Py_ssize_t blob_length = 0;
   44822           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44823           0 :         PyObject *bigendian_obj = NULL;
   44824           0 :         PyObject *ndr64_obj = NULL;
   44825           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44826           0 :         PyObject *allow_remaining_obj = NULL;
   44827           0 :         bool allow_remaining = false;
   44828             : 
   44829           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44830             :                 discard_const_p(char *, kwnames),
   44831             :                 &blob.data, &blob_length,
   44832             :                 &bigendian_obj,
   44833             :                 &ndr64_obj,
   44834             :                 &allow_remaining_obj)) {
   44835           0 :                 return NULL;
   44836             :         }
   44837           0 :         blob.length = blob_length;
   44838             : 
   44839           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44840           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44841             :         }
   44842           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44843           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44844             :         }
   44845             : 
   44846           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44847           0 :                 allow_remaining = true;
   44848             :         }
   44849             : 
   44850           0 :         return py_netr_LogonGetTrustRid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44851             : }
   44852             : 
   44853           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44854             : {
   44855           0 :         DATA_BLOB blob;
   44856           0 :         Py_ssize_t blob_length = 0;
   44857           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44858           0 :         PyObject *bigendian_obj = NULL;
   44859           0 :         PyObject *ndr64_obj = NULL;
   44860           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44861           0 :         PyObject *allow_remaining_obj = NULL;
   44862           0 :         bool allow_remaining = false;
   44863             : 
   44864           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44865             :                 discard_const_p(char *, kwnames),
   44866             :                 &blob.data, &blob_length,
   44867             :                 &bigendian_obj,
   44868             :                 &ndr64_obj,
   44869             :                 &allow_remaining_obj)) {
   44870           0 :                 return NULL;
   44871             :         }
   44872           0 :         blob.length = blob_length;
   44873             : 
   44874           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44875           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44876             :         }
   44877           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44878           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44879             :         }
   44880             : 
   44881           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44882           0 :                 allow_remaining = true;
   44883             :         }
   44884             : 
   44885           0 :         return py_netr_LogonGetTrustRid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44886             : }
   44887             : 
   44888           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   44889             : {
   44890           0 :         const struct ndr_interface_call *call = NULL;
   44891           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44892           0 :         PyObject *ret;
   44893           0 :         char *retstr;
   44894             : 
   44895           0 :         if (ndr_table_netlogon.num_calls < 24) {
   44896           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_print");
   44897           0 :                 return NULL;
   44898             :         }
   44899           0 :         call = &ndr_table_netlogon.calls[23];
   44900             : 
   44901           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44902           0 :         ret = PyUnicode_FromString(retstr);
   44903           0 :         TALLOC_FREE(retstr);
   44904             : 
   44905           0 :         return ret;
   44906             : }
   44907             : 
   44908           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44909             : {
   44910           0 :         return py_netr_LogonGetTrustRid_ndr_print(py_obj, "netr_LogonGetTrustRid_in", NDR_IN);
   44911             : }
   44912             : 
   44913           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44914             : {
   44915           0 :         return py_netr_LogonGetTrustRid_ndr_print(py_obj, "netr_LogonGetTrustRid_out", NDR_OUT);
   44916             : }
   44917             : 
   44918             : static PyMethodDef py_netr_LogonGetTrustRid_methods[] = {
   44919             :         { "opnum", (PyCFunction)py_netr_LogonGetTrustRid_ndr_opnum, METH_NOARGS|METH_CLASS,
   44920             :                 "netlogon.netr_LogonGetTrustRid.opnum() -> 23 (0x17) " },
   44921             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44922             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44923             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44924             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44925             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44926             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44927             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44928             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44929             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonGetTrustRid_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44930             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonGetTrustRid_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44931             :         { NULL, NULL, 0, NULL }
   44932             : };
   44933             : 
   44934             : 
   44935             : static PyTypeObject netr_LogonGetTrustRid_Type = {
   44936             :         PyVarObject_HEAD_INIT(NULL, 0)
   44937             :         .tp_name = "netlogon.netr_LogonGetTrustRid",
   44938             :         .tp_getset = py_netr_LogonGetTrustRid_getsetters,
   44939             :         .tp_methods = py_netr_LogonGetTrustRid_methods,
   44940             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44941             :         .tp_new = py_netr_LogonGetTrustRid_new,
   44942             : };
   44943             : 
   44944           0 : static bool pack_py_netr_LogonGetTrustRid_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetTrustRid *r)
   44945             : {
   44946           0 :         PyObject *py_server_name;
   44947           0 :         PyObject *py_domain_name;
   44948           0 :         const char *kwnames[] = {
   44949             :                 "server_name", "domain_name", NULL
   44950             :         };
   44951             : 
   44952           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_LogonGetTrustRid", discard_const_p(char *, kwnames), &py_server_name, &py_domain_name)) {
   44953           0 :                 return false;
   44954             :         }
   44955             : 
   44956           0 :         if (py_server_name == NULL) {
   44957           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   44958           0 :                 return false;
   44959             :         }
   44960           0 :         if (py_server_name == Py_None) {
   44961           0 :                 r->in.server_name = NULL;
   44962             :         } else {
   44963           0 :                 r->in.server_name = NULL;
   44964             :                 {
   44965           0 :                         const char *test_str;
   44966           0 :                         const char *talloc_str;
   44967           0 :                         PyObject *unicode = NULL;
   44968           0 :                         if (PyUnicode_Check(py_server_name)) {
   44969           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   44970           0 :                                 if (unicode == NULL) {
   44971           0 :                                         PyErr_NoMemory();
   44972           0 :                                         return false;
   44973             :                                 }
   44974           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44975           0 :                         } else if (PyBytes_Check(py_server_name)) {
   44976           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   44977             :                         } else {
   44978           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   44979           0 :                                 return false;
   44980             :                         }
   44981           0 :                         talloc_str = talloc_strdup(r, test_str);
   44982           0 :                         if (unicode != NULL) {
   44983           0 :                                 Py_DECREF(unicode);
   44984             :                         }
   44985           0 :                         if (talloc_str == NULL) {
   44986           0 :                                 PyErr_NoMemory();
   44987           0 :                                 return false;
   44988             :                         }
   44989           0 :                         r->in.server_name = talloc_str;
   44990             :                 }
   44991             :         }
   44992           0 :         if (py_domain_name == NULL) {
   44993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   44994           0 :                 return false;
   44995             :         }
   44996           0 :         if (py_domain_name == Py_None) {
   44997           0 :                 r->in.domain_name = NULL;
   44998             :         } else {
   44999           0 :                 r->in.domain_name = NULL;
   45000             :                 {
   45001           0 :                         const char *test_str;
   45002           0 :                         const char *talloc_str;
   45003           0 :                         PyObject *unicode = NULL;
   45004           0 :                         if (PyUnicode_Check(py_domain_name)) {
   45005           0 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   45006           0 :                                 if (unicode == NULL) {
   45007           0 :                                         PyErr_NoMemory();
   45008           0 :                                         return false;
   45009             :                                 }
   45010           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45011           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   45012           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   45013             :                         } else {
   45014           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   45015           0 :                                 return false;
   45016             :                         }
   45017           0 :                         talloc_str = talloc_strdup(r, test_str);
   45018           0 :                         if (unicode != NULL) {
   45019           0 :                                 Py_DECREF(unicode);
   45020             :                         }
   45021           0 :                         if (talloc_str == NULL) {
   45022           0 :                                 PyErr_NoMemory();
   45023           0 :                                 return false;
   45024             :                         }
   45025           0 :                         r->in.domain_name = talloc_str;
   45026             :                 }
   45027             :         }
   45028           0 :         return true;
   45029             : }
   45030             : 
   45031           0 : static PyObject *unpack_py_netr_LogonGetTrustRid_args_out(struct netr_LogonGetTrustRid *r)
   45032             : {
   45033           0 :         PyObject *result;
   45034           0 :         PyObject *py_rid;
   45035           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)*r->out.rid);
   45036           0 :         result = py_rid;
   45037           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   45038           0 :                 PyErr_SetWERROR(r->out.result);
   45039           0 :                 return NULL;
   45040             :         }
   45041             : 
   45042           0 :         return result;
   45043             : }
   45044             : 
   45045             : 
   45046           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_server_name(PyObject *obj, void *closure)
   45047             : {
   45048           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45049           0 :         PyObject *py_server_name;
   45050           0 :         if (object->in.server_name == NULL) {
   45051           0 :                 Py_RETURN_NONE;
   45052             :         }
   45053           0 :         if (object->in.server_name == NULL) {
   45054           0 :                 py_server_name = Py_None;
   45055           0 :                 Py_INCREF(py_server_name);
   45056             :         } else {
   45057           0 :                 if (object->in.server_name == NULL) {
   45058           0 :                         py_server_name = Py_None;
   45059           0 :                         Py_INCREF(py_server_name);
   45060             :                 } else {
   45061           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   45062             :                 }
   45063             :         }
   45064           0 :         return py_server_name;
   45065             : }
   45066             : 
   45067           0 : static int py_netr_ServerAuthenticate3_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   45068             : {
   45069           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45070           0 :         if (value == NULL) {
   45071           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   45072           0 :                 return -1;
   45073             :         }
   45074           0 :         if (value == Py_None) {
   45075           0 :                 object->in.server_name = NULL;
   45076             :         } else {
   45077           0 :                 object->in.server_name = NULL;
   45078             :                 {
   45079           0 :                         const char *test_str;
   45080           0 :                         const char *talloc_str;
   45081           0 :                         PyObject *unicode = NULL;
   45082           0 :                         if (PyUnicode_Check(value)) {
   45083           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45084           0 :                                 if (unicode == NULL) {
   45085           0 :                                         PyErr_NoMemory();
   45086           0 :                                         return -1;
   45087             :                                 }
   45088           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45089           0 :                         } else if (PyBytes_Check(value)) {
   45090           0 :                                 test_str = PyBytes_AS_STRING(value);
   45091             :                         } else {
   45092           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45093           0 :                                 return -1;
   45094             :                         }
   45095           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45096           0 :                         if (unicode != NULL) {
   45097           0 :                                 Py_DECREF(unicode);
   45098             :                         }
   45099           0 :                         if (talloc_str == NULL) {
   45100           0 :                                 PyErr_NoMemory();
   45101           0 :                                 return -1;
   45102             :                         }
   45103           0 :                         object->in.server_name = talloc_str;
   45104             :                 }
   45105             :         }
   45106           0 :         return 0;
   45107             : }
   45108             : 
   45109           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_account_name(PyObject *obj, void *closure)
   45110             : {
   45111           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45112           0 :         PyObject *py_account_name;
   45113           0 :         if (object->in.account_name == NULL) {
   45114           0 :                 Py_RETURN_NONE;
   45115             :         }
   45116           0 :         if (object->in.account_name == NULL) {
   45117           0 :                 py_account_name = Py_None;
   45118           0 :                 Py_INCREF(py_account_name);
   45119             :         } else {
   45120           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   45121             :         }
   45122           0 :         return py_account_name;
   45123             : }
   45124             : 
   45125           0 : static int py_netr_ServerAuthenticate3_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   45126             : {
   45127           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45128           0 :         if (value == NULL) {
   45129           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   45130           0 :                 return -1;
   45131             :         }
   45132           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   45133           0 :         if (object->in.account_name == NULL) {
   45134           0 :                 PyErr_NoMemory();
   45135           0 :                 return -1;
   45136             :         }
   45137             :         {
   45138           0 :                 const char *test_str;
   45139           0 :                 const char *talloc_str;
   45140           0 :                 PyObject *unicode = NULL;
   45141           0 :                 if (PyUnicode_Check(value)) {
   45142           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45143           0 :                         if (unicode == NULL) {
   45144           0 :                                 PyErr_NoMemory();
   45145           0 :                                 return -1;
   45146             :                         }
   45147           0 :                         test_str = PyBytes_AS_STRING(unicode);
   45148           0 :                 } else if (PyBytes_Check(value)) {
   45149           0 :                         test_str = PyBytes_AS_STRING(value);
   45150             :                 } else {
   45151           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45152           0 :                         return -1;
   45153             :                 }
   45154           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45155           0 :                 if (unicode != NULL) {
   45156           0 :                         Py_DECREF(unicode);
   45157             :                 }
   45158           0 :                 if (talloc_str == NULL) {
   45159           0 :                         PyErr_NoMemory();
   45160           0 :                         return -1;
   45161             :                 }
   45162           0 :                 object->in.account_name = talloc_str;
   45163             :         }
   45164           0 :         return 0;
   45165             : }
   45166             : 
   45167           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_secure_channel_type(PyObject *obj, void *closure)
   45168             : {
   45169           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45170           0 :         PyObject *py_secure_channel_type;
   45171           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   45172           0 :         return py_secure_channel_type;
   45173             : }
   45174             : 
   45175           0 : static int py_netr_ServerAuthenticate3_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   45176             : {
   45177           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45178           0 :         if (value == NULL) {
   45179           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   45180           0 :                 return -1;
   45181             :         }
   45182             :         {
   45183           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   45184           0 :                 if (PyLong_Check(value)) {
   45185           0 :                         unsigned long long test_var;
   45186           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45187           0 :                         if (PyErr_Occurred() != NULL) {
   45188           0 :                                 return -1;
   45189             :                         }
   45190           0 :                         if (test_var > uint_max) {
   45191           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45192             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45193           0 :                                 return -1;
   45194             :                         }
   45195           0 :                         object->in.secure_channel_type = test_var;
   45196             :                 } else {
   45197           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45198             :                           PyLong_Type.tp_name);
   45199           0 :                         return -1;
   45200             :                 }
   45201             :         }
   45202           0 :         return 0;
   45203             : }
   45204             : 
   45205           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_computer_name(PyObject *obj, void *closure)
   45206             : {
   45207           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45208           0 :         PyObject *py_computer_name;
   45209           0 :         if (object->in.computer_name == NULL) {
   45210           0 :                 Py_RETURN_NONE;
   45211             :         }
   45212           0 :         if (object->in.computer_name == NULL) {
   45213           0 :                 py_computer_name = Py_None;
   45214           0 :                 Py_INCREF(py_computer_name);
   45215             :         } else {
   45216           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   45217             :         }
   45218           0 :         return py_computer_name;
   45219             : }
   45220             : 
   45221           0 : static int py_netr_ServerAuthenticate3_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   45222             : {
   45223           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45224           0 :         if (value == NULL) {
   45225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   45226           0 :                 return -1;
   45227             :         }
   45228           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   45229           0 :         if (object->in.computer_name == NULL) {
   45230           0 :                 PyErr_NoMemory();
   45231           0 :                 return -1;
   45232             :         }
   45233             :         {
   45234           0 :                 const char *test_str;
   45235           0 :                 const char *talloc_str;
   45236           0 :                 PyObject *unicode = NULL;
   45237           0 :                 if (PyUnicode_Check(value)) {
   45238           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45239           0 :                         if (unicode == NULL) {
   45240           0 :                                 PyErr_NoMemory();
   45241           0 :                                 return -1;
   45242             :                         }
   45243           0 :                         test_str = PyBytes_AS_STRING(unicode);
   45244           0 :                 } else if (PyBytes_Check(value)) {
   45245           0 :                         test_str = PyBytes_AS_STRING(value);
   45246             :                 } else {
   45247           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45248           0 :                         return -1;
   45249             :                 }
   45250           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45251           0 :                 if (unicode != NULL) {
   45252           0 :                         Py_DECREF(unicode);
   45253             :                 }
   45254           0 :                 if (talloc_str == NULL) {
   45255           0 :                         PyErr_NoMemory();
   45256           0 :                         return -1;
   45257             :                 }
   45258           0 :                 object->in.computer_name = talloc_str;
   45259             :         }
   45260           0 :         return 0;
   45261             : }
   45262             : 
   45263           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_credentials(PyObject *obj, void *closure)
   45264             : {
   45265           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45266           0 :         PyObject *py_credentials;
   45267           0 :         if (object->in.credentials == NULL) {
   45268           0 :                 Py_RETURN_NONE;
   45269             :         }
   45270           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   45271           0 :         return py_credentials;
   45272             : }
   45273             : 
   45274           0 : static int py_netr_ServerAuthenticate3_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   45275             : {
   45276           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45277           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   45278           0 :         if (value == NULL) {
   45279           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credentials");
   45280           0 :                 return -1;
   45281             :         }
   45282           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   45283           0 :         if (object->in.credentials == NULL) {
   45284           0 :                 PyErr_NoMemory();
   45285           0 :                 return -1;
   45286             :         }
   45287           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   45288           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   45289           0 :                 PyErr_NoMemory();
   45290           0 :                 return -1;
   45291             :         }
   45292           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   45293           0 :         return 0;
   45294             : }
   45295             : 
   45296           0 : static PyObject *py_netr_ServerAuthenticate3_out_get_return_credentials(PyObject *obj, void *closure)
   45297             : {
   45298           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45299           0 :         PyObject *py_return_credentials;
   45300           0 :         if (object->out.return_credentials == NULL) {
   45301           0 :                 Py_RETURN_NONE;
   45302             :         }
   45303           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   45304           0 :         return py_return_credentials;
   45305             : }
   45306             : 
   45307           0 : static int py_netr_ServerAuthenticate3_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   45308             : {
   45309           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45310           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   45311           0 :         if (value == NULL) {
   45312           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_credentials");
   45313           0 :                 return -1;
   45314             :         }
   45315           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   45316           0 :         if (object->out.return_credentials == NULL) {
   45317           0 :                 PyErr_NoMemory();
   45318           0 :                 return -1;
   45319             :         }
   45320           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   45321           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   45322           0 :                 PyErr_NoMemory();
   45323           0 :                 return -1;
   45324             :         }
   45325           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   45326           0 :         return 0;
   45327             : }
   45328             : 
   45329           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_negotiate_flags(PyObject *obj, void *closure)
   45330             : {
   45331           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45332           0 :         PyObject *py_negotiate_flags;
   45333           0 :         if (object->in.negotiate_flags == NULL) {
   45334           0 :                 Py_RETURN_NONE;
   45335             :         }
   45336           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->in.negotiate_flags);
   45337           0 :         return py_negotiate_flags;
   45338             : }
   45339             : 
   45340           0 : static int py_netr_ServerAuthenticate3_in_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   45341             : {
   45342           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45343           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.negotiate_flags));
   45344           0 :         if (value == NULL) {
   45345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.negotiate_flags");
   45346           0 :                 return -1;
   45347             :         }
   45348           0 :         object->in.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.negotiate_flags);
   45349           0 :         if (object->in.negotiate_flags == NULL) {
   45350           0 :                 PyErr_NoMemory();
   45351           0 :                 return -1;
   45352             :         }
   45353             :         {
   45354           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.negotiate_flags));
   45355           0 :                 if (PyLong_Check(value)) {
   45356           0 :                         unsigned long long test_var;
   45357           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45358           0 :                         if (PyErr_Occurred() != NULL) {
   45359           0 :                                 return -1;
   45360             :                         }
   45361           0 :                         if (test_var > uint_max) {
   45362           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45363             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45364           0 :                                 return -1;
   45365             :                         }
   45366           0 :                         *object->in.negotiate_flags = test_var;
   45367             :                 } else {
   45368           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45369             :                           PyLong_Type.tp_name);
   45370           0 :                         return -1;
   45371             :                 }
   45372             :         }
   45373           0 :         return 0;
   45374             : }
   45375             : 
   45376           0 : static PyObject *py_netr_ServerAuthenticate3_out_get_negotiate_flags(PyObject *obj, void *closure)
   45377             : {
   45378           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45379           0 :         PyObject *py_negotiate_flags;
   45380           0 :         if (object->out.negotiate_flags == NULL) {
   45381           0 :                 Py_RETURN_NONE;
   45382             :         }
   45383           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->out.negotiate_flags);
   45384           0 :         return py_negotiate_flags;
   45385             : }
   45386             : 
   45387           0 : static int py_netr_ServerAuthenticate3_out_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   45388             : {
   45389           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45390           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.negotiate_flags));
   45391           0 :         if (value == NULL) {
   45392           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.negotiate_flags");
   45393           0 :                 return -1;
   45394             :         }
   45395           0 :         object->out.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.negotiate_flags);
   45396           0 :         if (object->out.negotiate_flags == NULL) {
   45397           0 :                 PyErr_NoMemory();
   45398           0 :                 return -1;
   45399             :         }
   45400             :         {
   45401           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.negotiate_flags));
   45402           0 :                 if (PyLong_Check(value)) {
   45403           0 :                         unsigned long long test_var;
   45404           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45405           0 :                         if (PyErr_Occurred() != NULL) {
   45406           0 :                                 return -1;
   45407             :                         }
   45408           0 :                         if (test_var > uint_max) {
   45409           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45410             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45411           0 :                                 return -1;
   45412             :                         }
   45413           0 :                         *object->out.negotiate_flags = test_var;
   45414             :                 } else {
   45415           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45416             :                           PyLong_Type.tp_name);
   45417           0 :                         return -1;
   45418             :                 }
   45419             :         }
   45420           0 :         return 0;
   45421             : }
   45422             : 
   45423           0 : static PyObject *py_netr_ServerAuthenticate3_out_get_rid(PyObject *obj, void *closure)
   45424             : {
   45425           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45426           0 :         PyObject *py_rid;
   45427           0 :         if (object->out.rid == NULL) {
   45428           0 :                 Py_RETURN_NONE;
   45429             :         }
   45430           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)*object->out.rid);
   45431           0 :         return py_rid;
   45432             : }
   45433             : 
   45434           0 : static int py_netr_ServerAuthenticate3_out_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   45435             : {
   45436           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45437           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rid));
   45438           0 :         if (value == NULL) {
   45439           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.rid");
   45440           0 :                 return -1;
   45441             :         }
   45442           0 :         object->out.rid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rid);
   45443           0 :         if (object->out.rid == NULL) {
   45444           0 :                 PyErr_NoMemory();
   45445           0 :                 return -1;
   45446             :         }
   45447             :         {
   45448           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.rid));
   45449           0 :                 if (PyLong_Check(value)) {
   45450           0 :                         unsigned long long test_var;
   45451           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45452           0 :                         if (PyErr_Occurred() != NULL) {
   45453           0 :                                 return -1;
   45454             :                         }
   45455           0 :                         if (test_var > uint_max) {
   45456           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45457             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45458           0 :                                 return -1;
   45459             :                         }
   45460           0 :                         *object->out.rid = test_var;
   45461             :                 } else {
   45462           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45463             :                           PyLong_Type.tp_name);
   45464           0 :                         return -1;
   45465             :                 }
   45466             :         }
   45467           0 :         return 0;
   45468             : }
   45469             : 
   45470           0 : static PyObject *py_netr_ServerAuthenticate3_get_result(PyObject *obj, void *closure)
   45471             : {
   45472           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45473           0 :         PyObject *py_result;
   45474           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   45475           0 :         return py_result;
   45476             : }
   45477             : 
   45478           0 : static int py_netr_ServerAuthenticate3_set_result(PyObject *py_obj, PyObject *value, void *closure)
   45479             : {
   45480           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45481           0 :         if (value == NULL) {
   45482           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   45483           0 :                 return -1;
   45484             :         }
   45485           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   45486           0 :         return 0;
   45487             : }
   45488             : 
   45489             : static PyGetSetDef py_netr_ServerAuthenticate3_getsetters[] = {
   45490             :         {
   45491             :                 .name = discard_const_p(char, "in_server_name"),
   45492             :                 .get = py_netr_ServerAuthenticate3_in_get_server_name,
   45493             :                 .set = py_netr_ServerAuthenticate3_in_set_server_name,
   45494             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45495             :         },
   45496             :         {
   45497             :                 .name = discard_const_p(char, "in_account_name"),
   45498             :                 .get = py_netr_ServerAuthenticate3_in_get_account_name,
   45499             :                 .set = py_netr_ServerAuthenticate3_in_set_account_name,
   45500             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45501             :         },
   45502             :         {
   45503             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   45504             :                 .get = py_netr_ServerAuthenticate3_in_get_secure_channel_type,
   45505             :                 .set = py_netr_ServerAuthenticate3_in_set_secure_channel_type,
   45506             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   45507             :         },
   45508             :         {
   45509             :                 .name = discard_const_p(char, "in_computer_name"),
   45510             :                 .get = py_netr_ServerAuthenticate3_in_get_computer_name,
   45511             :                 .set = py_netr_ServerAuthenticate3_in_set_computer_name,
   45512             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45513             :         },
   45514             :         {
   45515             :                 .name = discard_const_p(char, "in_credentials"),
   45516             :                 .get = py_netr_ServerAuthenticate3_in_get_credentials,
   45517             :                 .set = py_netr_ServerAuthenticate3_in_set_credentials,
   45518             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   45519             :         },
   45520             :         {
   45521             :                 .name = discard_const_p(char, "out_return_credentials"),
   45522             :                 .get = py_netr_ServerAuthenticate3_out_get_return_credentials,
   45523             :                 .set = py_netr_ServerAuthenticate3_out_set_return_credentials,
   45524             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   45525             :         },
   45526             :         {
   45527             :                 .name = discard_const_p(char, "in_negotiate_flags"),
   45528             :                 .get = py_netr_ServerAuthenticate3_in_get_negotiate_flags,
   45529             :                 .set = py_netr_ServerAuthenticate3_in_set_negotiate_flags,
   45530             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   45531             :         },
   45532             :         {
   45533             :                 .name = discard_const_p(char, "out_negotiate_flags"),
   45534             :                 .get = py_netr_ServerAuthenticate3_out_get_negotiate_flags,
   45535             :                 .set = py_netr_ServerAuthenticate3_out_set_negotiate_flags,
   45536             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   45537             :         },
   45538             :         {
   45539             :                 .name = discard_const_p(char, "out_rid"),
   45540             :                 .get = py_netr_ServerAuthenticate3_out_get_rid,
   45541             :                 .set = py_netr_ServerAuthenticate3_out_set_rid,
   45542             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45543             :         },
   45544             :         {
   45545             :                 .name = discard_const_p(char, "result"),
   45546             :                 .get = py_netr_ServerAuthenticate3_get_result,
   45547             :                 .set = py_netr_ServerAuthenticate3_set_result,
   45548             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   45549             :         },
   45550             :         { .name = NULL }
   45551             : };
   45552             : 
   45553           0 : static PyObject *py_netr_ServerAuthenticate3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   45554             : {
   45555           0 :         PyObject *self = pytalloc_new(struct netr_ServerAuthenticate3, type);
   45556           0 :         struct netr_ServerAuthenticate3 *_self = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(self);
   45557           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   45558           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   45559           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   45560           0 :         _self->in.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   45561           0 :         _self->out.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   45562           0 :         _self->out.rid = talloc_zero(mem_ctx, uint32_t);
   45563           0 :         return self;
   45564             : }
   45565             : 
   45566           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   45567             : {
   45568             : 
   45569             : 
   45570           0 :         return PyLong_FromLong(26);
   45571             : }
   45572             : 
   45573           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   45574             : {
   45575           0 :         const struct ndr_interface_call *call = NULL;
   45576           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45577           0 :         PyObject *ret = NULL;
   45578           0 :         struct ndr_push *push = NULL;
   45579           0 :         DATA_BLOB blob;
   45580           0 :         enum ndr_err_code err;
   45581             : 
   45582           0 :         if (ndr_table_netlogon.num_calls < 27) {
   45583           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_pack");
   45584           0 :                 return NULL;
   45585             :         }
   45586           0 :         call = &ndr_table_netlogon.calls[26];
   45587             : 
   45588           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   45589           0 :         if (push == NULL) {
   45590           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45591           0 :                 return NULL;
   45592             :         }
   45593             : 
   45594           0 :         push->flags |= ndr_push_flags;
   45595             : 
   45596           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   45597           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45598           0 :                 TALLOC_FREE(push);
   45599           0 :                 PyErr_SetNdrError(err);
   45600           0 :                 return NULL;
   45601             :         }
   45602           0 :         blob = ndr_push_blob(push);
   45603           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   45604           0 :         TALLOC_FREE(push);
   45605           0 :         return ret;
   45606             : }
   45607             : 
   45608           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45609             : {
   45610           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45611           0 :         PyObject *bigendian_obj = NULL;
   45612           0 :         PyObject *ndr64_obj = NULL;
   45613           0 :         libndr_flags ndr_push_flags = 0;
   45614             : 
   45615           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   45616             :                 discard_const_p(char *, kwnames),
   45617             :                 &bigendian_obj,
   45618             :                 &ndr64_obj)) {
   45619           0 :                 return NULL;
   45620             :         }
   45621             : 
   45622           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45623           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45624             :         }
   45625           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45626           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45627             :         }
   45628             : 
   45629           0 :         return py_netr_ServerAuthenticate3_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   45630             : }
   45631             : 
   45632           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45633             : {
   45634           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45635           0 :         PyObject *bigendian_obj = NULL;
   45636           0 :         PyObject *ndr64_obj = NULL;
   45637           0 :         libndr_flags ndr_push_flags = 0;
   45638             : 
   45639           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   45640             :                 discard_const_p(char *, kwnames),
   45641             :                 &bigendian_obj,
   45642             :                 &ndr64_obj)) {
   45643           0 :                 return NULL;
   45644             :         }
   45645             : 
   45646           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45647           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45648             :         }
   45649           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45650           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45651             :         }
   45652             : 
   45653           0 :         return py_netr_ServerAuthenticate3_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   45654             : }
   45655             : 
   45656           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   45657             : {
   45658           0 :         const struct ndr_interface_call *call = NULL;
   45659           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45660           0 :         struct ndr_pull *pull = NULL;
   45661           0 :         enum ndr_err_code err;
   45662             : 
   45663           0 :         if (ndr_table_netlogon.num_calls < 27) {
   45664           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_unpack");
   45665           0 :                 return NULL;
   45666             :         }
   45667           0 :         call = &ndr_table_netlogon.calls[26];
   45668             : 
   45669           0 :         pull = ndr_pull_init_blob(blob, object);
   45670           0 :         if (pull == NULL) {
   45671           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45672           0 :                 return NULL;
   45673             :         }
   45674             : 
   45675           0 :         pull->flags |= ndr_pull_flags;
   45676             : 
   45677           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   45678           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45679           0 :                 TALLOC_FREE(pull);
   45680           0 :                 PyErr_SetNdrError(err);
   45681           0 :                 return NULL;
   45682             :         }
   45683           0 :         if (!allow_remaining) {
   45684           0 :                 uint32_t highest_ofs;
   45685             : 
   45686           0 :                 if (pull->offset > pull->relative_highest_offset) {
   45687           0 :                         highest_ofs = pull->offset;
   45688             :                 } else {
   45689           0 :                         highest_ofs = pull->relative_highest_offset;
   45690             :                 }
   45691           0 :                 if (highest_ofs < pull->data_size) {
   45692           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   45693             :                                 "not all bytes consumed ofs[%u] size[%u]",
   45694             :                                 highest_ofs, pull->data_size);
   45695           0 :                         TALLOC_FREE(pull);
   45696           0 :                         PyErr_SetNdrError(err);
   45697           0 :                         return NULL;
   45698             :                 }
   45699             :         }
   45700             : 
   45701           0 :         TALLOC_FREE(pull);
   45702           0 :         Py_RETURN_NONE;
   45703             : }
   45704             : 
   45705           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45706             : {
   45707           0 :         DATA_BLOB blob;
   45708           0 :         Py_ssize_t blob_length = 0;
   45709           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45710           0 :         PyObject *bigendian_obj = NULL;
   45711           0 :         PyObject *ndr64_obj = NULL;
   45712           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45713           0 :         PyObject *allow_remaining_obj = NULL;
   45714           0 :         bool allow_remaining = false;
   45715             : 
   45716           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   45717             :                 discard_const_p(char *, kwnames),
   45718             :                 &blob.data, &blob_length,
   45719             :                 &bigendian_obj,
   45720             :                 &ndr64_obj,
   45721             :                 &allow_remaining_obj)) {
   45722           0 :                 return NULL;
   45723             :         }
   45724           0 :         blob.length = blob_length;
   45725             : 
   45726           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45727           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45728             :         }
   45729           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45730           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45731             :         }
   45732             : 
   45733           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45734           0 :                 allow_remaining = true;
   45735             :         }
   45736             : 
   45737           0 :         return py_netr_ServerAuthenticate3_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   45738             : }
   45739             : 
   45740           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45741             : {
   45742           0 :         DATA_BLOB blob;
   45743           0 :         Py_ssize_t blob_length = 0;
   45744           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45745           0 :         PyObject *bigendian_obj = NULL;
   45746           0 :         PyObject *ndr64_obj = NULL;
   45747           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45748           0 :         PyObject *allow_remaining_obj = NULL;
   45749           0 :         bool allow_remaining = false;
   45750             : 
   45751           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   45752             :                 discard_const_p(char *, kwnames),
   45753             :                 &blob.data, &blob_length,
   45754             :                 &bigendian_obj,
   45755             :                 &ndr64_obj,
   45756             :                 &allow_remaining_obj)) {
   45757           0 :                 return NULL;
   45758             :         }
   45759           0 :         blob.length = blob_length;
   45760             : 
   45761           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45762           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45763             :         }
   45764           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45765           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45766             :         }
   45767             : 
   45768           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45769           0 :                 allow_remaining = true;
   45770             :         }
   45771             : 
   45772           0 :         return py_netr_ServerAuthenticate3_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   45773             : }
   45774             : 
   45775           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   45776             : {
   45777           0 :         const struct ndr_interface_call *call = NULL;
   45778           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45779           0 :         PyObject *ret;
   45780           0 :         char *retstr;
   45781             : 
   45782           0 :         if (ndr_table_netlogon.num_calls < 27) {
   45783           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_print");
   45784           0 :                 return NULL;
   45785             :         }
   45786           0 :         call = &ndr_table_netlogon.calls[26];
   45787             : 
   45788           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   45789           0 :         ret = PyUnicode_FromString(retstr);
   45790           0 :         TALLOC_FREE(retstr);
   45791             : 
   45792           0 :         return ret;
   45793             : }
   45794             : 
   45795           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45796             : {
   45797           0 :         return py_netr_ServerAuthenticate3_ndr_print(py_obj, "netr_ServerAuthenticate3_in", NDR_IN);
   45798             : }
   45799             : 
   45800           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45801             : {
   45802           0 :         return py_netr_ServerAuthenticate3_ndr_print(py_obj, "netr_ServerAuthenticate3_out", NDR_OUT);
   45803             : }
   45804             : 
   45805             : static PyMethodDef py_netr_ServerAuthenticate3_methods[] = {
   45806             :         { "opnum", (PyCFunction)py_netr_ServerAuthenticate3_ndr_opnum, METH_NOARGS|METH_CLASS,
   45807             :                 "netlogon.netr_ServerAuthenticate3.opnum() -> 26 (0x1a) " },
   45808             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   45809             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   45810             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   45811             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   45812             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   45813             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   45814             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   45815             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   45816             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerAuthenticate3_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   45817             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerAuthenticate3_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   45818             :         { NULL, NULL, 0, NULL }
   45819             : };
   45820             : 
   45821             : 
   45822             : static PyTypeObject netr_ServerAuthenticate3_Type = {
   45823             :         PyVarObject_HEAD_INIT(NULL, 0)
   45824             :         .tp_name = "netlogon.netr_ServerAuthenticate3",
   45825             :         .tp_getset = py_netr_ServerAuthenticate3_getsetters,
   45826             :         .tp_methods = py_netr_ServerAuthenticate3_methods,
   45827             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   45828             :         .tp_new = py_netr_ServerAuthenticate3_new,
   45829             : };
   45830             : 
   45831           4 : static bool pack_py_netr_ServerAuthenticate3_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate3 *r)
   45832             : {
   45833           0 :         PyObject *py_server_name;
   45834           0 :         PyObject *py_account_name;
   45835           0 :         PyObject *py_secure_channel_type;
   45836           0 :         PyObject *py_computer_name;
   45837           0 :         PyObject *py_credentials;
   45838           0 :         PyObject *py_negotiate_flags;
   45839           4 :         const char *kwnames[] = {
   45840             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credentials", "negotiate_flags", NULL
   45841             :         };
   45842             : 
   45843           4 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_ServerAuthenticate3", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credentials, &py_negotiate_flags)) {
   45844           0 :                 return false;
   45845             :         }
   45846             : 
   45847           4 :         if (py_server_name == NULL) {
   45848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   45849           0 :                 return false;
   45850             :         }
   45851           4 :         if (py_server_name == Py_None) {
   45852           0 :                 r->in.server_name = NULL;
   45853             :         } else {
   45854           4 :                 r->in.server_name = NULL;
   45855             :                 {
   45856           0 :                         const char *test_str;
   45857           0 :                         const char *talloc_str;
   45858           4 :                         PyObject *unicode = NULL;
   45859           4 :                         if (PyUnicode_Check(py_server_name)) {
   45860           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   45861           4 :                                 if (unicode == NULL) {
   45862           0 :                                         PyErr_NoMemory();
   45863           0 :                                         return false;
   45864             :                                 }
   45865           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   45866           0 :                         } else if (PyBytes_Check(py_server_name)) {
   45867           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   45868             :                         } else {
   45869           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   45870           0 :                                 return false;
   45871             :                         }
   45872           4 :                         talloc_str = talloc_strdup(r, test_str);
   45873           4 :                         if (unicode != NULL) {
   45874           4 :                                 Py_DECREF(unicode);
   45875             :                         }
   45876           4 :                         if (talloc_str == NULL) {
   45877           0 :                                 PyErr_NoMemory();
   45878           0 :                                 return false;
   45879             :                         }
   45880           4 :                         r->in.server_name = talloc_str;
   45881             :                 }
   45882             :         }
   45883           4 :         if (py_account_name == NULL) {
   45884           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   45885           0 :                 return false;
   45886             :         }
   45887           4 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   45888           4 :         if (r->in.account_name == NULL) {
   45889           0 :                 PyErr_NoMemory();
   45890           0 :                 return false;
   45891             :         }
   45892             :         {
   45893           0 :                 const char *test_str;
   45894           0 :                 const char *talloc_str;
   45895           4 :                 PyObject *unicode = NULL;
   45896           4 :                 if (PyUnicode_Check(py_account_name)) {
   45897           4 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   45898           4 :                         if (unicode == NULL) {
   45899           0 :                                 PyErr_NoMemory();
   45900           0 :                                 return false;
   45901             :                         }
   45902           4 :                         test_str = PyBytes_AS_STRING(unicode);
   45903           0 :                 } else if (PyBytes_Check(py_account_name)) {
   45904           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   45905             :                 } else {
   45906           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   45907           0 :                         return false;
   45908             :                 }
   45909           4 :                 talloc_str = talloc_strdup(r, test_str);
   45910           4 :                 if (unicode != NULL) {
   45911           4 :                         Py_DECREF(unicode);
   45912             :                 }
   45913           4 :                 if (talloc_str == NULL) {
   45914           0 :                         PyErr_NoMemory();
   45915           0 :                         return false;
   45916             :                 }
   45917           4 :                 r->in.account_name = talloc_str;
   45918             :         }
   45919           4 :         if (py_secure_channel_type == NULL) {
   45920           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   45921           0 :                 return false;
   45922             :         }
   45923             :         {
   45924           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   45925           4 :                 if (PyLong_Check(py_secure_channel_type)) {
   45926           0 :                         unsigned long long test_var;
   45927           4 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   45928           4 :                         if (PyErr_Occurred() != NULL) {
   45929           0 :                                 return false;
   45930             :                         }
   45931           4 :                         if (test_var > uint_max) {
   45932           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45933             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45934           0 :                                 return false;
   45935             :                         }
   45936           4 :                         r->in.secure_channel_type = test_var;
   45937             :                 } else {
   45938           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45939             :                           PyLong_Type.tp_name);
   45940           0 :                         return false;
   45941             :                 }
   45942             :         }
   45943           4 :         if (py_computer_name == NULL) {
   45944           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   45945           0 :                 return false;
   45946             :         }
   45947           4 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   45948           4 :         if (r->in.computer_name == NULL) {
   45949           0 :                 PyErr_NoMemory();
   45950           0 :                 return false;
   45951             :         }
   45952             :         {
   45953           0 :                 const char *test_str;
   45954           0 :                 const char *talloc_str;
   45955           4 :                 PyObject *unicode = NULL;
   45956           4 :                 if (PyUnicode_Check(py_computer_name)) {
   45957           4 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   45958           4 :                         if (unicode == NULL) {
   45959           0 :                                 PyErr_NoMemory();
   45960           0 :                                 return false;
   45961             :                         }
   45962           4 :                         test_str = PyBytes_AS_STRING(unicode);
   45963           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   45964           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   45965             :                 } else {
   45966           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   45967           0 :                         return false;
   45968             :                 }
   45969           4 :                 talloc_str = talloc_strdup(r, test_str);
   45970           4 :                 if (unicode != NULL) {
   45971           4 :                         Py_DECREF(unicode);
   45972             :                 }
   45973           4 :                 if (talloc_str == NULL) {
   45974           0 :                         PyErr_NoMemory();
   45975           0 :                         return false;
   45976             :                 }
   45977           4 :                 r->in.computer_name = talloc_str;
   45978             :         }
   45979           4 :         if (py_credentials == NULL) {
   45980           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credentials");
   45981           0 :                 return false;
   45982             :         }
   45983           4 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   45984           4 :         if (r->in.credentials == NULL) {
   45985           0 :                 PyErr_NoMemory();
   45986           0 :                 return false;
   45987             :         }
   45988           4 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   45989           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   45990           0 :                 PyErr_NoMemory();
   45991           0 :                 return false;
   45992             :         }
   45993           4 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   45994           4 :         if (py_negotiate_flags == NULL) {
   45995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.negotiate_flags");
   45996           0 :                 return false;
   45997             :         }
   45998           4 :         r->in.negotiate_flags = talloc_ptrtype(r, r->in.negotiate_flags);
   45999           4 :         if (r->in.negotiate_flags == NULL) {
   46000           0 :                 PyErr_NoMemory();
   46001           0 :                 return false;
   46002             :         }
   46003             :         {
   46004           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.negotiate_flags));
   46005           4 :                 if (PyLong_Check(py_negotiate_flags)) {
   46006           0 :                         unsigned long long test_var;
   46007           4 :                         test_var = PyLong_AsUnsignedLongLong(py_negotiate_flags);
   46008           4 :                         if (PyErr_Occurred() != NULL) {
   46009           0 :                                 return false;
   46010             :                         }
   46011           4 :                         if (test_var > uint_max) {
   46012           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46013             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46014           0 :                                 return false;
   46015             :                         }
   46016           4 :                         *r->in.negotiate_flags = test_var;
   46017             :                 } else {
   46018           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46019             :                           PyLong_Type.tp_name);
   46020           0 :                         return false;
   46021             :                 }
   46022             :         }
   46023           4 :         return true;
   46024             : }
   46025             : 
   46026           4 : static PyObject *unpack_py_netr_ServerAuthenticate3_args_out(struct netr_ServerAuthenticate3 *r)
   46027             : {
   46028           0 :         PyObject *result;
   46029           0 :         PyObject *py_return_credentials;
   46030           0 :         PyObject *py_negotiate_flags;
   46031           0 :         PyObject *py_rid;
   46032           4 :         result = PyTuple_New(3);
   46033           4 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   46034           4 :         PyTuple_SetItem(result, 0, py_return_credentials);
   46035           4 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*r->out.negotiate_flags);
   46036           4 :         PyTuple_SetItem(result, 1, py_negotiate_flags);
   46037           4 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)*r->out.rid);
   46038           4 :         PyTuple_SetItem(result, 2, py_rid);
   46039           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   46040           4 :                 PyErr_SetNTSTATUS(r->out.result);
   46041           4 :                 return NULL;
   46042             :         }
   46043             : 
   46044           0 :         return result;
   46045             : }
   46046             : 
   46047             : 
   46048           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_server_unc(PyObject *obj, void *closure)
   46049             : {
   46050           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   46051           0 :         PyObject *py_server_unc;
   46052           0 :         if (object->in.server_unc == NULL) {
   46053           0 :                 Py_RETURN_NONE;
   46054             :         }
   46055           0 :         if (object->in.server_unc == NULL) {
   46056           0 :                 py_server_unc = Py_None;
   46057           0 :                 Py_INCREF(py_server_unc);
   46058             :         } else {
   46059           0 :                 if (object->in.server_unc == NULL) {
   46060           0 :                         py_server_unc = Py_None;
   46061           0 :                         Py_INCREF(py_server_unc);
   46062             :                 } else {
   46063           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   46064             :                 }
   46065             :         }
   46066           0 :         return py_server_unc;
   46067             : }
   46068             : 
   46069           0 : static int py_netr_DsRGetDCNameEx_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   46070             : {
   46071           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46072           0 :         if (value == NULL) {
   46073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   46074           0 :                 return -1;
   46075             :         }
   46076           0 :         if (value == Py_None) {
   46077           0 :                 object->in.server_unc = NULL;
   46078             :         } else {
   46079           0 :                 object->in.server_unc = NULL;
   46080             :                 {
   46081           0 :                         const char *test_str;
   46082           0 :                         const char *talloc_str;
   46083           0 :                         PyObject *unicode = NULL;
   46084           0 :                         if (PyUnicode_Check(value)) {
   46085           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46086           0 :                                 if (unicode == NULL) {
   46087           0 :                                         PyErr_NoMemory();
   46088           0 :                                         return -1;
   46089             :                                 }
   46090           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46091           0 :                         } else if (PyBytes_Check(value)) {
   46092           0 :                                 test_str = PyBytes_AS_STRING(value);
   46093             :                         } else {
   46094           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46095           0 :                                 return -1;
   46096             :                         }
   46097           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46098           0 :                         if (unicode != NULL) {
   46099           0 :                                 Py_DECREF(unicode);
   46100             :                         }
   46101           0 :                         if (talloc_str == NULL) {
   46102           0 :                                 PyErr_NoMemory();
   46103           0 :                                 return -1;
   46104             :                         }
   46105           0 :                         object->in.server_unc = talloc_str;
   46106             :                 }
   46107             :         }
   46108           0 :         return 0;
   46109             : }
   46110             : 
   46111           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_domain_name(PyObject *obj, void *closure)
   46112             : {
   46113           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   46114           0 :         PyObject *py_domain_name;
   46115           0 :         if (object->in.domain_name == NULL) {
   46116           0 :                 Py_RETURN_NONE;
   46117             :         }
   46118           0 :         if (object->in.domain_name == NULL) {
   46119           0 :                 py_domain_name = Py_None;
   46120           0 :                 Py_INCREF(py_domain_name);
   46121             :         } else {
   46122           0 :                 if (object->in.domain_name == NULL) {
   46123           0 :                         py_domain_name = Py_None;
   46124           0 :                         Py_INCREF(py_domain_name);
   46125             :                 } else {
   46126           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   46127             :                 }
   46128             :         }
   46129           0 :         return py_domain_name;
   46130             : }
   46131             : 
   46132           0 : static int py_netr_DsRGetDCNameEx_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   46133             : {
   46134           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46135           0 :         if (value == NULL) {
   46136           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   46137           0 :                 return -1;
   46138             :         }
   46139           0 :         if (value == Py_None) {
   46140           0 :                 object->in.domain_name = NULL;
   46141             :         } else {
   46142           0 :                 object->in.domain_name = NULL;
   46143             :                 {
   46144           0 :                         const char *test_str;
   46145           0 :                         const char *talloc_str;
   46146           0 :                         PyObject *unicode = NULL;
   46147           0 :                         if (PyUnicode_Check(value)) {
   46148           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46149           0 :                                 if (unicode == NULL) {
   46150           0 :                                         PyErr_NoMemory();
   46151           0 :                                         return -1;
   46152             :                                 }
   46153           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46154           0 :                         } else if (PyBytes_Check(value)) {
   46155           0 :                                 test_str = PyBytes_AS_STRING(value);
   46156             :                         } else {
   46157           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46158           0 :                                 return -1;
   46159             :                         }
   46160           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46161           0 :                         if (unicode != NULL) {
   46162           0 :                                 Py_DECREF(unicode);
   46163             :                         }
   46164           0 :                         if (talloc_str == NULL) {
   46165           0 :                                 PyErr_NoMemory();
   46166           0 :                                 return -1;
   46167             :                         }
   46168           0 :                         object->in.domain_name = talloc_str;
   46169             :                 }
   46170             :         }
   46171           0 :         return 0;
   46172             : }
   46173             : 
   46174           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_domain_guid(PyObject *obj, void *closure)
   46175             : {
   46176           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   46177           0 :         PyObject *py_domain_guid;
   46178           0 :         if (object->in.domain_guid == NULL) {
   46179           0 :                 Py_RETURN_NONE;
   46180             :         }
   46181           0 :         if (object->in.domain_guid == NULL) {
   46182           0 :                 py_domain_guid = Py_None;
   46183           0 :                 Py_INCREF(py_domain_guid);
   46184             :         } else {
   46185           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   46186             :         }
   46187           0 :         return py_domain_guid;
   46188             : }
   46189             : 
   46190           0 : static int py_netr_DsRGetDCNameEx_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   46191             : {
   46192           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46193           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   46194           0 :         if (value == NULL) {
   46195           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   46196           0 :                 return -1;
   46197             :         }
   46198           0 :         if (value == Py_None) {
   46199           0 :                 object->in.domain_guid = NULL;
   46200             :         } else {
   46201           0 :                 object->in.domain_guid = NULL;
   46202           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   46203           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   46204           0 :                         PyErr_NoMemory();
   46205           0 :                         return -1;
   46206             :                 }
   46207           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   46208             :         }
   46209           0 :         return 0;
   46210             : }
   46211             : 
   46212           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_site_name(PyObject *obj, void *closure)
   46213             : {
   46214           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   46215           0 :         PyObject *py_site_name;
   46216           0 :         if (object->in.site_name == NULL) {
   46217           0 :                 Py_RETURN_NONE;
   46218             :         }
   46219           0 :         if (object->in.site_name == NULL) {
   46220           0 :                 py_site_name = Py_None;
   46221           0 :                 Py_INCREF(py_site_name);
   46222             :         } else {
   46223           0 :                 if (object->in.site_name == NULL) {
   46224           0 :                         py_site_name = Py_None;
   46225           0 :                         Py_INCREF(py_site_name);
   46226             :                 } else {
   46227           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   46228             :                 }
   46229             :         }
   46230           0 :         return py_site_name;
   46231             : }
   46232             : 
   46233           0 : static int py_netr_DsRGetDCNameEx_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   46234             : {
   46235           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46236           0 :         if (value == NULL) {
   46237           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   46238           0 :                 return -1;
   46239             :         }
   46240           0 :         if (value == Py_None) {
   46241           0 :                 object->in.site_name = NULL;
   46242             :         } else {
   46243           0 :                 object->in.site_name = NULL;
   46244             :                 {
   46245           0 :                         const char *test_str;
   46246           0 :                         const char *talloc_str;
   46247           0 :                         PyObject *unicode = NULL;
   46248           0 :                         if (PyUnicode_Check(value)) {
   46249           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46250           0 :                                 if (unicode == NULL) {
   46251           0 :                                         PyErr_NoMemory();
   46252           0 :                                         return -1;
   46253             :                                 }
   46254           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46255           0 :                         } else if (PyBytes_Check(value)) {
   46256           0 :                                 test_str = PyBytes_AS_STRING(value);
   46257             :                         } else {
   46258           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46259           0 :                                 return -1;
   46260             :                         }
   46261           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46262           0 :                         if (unicode != NULL) {
   46263           0 :                                 Py_DECREF(unicode);
   46264             :                         }
   46265           0 :                         if (talloc_str == NULL) {
   46266           0 :                                 PyErr_NoMemory();
   46267           0 :                                 return -1;
   46268             :                         }
   46269           0 :                         object->in.site_name = talloc_str;
   46270             :                 }
   46271             :         }
   46272           0 :         return 0;
   46273             : }
   46274             : 
   46275           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_flags(PyObject *obj, void *closure)
   46276             : {
   46277           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   46278           0 :         PyObject *py_flags;
   46279           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   46280           0 :         return py_flags;
   46281             : }
   46282             : 
   46283           0 : static int py_netr_DsRGetDCNameEx_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   46284             : {
   46285           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46286           0 :         if (value == NULL) {
   46287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   46288           0 :                 return -1;
   46289             :         }
   46290             :         {
   46291           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   46292           0 :                 if (PyLong_Check(value)) {
   46293           0 :                         unsigned long long test_var;
   46294           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   46295           0 :                         if (PyErr_Occurred() != NULL) {
   46296           0 :                                 return -1;
   46297             :                         }
   46298           0 :                         if (test_var > uint_max) {
   46299           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46300             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46301           0 :                                 return -1;
   46302             :                         }
   46303           0 :                         object->in.flags = test_var;
   46304             :                 } else {
   46305           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46306             :                           PyLong_Type.tp_name);
   46307           0 :                         return -1;
   46308             :                 }
   46309             :         }
   46310           0 :         return 0;
   46311             : }
   46312             : 
   46313           0 : static PyObject *py_netr_DsRGetDCNameEx_out_get_info(PyObject *obj, void *closure)
   46314             : {
   46315           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   46316           0 :         PyObject *py_info;
   46317           0 :         if (object->out.info == NULL) {
   46318           0 :                 Py_RETURN_NONE;
   46319             :         }
   46320           0 :         if (*object->out.info == NULL) {
   46321           0 :                 py_info = Py_None;
   46322           0 :                 Py_INCREF(py_info);
   46323             :         } else {
   46324           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
   46325             :         }
   46326           0 :         return py_info;
   46327             : }
   46328             : 
   46329           0 : static int py_netr_DsRGetDCNameEx_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   46330             : {
   46331           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46332           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   46333           0 :         if (value == NULL) {
   46334           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   46335           0 :                 return -1;
   46336             :         }
   46337           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   46338           0 :         if (object->out.info == NULL) {
   46339           0 :                 PyErr_NoMemory();
   46340           0 :                 return -1;
   46341             :         }
   46342           0 :         if (value == Py_None) {
   46343           0 :                 *object->out.info = NULL;
   46344             :         } else {
   46345           0 :                 *object->out.info = NULL;
   46346           0 :                 PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
   46347           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   46348           0 :                         PyErr_NoMemory();
   46349           0 :                         return -1;
   46350             :                 }
   46351           0 :                 *object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   46352             :         }
   46353           0 :         return 0;
   46354             : }
   46355             : 
   46356           0 : static PyObject *py_netr_DsRGetDCNameEx_get_result(PyObject *obj, void *closure)
   46357             : {
   46358           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   46359           0 :         PyObject *py_result;
   46360           0 :         py_result = PyErr_FromWERROR(object->out.result);
   46361           0 :         return py_result;
   46362             : }
   46363             : 
   46364           0 : static int py_netr_DsRGetDCNameEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   46365             : {
   46366           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46367           0 :         if (value == NULL) {
   46368           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   46369           0 :                 return -1;
   46370             :         }
   46371           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   46372           0 :         return 0;
   46373             : }
   46374             : 
   46375             : static PyGetSetDef py_netr_DsRGetDCNameEx_getsetters[] = {
   46376             :         {
   46377             :                 .name = discard_const_p(char, "in_server_unc"),
   46378             :                 .get = py_netr_DsRGetDCNameEx_in_get_server_unc,
   46379             :                 .set = py_netr_DsRGetDCNameEx_in_set_server_unc,
   46380             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46381             :         },
   46382             :         {
   46383             :                 .name = discard_const_p(char, "in_domain_name"),
   46384             :                 .get = py_netr_DsRGetDCNameEx_in_get_domain_name,
   46385             :                 .set = py_netr_DsRGetDCNameEx_in_set_domain_name,
   46386             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46387             :         },
   46388             :         {
   46389             :                 .name = discard_const_p(char, "in_domain_guid"),
   46390             :                 .get = py_netr_DsRGetDCNameEx_in_get_domain_guid,
   46391             :                 .set = py_netr_DsRGetDCNameEx_in_set_domain_guid,
   46392             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   46393             :         },
   46394             :         {
   46395             :                 .name = discard_const_p(char, "in_site_name"),
   46396             :                 .get = py_netr_DsRGetDCNameEx_in_get_site_name,
   46397             :                 .set = py_netr_DsRGetDCNameEx_in_set_site_name,
   46398             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46399             :         },
   46400             :         {
   46401             :                 .name = discard_const_p(char, "in_flags"),
   46402             :                 .get = py_netr_DsRGetDCNameEx_in_get_flags,
   46403             :                 .set = py_netr_DsRGetDCNameEx_in_set_flags,
   46404             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
   46405             :         },
   46406             :         {
   46407             :                 .name = discard_const_p(char, "out_info"),
   46408             :                 .get = py_netr_DsRGetDCNameEx_out_get_info,
   46409             :                 .set = py_netr_DsRGetDCNameEx_out_set_info,
   46410             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   46411             :         },
   46412             :         {
   46413             :                 .name = discard_const_p(char, "result"),
   46414             :                 .get = py_netr_DsRGetDCNameEx_get_result,
   46415             :                 .set = py_netr_DsRGetDCNameEx_set_result,
   46416             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   46417             :         },
   46418             :         { .name = NULL }
   46419             : };
   46420             : 
   46421           0 : static PyObject *py_netr_DsRGetDCNameEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   46422             : {
   46423           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetDCNameEx, type);
   46424           0 :         struct netr_DsRGetDCNameEx *_self = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(self);
   46425           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   46426             :         /* a pointer to a NULL pointer */
   46427           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   46428           0 :         return self;
   46429             : }
   46430             : 
   46431           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   46432             : {
   46433             : 
   46434             : 
   46435           0 :         return PyLong_FromLong(27);
   46436             : }
   46437             : 
   46438           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   46439             : {
   46440           0 :         const struct ndr_interface_call *call = NULL;
   46441           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46442           0 :         PyObject *ret = NULL;
   46443           0 :         struct ndr_push *push = NULL;
   46444           0 :         DATA_BLOB blob;
   46445           0 :         enum ndr_err_code err;
   46446             : 
   46447           0 :         if (ndr_table_netlogon.num_calls < 28) {
   46448           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_pack");
   46449           0 :                 return NULL;
   46450             :         }
   46451           0 :         call = &ndr_table_netlogon.calls[27];
   46452             : 
   46453           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   46454           0 :         if (push == NULL) {
   46455           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46456           0 :                 return NULL;
   46457             :         }
   46458             : 
   46459           0 :         push->flags |= ndr_push_flags;
   46460             : 
   46461           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   46462           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46463           0 :                 TALLOC_FREE(push);
   46464           0 :                 PyErr_SetNdrError(err);
   46465           0 :                 return NULL;
   46466             :         }
   46467           0 :         blob = ndr_push_blob(push);
   46468           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   46469           0 :         TALLOC_FREE(push);
   46470           0 :         return ret;
   46471             : }
   46472             : 
   46473           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46474             : {
   46475           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46476           0 :         PyObject *bigendian_obj = NULL;
   46477           0 :         PyObject *ndr64_obj = NULL;
   46478           0 :         libndr_flags ndr_push_flags = 0;
   46479             : 
   46480           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   46481             :                 discard_const_p(char *, kwnames),
   46482             :                 &bigendian_obj,
   46483             :                 &ndr64_obj)) {
   46484           0 :                 return NULL;
   46485             :         }
   46486             : 
   46487           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46488           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46489             :         }
   46490           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46491           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46492             :         }
   46493             : 
   46494           0 :         return py_netr_DsRGetDCNameEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   46495             : }
   46496             : 
   46497           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46498             : {
   46499           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46500           0 :         PyObject *bigendian_obj = NULL;
   46501           0 :         PyObject *ndr64_obj = NULL;
   46502           0 :         libndr_flags ndr_push_flags = 0;
   46503             : 
   46504           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   46505             :                 discard_const_p(char *, kwnames),
   46506             :                 &bigendian_obj,
   46507             :                 &ndr64_obj)) {
   46508           0 :                 return NULL;
   46509             :         }
   46510             : 
   46511           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46512           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46513             :         }
   46514           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46515           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46516             :         }
   46517             : 
   46518           0 :         return py_netr_DsRGetDCNameEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   46519             : }
   46520             : 
   46521           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   46522             : {
   46523           0 :         const struct ndr_interface_call *call = NULL;
   46524           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46525           0 :         struct ndr_pull *pull = NULL;
   46526           0 :         enum ndr_err_code err;
   46527             : 
   46528           0 :         if (ndr_table_netlogon.num_calls < 28) {
   46529           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_unpack");
   46530           0 :                 return NULL;
   46531             :         }
   46532           0 :         call = &ndr_table_netlogon.calls[27];
   46533             : 
   46534           0 :         pull = ndr_pull_init_blob(blob, object);
   46535           0 :         if (pull == NULL) {
   46536           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46537           0 :                 return NULL;
   46538             :         }
   46539             : 
   46540           0 :         pull->flags |= ndr_pull_flags;
   46541             : 
   46542           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   46543           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46544           0 :                 TALLOC_FREE(pull);
   46545           0 :                 PyErr_SetNdrError(err);
   46546           0 :                 return NULL;
   46547             :         }
   46548           0 :         if (!allow_remaining) {
   46549           0 :                 uint32_t highest_ofs;
   46550             : 
   46551           0 :                 if (pull->offset > pull->relative_highest_offset) {
   46552           0 :                         highest_ofs = pull->offset;
   46553             :                 } else {
   46554           0 :                         highest_ofs = pull->relative_highest_offset;
   46555             :                 }
   46556           0 :                 if (highest_ofs < pull->data_size) {
   46557           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   46558             :                                 "not all bytes consumed ofs[%u] size[%u]",
   46559             :                                 highest_ofs, pull->data_size);
   46560           0 :                         TALLOC_FREE(pull);
   46561           0 :                         PyErr_SetNdrError(err);
   46562           0 :                         return NULL;
   46563             :                 }
   46564             :         }
   46565             : 
   46566           0 :         TALLOC_FREE(pull);
   46567           0 :         Py_RETURN_NONE;
   46568             : }
   46569             : 
   46570           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46571             : {
   46572           0 :         DATA_BLOB blob;
   46573           0 :         Py_ssize_t blob_length = 0;
   46574           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46575           0 :         PyObject *bigendian_obj = NULL;
   46576           0 :         PyObject *ndr64_obj = NULL;
   46577           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46578           0 :         PyObject *allow_remaining_obj = NULL;
   46579           0 :         bool allow_remaining = false;
   46580             : 
   46581           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   46582             :                 discard_const_p(char *, kwnames),
   46583             :                 &blob.data, &blob_length,
   46584             :                 &bigendian_obj,
   46585             :                 &ndr64_obj,
   46586             :                 &allow_remaining_obj)) {
   46587           0 :                 return NULL;
   46588             :         }
   46589           0 :         blob.length = blob_length;
   46590             : 
   46591           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46592           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46593             :         }
   46594           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46595           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46596             :         }
   46597             : 
   46598           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46599           0 :                 allow_remaining = true;
   46600             :         }
   46601             : 
   46602           0 :         return py_netr_DsRGetDCNameEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   46603             : }
   46604             : 
   46605           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46606             : {
   46607           0 :         DATA_BLOB blob;
   46608           0 :         Py_ssize_t blob_length = 0;
   46609           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46610           0 :         PyObject *bigendian_obj = NULL;
   46611           0 :         PyObject *ndr64_obj = NULL;
   46612           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46613           0 :         PyObject *allow_remaining_obj = NULL;
   46614           0 :         bool allow_remaining = false;
   46615             : 
   46616           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   46617             :                 discard_const_p(char *, kwnames),
   46618             :                 &blob.data, &blob_length,
   46619             :                 &bigendian_obj,
   46620             :                 &ndr64_obj,
   46621             :                 &allow_remaining_obj)) {
   46622           0 :                 return NULL;
   46623             :         }
   46624           0 :         blob.length = blob_length;
   46625             : 
   46626           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46627           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46628             :         }
   46629           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46630           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46631             :         }
   46632             : 
   46633           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46634           0 :                 allow_remaining = true;
   46635             :         }
   46636             : 
   46637           0 :         return py_netr_DsRGetDCNameEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   46638             : }
   46639             : 
   46640           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   46641             : {
   46642           0 :         const struct ndr_interface_call *call = NULL;
   46643           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46644           0 :         PyObject *ret;
   46645           0 :         char *retstr;
   46646             : 
   46647           0 :         if (ndr_table_netlogon.num_calls < 28) {
   46648           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_print");
   46649           0 :                 return NULL;
   46650             :         }
   46651           0 :         call = &ndr_table_netlogon.calls[27];
   46652             : 
   46653           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   46654           0 :         ret = PyUnicode_FromString(retstr);
   46655           0 :         TALLOC_FREE(retstr);
   46656             : 
   46657           0 :         return ret;
   46658             : }
   46659             : 
   46660           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46661             : {
   46662           0 :         return py_netr_DsRGetDCNameEx_ndr_print(py_obj, "netr_DsRGetDCNameEx_in", NDR_IN);
   46663             : }
   46664             : 
   46665           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46666             : {
   46667           0 :         return py_netr_DsRGetDCNameEx_ndr_print(py_obj, "netr_DsRGetDCNameEx_out", NDR_OUT);
   46668             : }
   46669             : 
   46670             : static PyMethodDef py_netr_DsRGetDCNameEx_methods[] = {
   46671             :         { "opnum", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   46672             :                 "netlogon.netr_DsRGetDCNameEx.opnum() -> 27 (0x1b) " },
   46673             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   46674             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   46675             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   46676             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   46677             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   46678             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   46679             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   46680             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   46681             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   46682             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   46683             :         { NULL, NULL, 0, NULL }
   46684             : };
   46685             : 
   46686             : 
   46687             : static PyTypeObject netr_DsRGetDCNameEx_Type = {
   46688             :         PyVarObject_HEAD_INIT(NULL, 0)
   46689             :         .tp_name = "netlogon.netr_DsRGetDCNameEx",
   46690             :         .tp_getset = py_netr_DsRGetDCNameEx_getsetters,
   46691             :         .tp_methods = py_netr_DsRGetDCNameEx_methods,
   46692             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   46693             :         .tp_new = py_netr_DsRGetDCNameEx_new,
   46694             : };
   46695             : 
   46696          48 : static bool pack_py_netr_DsRGetDCNameEx_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCNameEx *r)
   46697             : {
   46698           0 :         PyObject *py_server_unc;
   46699           0 :         PyObject *py_domain_name;
   46700           0 :         PyObject *py_domain_guid;
   46701           0 :         PyObject *py_site_name;
   46702           0 :         PyObject *py_flags;
   46703          48 :         const char *kwnames[] = {
   46704             :                 "server_unc", "domain_name", "domain_guid", "site_name", "flags", NULL
   46705             :         };
   46706             : 
   46707          48 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_DsRGetDCNameEx", discard_const_p(char *, kwnames), &py_server_unc, &py_domain_name, &py_domain_guid, &py_site_name, &py_flags)) {
   46708           0 :                 return false;
   46709             :         }
   46710             : 
   46711          48 :         if (py_server_unc == NULL) {
   46712           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   46713           0 :                 return false;
   46714             :         }
   46715          48 :         if (py_server_unc == Py_None) {
   46716           0 :                 r->in.server_unc = NULL;
   46717             :         } else {
   46718          48 :                 r->in.server_unc = NULL;
   46719             :                 {
   46720           0 :                         const char *test_str;
   46721           0 :                         const char *talloc_str;
   46722          48 :                         PyObject *unicode = NULL;
   46723          48 :                         if (PyUnicode_Check(py_server_unc)) {
   46724          48 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   46725          48 :                                 if (unicode == NULL) {
   46726           0 :                                         PyErr_NoMemory();
   46727           0 :                                         return false;
   46728             :                                 }
   46729          48 :                                 test_str = PyBytes_AS_STRING(unicode);
   46730           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   46731           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   46732             :                         } else {
   46733           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   46734           0 :                                 return false;
   46735             :                         }
   46736          48 :                         talloc_str = talloc_strdup(r, test_str);
   46737          48 :                         if (unicode != NULL) {
   46738          48 :                                 Py_DECREF(unicode);
   46739             :                         }
   46740          48 :                         if (talloc_str == NULL) {
   46741           0 :                                 PyErr_NoMemory();
   46742           0 :                                 return false;
   46743             :                         }
   46744          48 :                         r->in.server_unc = talloc_str;
   46745             :                 }
   46746             :         }
   46747          48 :         if (py_domain_name == NULL) {
   46748           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   46749           0 :                 return false;
   46750             :         }
   46751          48 :         if (py_domain_name == Py_None) {
   46752           0 :                 r->in.domain_name = NULL;
   46753             :         } else {
   46754          48 :                 r->in.domain_name = NULL;
   46755             :                 {
   46756           0 :                         const char *test_str;
   46757           0 :                         const char *talloc_str;
   46758          48 :                         PyObject *unicode = NULL;
   46759          48 :                         if (PyUnicode_Check(py_domain_name)) {
   46760          48 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   46761          48 :                                 if (unicode == NULL) {
   46762           0 :                                         PyErr_NoMemory();
   46763           0 :                                         return false;
   46764             :                                 }
   46765          48 :                                 test_str = PyBytes_AS_STRING(unicode);
   46766           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   46767           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   46768             :                         } else {
   46769           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   46770           0 :                                 return false;
   46771             :                         }
   46772          48 :                         talloc_str = talloc_strdup(r, test_str);
   46773          48 :                         if (unicode != NULL) {
   46774          48 :                                 Py_DECREF(unicode);
   46775             :                         }
   46776          48 :                         if (talloc_str == NULL) {
   46777           0 :                                 PyErr_NoMemory();
   46778           0 :                                 return false;
   46779             :                         }
   46780          48 :                         r->in.domain_name = talloc_str;
   46781             :                 }
   46782             :         }
   46783          48 :         if (py_domain_guid == NULL) {
   46784           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   46785           0 :                 return false;
   46786             :         }
   46787          48 :         if (py_domain_guid == Py_None) {
   46788          44 :                 r->in.domain_guid = NULL;
   46789             :         } else {
   46790           4 :                 r->in.domain_guid = NULL;
   46791           4 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   46792           4 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   46793           0 :                         PyErr_NoMemory();
   46794           0 :                         return false;
   46795             :                 }
   46796           4 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   46797             :         }
   46798          48 :         if (py_site_name == NULL) {
   46799           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   46800           0 :                 return false;
   46801             :         }
   46802          48 :         if (py_site_name == Py_None) {
   46803          32 :                 r->in.site_name = NULL;
   46804             :         } else {
   46805          16 :                 r->in.site_name = NULL;
   46806             :                 {
   46807           0 :                         const char *test_str;
   46808           0 :                         const char *talloc_str;
   46809          16 :                         PyObject *unicode = NULL;
   46810          16 :                         if (PyUnicode_Check(py_site_name)) {
   46811          16 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   46812          16 :                                 if (unicode == NULL) {
   46813           0 :                                         PyErr_NoMemory();
   46814           0 :                                         return false;
   46815             :                                 }
   46816          16 :                                 test_str = PyBytes_AS_STRING(unicode);
   46817           0 :                         } else if (PyBytes_Check(py_site_name)) {
   46818           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   46819             :                         } else {
   46820           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   46821           0 :                                 return false;
   46822             :                         }
   46823          16 :                         talloc_str = talloc_strdup(r, test_str);
   46824          16 :                         if (unicode != NULL) {
   46825          16 :                                 Py_DECREF(unicode);
   46826             :                         }
   46827          16 :                         if (talloc_str == NULL) {
   46828           0 :                                 PyErr_NoMemory();
   46829           0 :                                 return false;
   46830             :                         }
   46831          16 :                         r->in.site_name = talloc_str;
   46832             :                 }
   46833             :         }
   46834          48 :         if (py_flags == NULL) {
   46835           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   46836           0 :                 return false;
   46837             :         }
   46838             :         {
   46839          48 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   46840          48 :                 if (PyLong_Check(py_flags)) {
   46841           0 :                         unsigned long long test_var;
   46842          48 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   46843          48 :                         if (PyErr_Occurred() != NULL) {
   46844           0 :                                 return false;
   46845             :                         }
   46846          48 :                         if (test_var > uint_max) {
   46847           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46848             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46849           0 :                                 return false;
   46850             :                         }
   46851          48 :                         r->in.flags = test_var;
   46852             :                 } else {
   46853           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46854             :                           PyLong_Type.tp_name);
   46855           0 :                         return false;
   46856             :                 }
   46857             :         }
   46858          48 :         return true;
   46859             : }
   46860             : 
   46861          48 : static PyObject *unpack_py_netr_DsRGetDCNameEx_args_out(struct netr_DsRGetDCNameEx *r)
   46862             : {
   46863           0 :         PyObject *result;
   46864           0 :         PyObject *py_info;
   46865          48 :         if (*r->out.info == NULL) {
   46866          12 :                 py_info = Py_None;
   46867          12 :                 Py_INCREF(py_info);
   46868             :         } else {
   46869          36 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
   46870             :         }
   46871          48 :         result = py_info;
   46872          48 :         if (!W_ERROR_IS_OK(r->out.result)) {
   46873          16 :                 PyErr_SetWERROR(r->out.result);
   46874          16 :                 return NULL;
   46875             :         }
   46876             : 
   46877          32 :         return result;
   46878             : }
   46879             : 
   46880             : 
   46881           0 : static PyObject *py_netr_DsRGetSiteName_in_get_computer_name(PyObject *obj, void *closure)
   46882             : {
   46883           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(obj);
   46884           0 :         PyObject *py_computer_name;
   46885           0 :         if (object->in.computer_name == NULL) {
   46886           0 :                 Py_RETURN_NONE;
   46887             :         }
   46888           0 :         if (object->in.computer_name == NULL) {
   46889           0 :                 py_computer_name = Py_None;
   46890           0 :                 Py_INCREF(py_computer_name);
   46891             :         } else {
   46892           0 :                 if (object->in.computer_name == NULL) {
   46893           0 :                         py_computer_name = Py_None;
   46894           0 :                         Py_INCREF(py_computer_name);
   46895             :                 } else {
   46896           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   46897             :                 }
   46898             :         }
   46899           0 :         return py_computer_name;
   46900             : }
   46901             : 
   46902           0 : static int py_netr_DsRGetSiteName_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   46903             : {
   46904           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   46905           0 :         if (value == NULL) {
   46906           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   46907           0 :                 return -1;
   46908             :         }
   46909           0 :         if (value == Py_None) {
   46910           0 :                 object->in.computer_name = NULL;
   46911             :         } else {
   46912           0 :                 object->in.computer_name = NULL;
   46913             :                 {
   46914           0 :                         const char *test_str;
   46915           0 :                         const char *talloc_str;
   46916           0 :                         PyObject *unicode = NULL;
   46917           0 :                         if (PyUnicode_Check(value)) {
   46918           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46919           0 :                                 if (unicode == NULL) {
   46920           0 :                                         PyErr_NoMemory();
   46921           0 :                                         return -1;
   46922             :                                 }
   46923           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46924           0 :                         } else if (PyBytes_Check(value)) {
   46925           0 :                                 test_str = PyBytes_AS_STRING(value);
   46926             :                         } else {
   46927           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46928           0 :                                 return -1;
   46929             :                         }
   46930           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46931           0 :                         if (unicode != NULL) {
   46932           0 :                                 Py_DECREF(unicode);
   46933             :                         }
   46934           0 :                         if (talloc_str == NULL) {
   46935           0 :                                 PyErr_NoMemory();
   46936           0 :                                 return -1;
   46937             :                         }
   46938           0 :                         object->in.computer_name = talloc_str;
   46939             :                 }
   46940             :         }
   46941           0 :         return 0;
   46942             : }
   46943             : 
   46944           0 : static PyObject *py_netr_DsRGetSiteName_out_get_site(PyObject *obj, void *closure)
   46945             : {
   46946           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(obj);
   46947           0 :         PyObject *py_site;
   46948           0 :         if (object->out.site == NULL) {
   46949           0 :                 Py_RETURN_NONE;
   46950             :         }
   46951           0 :         if (*object->out.site == NULL) {
   46952           0 :                 py_site = Py_None;
   46953           0 :                 Py_INCREF(py_site);
   46954             :         } else {
   46955           0 :                 if (*object->out.site == NULL) {
   46956           0 :                         py_site = Py_None;
   46957           0 :                         Py_INCREF(py_site);
   46958             :                 } else {
   46959           0 :                         py_site = PyUnicode_Decode(*object->out.site, strlen(*object->out.site), "utf-8", "ignore");
   46960             :                 }
   46961             :         }
   46962           0 :         return py_site;
   46963             : }
   46964             : 
   46965           0 : static int py_netr_DsRGetSiteName_out_set_site(PyObject *py_obj, PyObject *value, void *closure)
   46966             : {
   46967           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   46968           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.site));
   46969           0 :         if (value == NULL) {
   46970           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.site");
   46971           0 :                 return -1;
   46972             :         }
   46973           0 :         object->out.site = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.site);
   46974           0 :         if (object->out.site == NULL) {
   46975           0 :                 PyErr_NoMemory();
   46976           0 :                 return -1;
   46977             :         }
   46978           0 :         if (value == Py_None) {
   46979           0 :                 *object->out.site = NULL;
   46980             :         } else {
   46981           0 :                 *object->out.site = NULL;
   46982             :                 {
   46983           0 :                         const char *test_str;
   46984           0 :                         const char *talloc_str;
   46985           0 :                         PyObject *unicode = NULL;
   46986           0 :                         if (PyUnicode_Check(value)) {
   46987           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46988           0 :                                 if (unicode == NULL) {
   46989           0 :                                         PyErr_NoMemory();
   46990           0 :                                         return -1;
   46991             :                                 }
   46992           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46993           0 :                         } else if (PyBytes_Check(value)) {
   46994           0 :                                 test_str = PyBytes_AS_STRING(value);
   46995             :                         } else {
   46996           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46997           0 :                                 return -1;
   46998             :                         }
   46999           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47000           0 :                         if (unicode != NULL) {
   47001           0 :                                 Py_DECREF(unicode);
   47002             :                         }
   47003           0 :                         if (talloc_str == NULL) {
   47004           0 :                                 PyErr_NoMemory();
   47005           0 :                                 return -1;
   47006             :                         }
   47007           0 :                         *object->out.site = talloc_str;
   47008             :                 }
   47009             :         }
   47010           0 :         return 0;
   47011             : }
   47012             : 
   47013           0 : static PyObject *py_netr_DsRGetSiteName_get_result(PyObject *obj, void *closure)
   47014             : {
   47015           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(obj);
   47016           0 :         PyObject *py_result;
   47017           0 :         py_result = PyErr_FromWERROR(object->out.result);
   47018           0 :         return py_result;
   47019             : }
   47020             : 
   47021           0 : static int py_netr_DsRGetSiteName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   47022             : {
   47023           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   47024           0 :         if (value == NULL) {
   47025           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   47026           0 :                 return -1;
   47027             :         }
   47028           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   47029           0 :         return 0;
   47030             : }
   47031             : 
   47032             : static PyGetSetDef py_netr_DsRGetSiteName_getsetters[] = {
   47033             :         {
   47034             :                 .name = discard_const_p(char, "in_computer_name"),
   47035             :                 .get = py_netr_DsRGetSiteName_in_get_computer_name,
   47036             :                 .set = py_netr_DsRGetSiteName_in_set_computer_name,
   47037             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47038             :         },
   47039             :         {
   47040             :                 .name = discard_const_p(char, "out_site"),
   47041             :                 .get = py_netr_DsRGetSiteName_out_get_site,
   47042             :                 .set = py_netr_DsRGetSiteName_out_set_site,
   47043             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47044             :         },
   47045             :         {
   47046             :                 .name = discard_const_p(char, "result"),
   47047             :                 .get = py_netr_DsRGetSiteName_get_result,
   47048             :                 .set = py_netr_DsRGetSiteName_set_result,
   47049             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   47050             :         },
   47051             :         { .name = NULL }
   47052             : };
   47053             : 
   47054           0 : static PyObject *py_netr_DsRGetSiteName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   47055             : {
   47056           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetSiteName, type);
   47057           0 :         return self;
   47058             : }
   47059             : 
   47060           0 : static PyObject *py_netr_DsRGetSiteName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   47061             : {
   47062             : 
   47063             : 
   47064           0 :         return PyLong_FromLong(28);
   47065             : }
   47066             : 
   47067           0 : static PyObject *py_netr_DsRGetSiteName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   47068             : {
   47069           0 :         const struct ndr_interface_call *call = NULL;
   47070           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   47071           0 :         PyObject *ret = NULL;
   47072           0 :         struct ndr_push *push = NULL;
   47073           0 :         DATA_BLOB blob;
   47074           0 :         enum ndr_err_code err;
   47075             : 
   47076           0 :         if (ndr_table_netlogon.num_calls < 29) {
   47077           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_pack");
   47078           0 :                 return NULL;
   47079             :         }
   47080           0 :         call = &ndr_table_netlogon.calls[28];
   47081             : 
   47082           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   47083           0 :         if (push == NULL) {
   47084           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47085           0 :                 return NULL;
   47086             :         }
   47087             : 
   47088           0 :         push->flags |= ndr_push_flags;
   47089             : 
   47090           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   47091           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47092           0 :                 TALLOC_FREE(push);
   47093           0 :                 PyErr_SetNdrError(err);
   47094           0 :                 return NULL;
   47095             :         }
   47096           0 :         blob = ndr_push_blob(push);
   47097           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   47098           0 :         TALLOC_FREE(push);
   47099           0 :         return ret;
   47100             : }
   47101             : 
   47102           0 : static PyObject *py_netr_DsRGetSiteName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47103             : {
   47104           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47105           0 :         PyObject *bigendian_obj = NULL;
   47106           0 :         PyObject *ndr64_obj = NULL;
   47107           0 :         libndr_flags ndr_push_flags = 0;
   47108             : 
   47109           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   47110             :                 discard_const_p(char *, kwnames),
   47111             :                 &bigendian_obj,
   47112             :                 &ndr64_obj)) {
   47113           0 :                 return NULL;
   47114             :         }
   47115             : 
   47116           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47117           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47118             :         }
   47119           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47120           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47121             :         }
   47122             : 
   47123           0 :         return py_netr_DsRGetSiteName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   47124             : }
   47125             : 
   47126           0 : static PyObject *py_netr_DsRGetSiteName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47127             : {
   47128           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47129           0 :         PyObject *bigendian_obj = NULL;
   47130           0 :         PyObject *ndr64_obj = NULL;
   47131           0 :         libndr_flags ndr_push_flags = 0;
   47132             : 
   47133           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   47134             :                 discard_const_p(char *, kwnames),
   47135             :                 &bigendian_obj,
   47136             :                 &ndr64_obj)) {
   47137           0 :                 return NULL;
   47138             :         }
   47139             : 
   47140           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47141           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47142             :         }
   47143           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47144           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47145             :         }
   47146             : 
   47147           0 :         return py_netr_DsRGetSiteName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   47148             : }
   47149             : 
   47150           0 : static PyObject *py_netr_DsRGetSiteName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   47151             : {
   47152           0 :         const struct ndr_interface_call *call = NULL;
   47153           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   47154           0 :         struct ndr_pull *pull = NULL;
   47155           0 :         enum ndr_err_code err;
   47156             : 
   47157           0 :         if (ndr_table_netlogon.num_calls < 29) {
   47158           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_unpack");
   47159           0 :                 return NULL;
   47160             :         }
   47161           0 :         call = &ndr_table_netlogon.calls[28];
   47162             : 
   47163           0 :         pull = ndr_pull_init_blob(blob, object);
   47164           0 :         if (pull == NULL) {
   47165           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47166           0 :                 return NULL;
   47167             :         }
   47168             : 
   47169           0 :         pull->flags |= ndr_pull_flags;
   47170             : 
   47171           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   47172           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47173           0 :                 TALLOC_FREE(pull);
   47174           0 :                 PyErr_SetNdrError(err);
   47175           0 :                 return NULL;
   47176             :         }
   47177           0 :         if (!allow_remaining) {
   47178           0 :                 uint32_t highest_ofs;
   47179             : 
   47180           0 :                 if (pull->offset > pull->relative_highest_offset) {
   47181           0 :                         highest_ofs = pull->offset;
   47182             :                 } else {
   47183           0 :                         highest_ofs = pull->relative_highest_offset;
   47184             :                 }
   47185           0 :                 if (highest_ofs < pull->data_size) {
   47186           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   47187             :                                 "not all bytes consumed ofs[%u] size[%u]",
   47188             :                                 highest_ofs, pull->data_size);
   47189           0 :                         TALLOC_FREE(pull);
   47190           0 :                         PyErr_SetNdrError(err);
   47191           0 :                         return NULL;
   47192             :                 }
   47193             :         }
   47194             : 
   47195           0 :         TALLOC_FREE(pull);
   47196           0 :         Py_RETURN_NONE;
   47197             : }
   47198             : 
   47199           0 : static PyObject *py_netr_DsRGetSiteName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47200             : {
   47201           0 :         DATA_BLOB blob;
   47202           0 :         Py_ssize_t blob_length = 0;
   47203           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47204           0 :         PyObject *bigendian_obj = NULL;
   47205           0 :         PyObject *ndr64_obj = NULL;
   47206           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47207           0 :         PyObject *allow_remaining_obj = NULL;
   47208           0 :         bool allow_remaining = false;
   47209             : 
   47210           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   47211             :                 discard_const_p(char *, kwnames),
   47212             :                 &blob.data, &blob_length,
   47213             :                 &bigendian_obj,
   47214             :                 &ndr64_obj,
   47215             :                 &allow_remaining_obj)) {
   47216           0 :                 return NULL;
   47217             :         }
   47218           0 :         blob.length = blob_length;
   47219             : 
   47220           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47221           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47222             :         }
   47223           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47224           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47225             :         }
   47226             : 
   47227           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47228           0 :                 allow_remaining = true;
   47229             :         }
   47230             : 
   47231           0 :         return py_netr_DsRGetSiteName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   47232             : }
   47233             : 
   47234           0 : static PyObject *py_netr_DsRGetSiteName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47235             : {
   47236           0 :         DATA_BLOB blob;
   47237           0 :         Py_ssize_t blob_length = 0;
   47238           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47239           0 :         PyObject *bigendian_obj = NULL;
   47240           0 :         PyObject *ndr64_obj = NULL;
   47241           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47242           0 :         PyObject *allow_remaining_obj = NULL;
   47243           0 :         bool allow_remaining = false;
   47244             : 
   47245           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   47246             :                 discard_const_p(char *, kwnames),
   47247             :                 &blob.data, &blob_length,
   47248             :                 &bigendian_obj,
   47249             :                 &ndr64_obj,
   47250             :                 &allow_remaining_obj)) {
   47251           0 :                 return NULL;
   47252             :         }
   47253           0 :         blob.length = blob_length;
   47254             : 
   47255           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47256           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47257             :         }
   47258           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47259           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47260             :         }
   47261             : 
   47262           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47263           0 :                 allow_remaining = true;
   47264             :         }
   47265             : 
   47266           0 :         return py_netr_DsRGetSiteName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   47267             : }
   47268             : 
   47269           0 : static PyObject *py_netr_DsRGetSiteName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   47270             : {
   47271           0 :         const struct ndr_interface_call *call = NULL;
   47272           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   47273           0 :         PyObject *ret;
   47274           0 :         char *retstr;
   47275             : 
   47276           0 :         if (ndr_table_netlogon.num_calls < 29) {
   47277           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_print");
   47278           0 :                 return NULL;
   47279             :         }
   47280           0 :         call = &ndr_table_netlogon.calls[28];
   47281             : 
   47282           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   47283           0 :         ret = PyUnicode_FromString(retstr);
   47284           0 :         TALLOC_FREE(retstr);
   47285             : 
   47286           0 :         return ret;
   47287             : }
   47288             : 
   47289           0 : static PyObject *py_netr_DsRGetSiteName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47290             : {
   47291           0 :         return py_netr_DsRGetSiteName_ndr_print(py_obj, "netr_DsRGetSiteName_in", NDR_IN);
   47292             : }
   47293             : 
   47294           0 : static PyObject *py_netr_DsRGetSiteName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47295             : {
   47296           0 :         return py_netr_DsRGetSiteName_ndr_print(py_obj, "netr_DsRGetSiteName_out", NDR_OUT);
   47297             : }
   47298             : 
   47299             : static PyMethodDef py_netr_DsRGetSiteName_methods[] = {
   47300             :         { "opnum", (PyCFunction)py_netr_DsRGetSiteName_ndr_opnum, METH_NOARGS|METH_CLASS,
   47301             :                 "netlogon.netr_DsRGetSiteName.opnum() -> 28 (0x1c) " },
   47302             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   47303             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   47304             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   47305             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   47306             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   47307             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   47308             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   47309             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   47310             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetSiteName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   47311             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetSiteName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   47312             :         { NULL, NULL, 0, NULL }
   47313             : };
   47314             : 
   47315             : 
   47316             : static PyTypeObject netr_DsRGetSiteName_Type = {
   47317             :         PyVarObject_HEAD_INIT(NULL, 0)
   47318             :         .tp_name = "netlogon.netr_DsRGetSiteName",
   47319             :         .tp_getset = py_netr_DsRGetSiteName_getsetters,
   47320             :         .tp_methods = py_netr_DsRGetSiteName_methods,
   47321             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   47322             :         .tp_new = py_netr_DsRGetSiteName_new,
   47323             : };
   47324             : 
   47325         146 : static bool pack_py_netr_DsRGetSiteName_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetSiteName *r)
   47326             : {
   47327           0 :         PyObject *py_computer_name;
   47328         146 :         const char *kwnames[] = {
   47329             :                 "computer_name", NULL
   47330             :         };
   47331             : 
   47332         146 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_DsRGetSiteName", discard_const_p(char *, kwnames), &py_computer_name)) {
   47333           0 :                 return false;
   47334             :         }
   47335             : 
   47336         146 :         if (py_computer_name == NULL) {
   47337           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   47338           0 :                 return false;
   47339             :         }
   47340         146 :         if (py_computer_name == Py_None) {
   47341           0 :                 r->in.computer_name = NULL;
   47342             :         } else {
   47343         146 :                 r->in.computer_name = NULL;
   47344             :                 {
   47345           0 :                         const char *test_str;
   47346           0 :                         const char *talloc_str;
   47347         146 :                         PyObject *unicode = NULL;
   47348         146 :                         if (PyUnicode_Check(py_computer_name)) {
   47349         146 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   47350         146 :                                 if (unicode == NULL) {
   47351           0 :                                         PyErr_NoMemory();
   47352           0 :                                         return false;
   47353             :                                 }
   47354         146 :                                 test_str = PyBytes_AS_STRING(unicode);
   47355           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   47356           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   47357             :                         } else {
   47358           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   47359           0 :                                 return false;
   47360             :                         }
   47361         146 :                         talloc_str = talloc_strdup(r, test_str);
   47362         146 :                         if (unicode != NULL) {
   47363         146 :                                 Py_DECREF(unicode);
   47364             :                         }
   47365         146 :                         if (talloc_str == NULL) {
   47366           0 :                                 PyErr_NoMemory();
   47367           0 :                                 return false;
   47368             :                         }
   47369         146 :                         r->in.computer_name = talloc_str;
   47370             :                 }
   47371             :         }
   47372         146 :         return true;
   47373             : }
   47374             : 
   47375         146 : static PyObject *unpack_py_netr_DsRGetSiteName_args_out(struct netr_DsRGetSiteName *r)
   47376             : {
   47377           0 :         PyObject *result;
   47378           0 :         PyObject *py_site;
   47379         146 :         if (*r->out.site == NULL) {
   47380           0 :                 py_site = Py_None;
   47381           0 :                 Py_INCREF(py_site);
   47382             :         } else {
   47383         146 :                 if (*r->out.site == NULL) {
   47384           0 :                         py_site = Py_None;
   47385           0 :                         Py_INCREF(py_site);
   47386             :                 } else {
   47387         146 :                         py_site = PyUnicode_Decode(*r->out.site, strlen(*r->out.site), "utf-8", "ignore");
   47388             :                 }
   47389             :         }
   47390         146 :         result = py_site;
   47391         146 :         if (!W_ERROR_IS_OK(r->out.result)) {
   47392           0 :                 PyErr_SetWERROR(r->out.result);
   47393           0 :                 return NULL;
   47394             :         }
   47395             : 
   47396         146 :         return result;
   47397             : }
   47398             : 
   47399             : 
   47400           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_server_name(PyObject *obj, void *closure)
   47401             : {
   47402           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47403           0 :         PyObject *py_server_name;
   47404           0 :         if (object->in.server_name == NULL) {
   47405           0 :                 Py_RETURN_NONE;
   47406             :         }
   47407           0 :         if (object->in.server_name == NULL) {
   47408           0 :                 py_server_name = Py_None;
   47409           0 :                 Py_INCREF(py_server_name);
   47410             :         } else {
   47411           0 :                 py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   47412             :         }
   47413           0 :         return py_server_name;
   47414             : }
   47415             : 
   47416           0 : static int py_netr_LogonGetDomainInfo_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   47417             : {
   47418           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47419           0 :         if (value == NULL) {
   47420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   47421           0 :                 return -1;
   47422             :         }
   47423           0 :         object->in.server_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server_name);
   47424           0 :         if (object->in.server_name == NULL) {
   47425           0 :                 PyErr_NoMemory();
   47426           0 :                 return -1;
   47427             :         }
   47428             :         {
   47429           0 :                 const char *test_str;
   47430           0 :                 const char *talloc_str;
   47431           0 :                 PyObject *unicode = NULL;
   47432           0 :                 if (PyUnicode_Check(value)) {
   47433           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47434           0 :                         if (unicode == NULL) {
   47435           0 :                                 PyErr_NoMemory();
   47436           0 :                                 return -1;
   47437             :                         }
   47438           0 :                         test_str = PyBytes_AS_STRING(unicode);
   47439           0 :                 } else if (PyBytes_Check(value)) {
   47440           0 :                         test_str = PyBytes_AS_STRING(value);
   47441             :                 } else {
   47442           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47443           0 :                         return -1;
   47444             :                 }
   47445           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47446           0 :                 if (unicode != NULL) {
   47447           0 :                         Py_DECREF(unicode);
   47448             :                 }
   47449           0 :                 if (talloc_str == NULL) {
   47450           0 :                         PyErr_NoMemory();
   47451           0 :                         return -1;
   47452             :                 }
   47453           0 :                 object->in.server_name = talloc_str;
   47454             :         }
   47455           0 :         return 0;
   47456             : }
   47457             : 
   47458           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_computer_name(PyObject *obj, void *closure)
   47459             : {
   47460           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47461           0 :         PyObject *py_computer_name;
   47462           0 :         if (object->in.computer_name == NULL) {
   47463           0 :                 Py_RETURN_NONE;
   47464             :         }
   47465           0 :         if (object->in.computer_name == NULL) {
   47466           0 :                 py_computer_name = Py_None;
   47467           0 :                 Py_INCREF(py_computer_name);
   47468             :         } else {
   47469           0 :                 if (object->in.computer_name == NULL) {
   47470           0 :                         py_computer_name = Py_None;
   47471           0 :                         Py_INCREF(py_computer_name);
   47472             :                 } else {
   47473           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   47474             :                 }
   47475             :         }
   47476           0 :         return py_computer_name;
   47477             : }
   47478             : 
   47479           0 : static int py_netr_LogonGetDomainInfo_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   47480             : {
   47481           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47482           0 :         if (value == NULL) {
   47483           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   47484           0 :                 return -1;
   47485             :         }
   47486           0 :         if (value == Py_None) {
   47487           0 :                 object->in.computer_name = NULL;
   47488             :         } else {
   47489           0 :                 object->in.computer_name = NULL;
   47490             :                 {
   47491           0 :                         const char *test_str;
   47492           0 :                         const char *talloc_str;
   47493           0 :                         PyObject *unicode = NULL;
   47494           0 :                         if (PyUnicode_Check(value)) {
   47495           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47496           0 :                                 if (unicode == NULL) {
   47497           0 :                                         PyErr_NoMemory();
   47498           0 :                                         return -1;
   47499             :                                 }
   47500           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47501           0 :                         } else if (PyBytes_Check(value)) {
   47502           0 :                                 test_str = PyBytes_AS_STRING(value);
   47503             :                         } else {
   47504           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47505           0 :                                 return -1;
   47506             :                         }
   47507           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47508           0 :                         if (unicode != NULL) {
   47509           0 :                                 Py_DECREF(unicode);
   47510             :                         }
   47511           0 :                         if (talloc_str == NULL) {
   47512           0 :                                 PyErr_NoMemory();
   47513           0 :                                 return -1;
   47514             :                         }
   47515           0 :                         object->in.computer_name = talloc_str;
   47516             :                 }
   47517             :         }
   47518           0 :         return 0;
   47519             : }
   47520             : 
   47521           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_credential(PyObject *obj, void *closure)
   47522             : {
   47523           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47524           0 :         PyObject *py_credential;
   47525           0 :         if (object->in.credential == NULL) {
   47526           0 :                 Py_RETURN_NONE;
   47527             :         }
   47528           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   47529           0 :         return py_credential;
   47530             : }
   47531             : 
   47532           0 : static int py_netr_LogonGetDomainInfo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   47533             : {
   47534           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47535           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   47536           0 :         if (value == NULL) {
   47537           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   47538           0 :                 return -1;
   47539             :         }
   47540           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   47541           0 :         if (object->in.credential == NULL) {
   47542           0 :                 PyErr_NoMemory();
   47543           0 :                 return -1;
   47544             :         }
   47545           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   47546           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47547           0 :                 PyErr_NoMemory();
   47548           0 :                 return -1;
   47549             :         }
   47550           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   47551           0 :         return 0;
   47552             : }
   47553             : 
   47554           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_return_authenticator(PyObject *obj, void *closure)
   47555             : {
   47556           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47557           0 :         PyObject *py_return_authenticator;
   47558           0 :         if (object->in.return_authenticator == NULL) {
   47559           0 :                 Py_RETURN_NONE;
   47560             :         }
   47561           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   47562           0 :         return py_return_authenticator;
   47563             : }
   47564             : 
   47565           0 : static int py_netr_LogonGetDomainInfo_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   47566             : {
   47567           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47568           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   47569           0 :         if (value == NULL) {
   47570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   47571           0 :                 return -1;
   47572             :         }
   47573           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   47574           0 :         if (object->in.return_authenticator == NULL) {
   47575           0 :                 PyErr_NoMemory();
   47576           0 :                 return -1;
   47577             :         }
   47578           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   47579           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47580           0 :                 PyErr_NoMemory();
   47581           0 :                 return -1;
   47582             :         }
   47583           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   47584           0 :         return 0;
   47585             : }
   47586             : 
   47587           0 : static PyObject *py_netr_LogonGetDomainInfo_out_get_return_authenticator(PyObject *obj, void *closure)
   47588             : {
   47589           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47590           0 :         PyObject *py_return_authenticator;
   47591           0 :         if (object->out.return_authenticator == NULL) {
   47592           0 :                 Py_RETURN_NONE;
   47593             :         }
   47594           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   47595           0 :         return py_return_authenticator;
   47596             : }
   47597             : 
   47598           0 : static int py_netr_LogonGetDomainInfo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   47599             : {
   47600           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47601           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   47602           0 :         if (value == NULL) {
   47603           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   47604           0 :                 return -1;
   47605             :         }
   47606           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   47607           0 :         if (object->out.return_authenticator == NULL) {
   47608           0 :                 PyErr_NoMemory();
   47609           0 :                 return -1;
   47610             :         }
   47611           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   47612           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47613           0 :                 PyErr_NoMemory();
   47614           0 :                 return -1;
   47615             :         }
   47616           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   47617           0 :         return 0;
   47618             : }
   47619             : 
   47620           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_level(PyObject *obj, void *closure)
   47621             : {
   47622           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47623           0 :         PyObject *py_level;
   47624           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   47625           0 :         return py_level;
   47626             : }
   47627             : 
   47628           0 : static int py_netr_LogonGetDomainInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   47629             : {
   47630           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47631           0 :         if (value == NULL) {
   47632           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   47633           0 :                 return -1;
   47634             :         }
   47635             :         {
   47636           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   47637           0 :                 if (PyLong_Check(value)) {
   47638           0 :                         unsigned long long test_var;
   47639           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   47640           0 :                         if (PyErr_Occurred() != NULL) {
   47641           0 :                                 return -1;
   47642             :                         }
   47643           0 :                         if (test_var > uint_max) {
   47644           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47645             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47646           0 :                                 return -1;
   47647             :                         }
   47648           0 :                         object->in.level = test_var;
   47649             :                 } else {
   47650           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47651             :                           PyLong_Type.tp_name);
   47652           0 :                         return -1;
   47653             :                 }
   47654             :         }
   47655           0 :         return 0;
   47656             : }
   47657             : 
   47658           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_query(PyObject *obj, void *closure)
   47659             : {
   47660           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47661           0 :         PyObject *py_query;
   47662           0 :         if (object->in.query == NULL) {
   47663           0 :                 Py_RETURN_NONE;
   47664             :         }
   47665           0 :         py_query = pyrpc_import_union(&netr_WorkstationInfo_Type, object->in.query, object->in.level, object->in.query, "union netr_WorkstationInfo");
   47666           0 :         if (py_query == NULL) {
   47667           0 :                 return NULL;
   47668             :         }
   47669           0 :         return py_query;
   47670             : }
   47671             : 
   47672           0 : static int py_netr_LogonGetDomainInfo_in_set_query(PyObject *py_obj, PyObject *value, void *closure)
   47673             : {
   47674           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47675           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.query));
   47676           0 :         if (value == NULL) {
   47677           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.query");
   47678           0 :                 return -1;
   47679             :         }
   47680           0 :         object->in.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.query);
   47681           0 :         if (object->in.query == NULL) {
   47682           0 :                 PyErr_NoMemory();
   47683           0 :                 return -1;
   47684             :         }
   47685             :         {
   47686           0 :                 union netr_WorkstationInfo *query_switch_1;
   47687           0 :                 query_switch_1 = (union netr_WorkstationInfo *)pyrpc_export_union(&netr_WorkstationInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_WorkstationInfo");
   47688           0 :                 if (query_switch_1 == NULL) {
   47689           0 :                         return -1;
   47690             :                 }
   47691           0 :                 object->in.query = query_switch_1;
   47692             :         }
   47693           0 :         return 0;
   47694             : }
   47695             : 
   47696           0 : static PyObject *py_netr_LogonGetDomainInfo_out_get_info(PyObject *obj, void *closure)
   47697             : {
   47698           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47699           0 :         PyObject *py_info;
   47700           0 :         if (object->out.info == NULL) {
   47701           0 :                 Py_RETURN_NONE;
   47702             :         }
   47703           0 :         py_info = pyrpc_import_union(&netr_DomainInfo_Type, object->out.info, object->in.level, object->out.info, "union netr_DomainInfo");
   47704           0 :         if (py_info == NULL) {
   47705           0 :                 return NULL;
   47706             :         }
   47707           0 :         return py_info;
   47708             : }
   47709             : 
   47710           0 : static int py_netr_LogonGetDomainInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   47711             : {
   47712           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47713           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   47714           0 :         if (value == NULL) {
   47715           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   47716           0 :                 return -1;
   47717             :         }
   47718           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   47719           0 :         if (object->out.info == NULL) {
   47720           0 :                 PyErr_NoMemory();
   47721           0 :                 return -1;
   47722             :         }
   47723             :         {
   47724           0 :                 union netr_DomainInfo *info_switch_1;
   47725           0 :                 info_switch_1 = (union netr_DomainInfo *)pyrpc_export_union(&netr_DomainInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_DomainInfo");
   47726           0 :                 if (info_switch_1 == NULL) {
   47727           0 :                         return -1;
   47728             :                 }
   47729           0 :                 object->out.info = info_switch_1;
   47730             :         }
   47731           0 :         return 0;
   47732             : }
   47733             : 
   47734           0 : static PyObject *py_netr_LogonGetDomainInfo_get_result(PyObject *obj, void *closure)
   47735             : {
   47736           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47737           0 :         PyObject *py_result;
   47738           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   47739           0 :         return py_result;
   47740             : }
   47741             : 
   47742           0 : static int py_netr_LogonGetDomainInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   47743             : {
   47744           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47745           0 :         if (value == NULL) {
   47746           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   47747           0 :                 return -1;
   47748             :         }
   47749           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   47750           0 :         return 0;
   47751             : }
   47752             : 
   47753             : static PyGetSetDef py_netr_LogonGetDomainInfo_getsetters[] = {
   47754             :         {
   47755             :                 .name = discard_const_p(char, "in_server_name"),
   47756             :                 .get = py_netr_LogonGetDomainInfo_in_get_server_name,
   47757             :                 .set = py_netr_LogonGetDomainInfo_in_set_server_name,
   47758             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47759             :         },
   47760             :         {
   47761             :                 .name = discard_const_p(char, "in_computer_name"),
   47762             :                 .get = py_netr_LogonGetDomainInfo_in_get_computer_name,
   47763             :                 .set = py_netr_LogonGetDomainInfo_in_set_computer_name,
   47764             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47765             :         },
   47766             :         {
   47767             :                 .name = discard_const_p(char, "in_credential"),
   47768             :                 .get = py_netr_LogonGetDomainInfo_in_get_credential,
   47769             :                 .set = py_netr_LogonGetDomainInfo_in_set_credential,
   47770             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   47771             :         },
   47772             :         {
   47773             :                 .name = discard_const_p(char, "in_return_authenticator"),
   47774             :                 .get = py_netr_LogonGetDomainInfo_in_get_return_authenticator,
   47775             :                 .set = py_netr_LogonGetDomainInfo_in_set_return_authenticator,
   47776             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   47777             :         },
   47778             :         {
   47779             :                 .name = discard_const_p(char, "out_return_authenticator"),
   47780             :                 .get = py_netr_LogonGetDomainInfo_out_get_return_authenticator,
   47781             :                 .set = py_netr_LogonGetDomainInfo_out_set_return_authenticator,
   47782             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   47783             :         },
   47784             :         {
   47785             :                 .name = discard_const_p(char, "in_level"),
   47786             :                 .get = py_netr_LogonGetDomainInfo_in_get_level,
   47787             :                 .set = py_netr_LogonGetDomainInfo_in_set_level,
   47788             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   47789             :         },
   47790             :         {
   47791             :                 .name = discard_const_p(char, "in_query"),
   47792             :                 .get = py_netr_LogonGetDomainInfo_in_get_query,
   47793             :                 .set = py_netr_LogonGetDomainInfo_in_set_query,
   47794             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationInfo")
   47795             :         },
   47796             :         {
   47797             :                 .name = discard_const_p(char, "out_info"),
   47798             :                 .get = py_netr_LogonGetDomainInfo_out_get_info,
   47799             :                 .set = py_netr_LogonGetDomainInfo_out_set_info,
   47800             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainInfo")
   47801             :         },
   47802             :         {
   47803             :                 .name = discard_const_p(char, "result"),
   47804             :                 .get = py_netr_LogonGetDomainInfo_get_result,
   47805             :                 .set = py_netr_LogonGetDomainInfo_set_result,
   47806             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   47807             :         },
   47808             :         { .name = NULL }
   47809             : };
   47810             : 
   47811           0 : static PyObject *py_netr_LogonGetDomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   47812             : {
   47813           0 :         PyObject *self = pytalloc_new(struct netr_LogonGetDomainInfo, type);
   47814           0 :         struct netr_LogonGetDomainInfo *_self = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(self);
   47815           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   47816           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   47817           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   47818           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   47819           0 :         _self->in.query = talloc_zero(mem_ctx, union netr_WorkstationInfo);
   47820           0 :         _self->out.info = talloc_zero(mem_ctx, union netr_DomainInfo);
   47821           0 :         return self;
   47822             : }
   47823             : 
   47824           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   47825             : {
   47826             : 
   47827             : 
   47828           0 :         return PyLong_FromLong(29);
   47829             : }
   47830             : 
   47831           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   47832             : {
   47833           0 :         const struct ndr_interface_call *call = NULL;
   47834           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47835           0 :         PyObject *ret = NULL;
   47836           0 :         struct ndr_push *push = NULL;
   47837           0 :         DATA_BLOB blob;
   47838           0 :         enum ndr_err_code err;
   47839             : 
   47840           0 :         if (ndr_table_netlogon.num_calls < 30) {
   47841           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_pack");
   47842           0 :                 return NULL;
   47843             :         }
   47844           0 :         call = &ndr_table_netlogon.calls[29];
   47845             : 
   47846           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   47847           0 :         if (push == NULL) {
   47848           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47849           0 :                 return NULL;
   47850             :         }
   47851             : 
   47852           0 :         push->flags |= ndr_push_flags;
   47853             : 
   47854           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   47855           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47856           0 :                 TALLOC_FREE(push);
   47857           0 :                 PyErr_SetNdrError(err);
   47858           0 :                 return NULL;
   47859             :         }
   47860           0 :         blob = ndr_push_blob(push);
   47861           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   47862           0 :         TALLOC_FREE(push);
   47863           0 :         return ret;
   47864             : }
   47865             : 
   47866           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47867             : {
   47868           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47869           0 :         PyObject *bigendian_obj = NULL;
   47870           0 :         PyObject *ndr64_obj = NULL;
   47871           0 :         libndr_flags ndr_push_flags = 0;
   47872             : 
   47873           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   47874             :                 discard_const_p(char *, kwnames),
   47875             :                 &bigendian_obj,
   47876             :                 &ndr64_obj)) {
   47877           0 :                 return NULL;
   47878             :         }
   47879             : 
   47880           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47881           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47882             :         }
   47883           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47884           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47885             :         }
   47886             : 
   47887           0 :         return py_netr_LogonGetDomainInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   47888             : }
   47889             : 
   47890           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47891             : {
   47892           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47893           0 :         PyObject *bigendian_obj = NULL;
   47894           0 :         PyObject *ndr64_obj = NULL;
   47895           0 :         libndr_flags ndr_push_flags = 0;
   47896             : 
   47897           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   47898             :                 discard_const_p(char *, kwnames),
   47899             :                 &bigendian_obj,
   47900             :                 &ndr64_obj)) {
   47901           0 :                 return NULL;
   47902             :         }
   47903             : 
   47904           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47905           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47906             :         }
   47907           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47908           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47909             :         }
   47910             : 
   47911           0 :         return py_netr_LogonGetDomainInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   47912             : }
   47913             : 
   47914           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   47915             : {
   47916           0 :         const struct ndr_interface_call *call = NULL;
   47917           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47918           0 :         struct ndr_pull *pull = NULL;
   47919           0 :         enum ndr_err_code err;
   47920             : 
   47921           0 :         if (ndr_table_netlogon.num_calls < 30) {
   47922           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_unpack");
   47923           0 :                 return NULL;
   47924             :         }
   47925           0 :         call = &ndr_table_netlogon.calls[29];
   47926             : 
   47927           0 :         pull = ndr_pull_init_blob(blob, object);
   47928           0 :         if (pull == NULL) {
   47929           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47930           0 :                 return NULL;
   47931             :         }
   47932             : 
   47933           0 :         pull->flags |= ndr_pull_flags;
   47934             : 
   47935           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   47936           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47937           0 :                 TALLOC_FREE(pull);
   47938           0 :                 PyErr_SetNdrError(err);
   47939           0 :                 return NULL;
   47940             :         }
   47941           0 :         if (!allow_remaining) {
   47942           0 :                 uint32_t highest_ofs;
   47943             : 
   47944           0 :                 if (pull->offset > pull->relative_highest_offset) {
   47945           0 :                         highest_ofs = pull->offset;
   47946             :                 } else {
   47947           0 :                         highest_ofs = pull->relative_highest_offset;
   47948             :                 }
   47949           0 :                 if (highest_ofs < pull->data_size) {
   47950           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   47951             :                                 "not all bytes consumed ofs[%u] size[%u]",
   47952             :                                 highest_ofs, pull->data_size);
   47953           0 :                         TALLOC_FREE(pull);
   47954           0 :                         PyErr_SetNdrError(err);
   47955           0 :                         return NULL;
   47956             :                 }
   47957             :         }
   47958             : 
   47959           0 :         TALLOC_FREE(pull);
   47960           0 :         Py_RETURN_NONE;
   47961             : }
   47962             : 
   47963           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47964             : {
   47965           0 :         DATA_BLOB blob;
   47966           0 :         Py_ssize_t blob_length = 0;
   47967           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47968           0 :         PyObject *bigendian_obj = NULL;
   47969           0 :         PyObject *ndr64_obj = NULL;
   47970           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47971           0 :         PyObject *allow_remaining_obj = NULL;
   47972           0 :         bool allow_remaining = false;
   47973             : 
   47974           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   47975             :                 discard_const_p(char *, kwnames),
   47976             :                 &blob.data, &blob_length,
   47977             :                 &bigendian_obj,
   47978             :                 &ndr64_obj,
   47979             :                 &allow_remaining_obj)) {
   47980           0 :                 return NULL;
   47981             :         }
   47982           0 :         blob.length = blob_length;
   47983             : 
   47984           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47985           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47986             :         }
   47987           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47988           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47989             :         }
   47990             : 
   47991           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47992           0 :                 allow_remaining = true;
   47993             :         }
   47994             : 
   47995           0 :         return py_netr_LogonGetDomainInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   47996             : }
   47997             : 
   47998           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47999             : {
   48000           0 :         DATA_BLOB blob;
   48001           0 :         Py_ssize_t blob_length = 0;
   48002           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48003           0 :         PyObject *bigendian_obj = NULL;
   48004           0 :         PyObject *ndr64_obj = NULL;
   48005           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48006           0 :         PyObject *allow_remaining_obj = NULL;
   48007           0 :         bool allow_remaining = false;
   48008             : 
   48009           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   48010             :                 discard_const_p(char *, kwnames),
   48011             :                 &blob.data, &blob_length,
   48012             :                 &bigendian_obj,
   48013             :                 &ndr64_obj,
   48014             :                 &allow_remaining_obj)) {
   48015           0 :                 return NULL;
   48016             :         }
   48017           0 :         blob.length = blob_length;
   48018             : 
   48019           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48020           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48021             :         }
   48022           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48023           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48024             :         }
   48025             : 
   48026           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48027           0 :                 allow_remaining = true;
   48028             :         }
   48029             : 
   48030           0 :         return py_netr_LogonGetDomainInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   48031             : }
   48032             : 
   48033           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   48034             : {
   48035           0 :         const struct ndr_interface_call *call = NULL;
   48036           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   48037           0 :         PyObject *ret;
   48038           0 :         char *retstr;
   48039             : 
   48040           0 :         if (ndr_table_netlogon.num_calls < 30) {
   48041           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_print");
   48042           0 :                 return NULL;
   48043             :         }
   48044           0 :         call = &ndr_table_netlogon.calls[29];
   48045             : 
   48046           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   48047           0 :         ret = PyUnicode_FromString(retstr);
   48048           0 :         TALLOC_FREE(retstr);
   48049             : 
   48050           0 :         return ret;
   48051             : }
   48052             : 
   48053           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48054             : {
   48055           0 :         return py_netr_LogonGetDomainInfo_ndr_print(py_obj, "netr_LogonGetDomainInfo_in", NDR_IN);
   48056             : }
   48057             : 
   48058           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48059             : {
   48060           0 :         return py_netr_LogonGetDomainInfo_ndr_print(py_obj, "netr_LogonGetDomainInfo_out", NDR_OUT);
   48061             : }
   48062             : 
   48063             : static PyMethodDef py_netr_LogonGetDomainInfo_methods[] = {
   48064             :         { "opnum", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   48065             :                 "netlogon.netr_LogonGetDomainInfo.opnum() -> 29 (0x1d) " },
   48066             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   48067             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   48068             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   48069             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   48070             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   48071             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   48072             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   48073             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   48074             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   48075             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   48076             :         { NULL, NULL, 0, NULL }
   48077             : };
   48078             : 
   48079             : 
   48080             : static PyTypeObject netr_LogonGetDomainInfo_Type = {
   48081             :         PyVarObject_HEAD_INIT(NULL, 0)
   48082             :         .tp_name = "netlogon.netr_LogonGetDomainInfo",
   48083             :         .tp_getset = py_netr_LogonGetDomainInfo_getsetters,
   48084             :         .tp_methods = py_netr_LogonGetDomainInfo_methods,
   48085             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   48086             :         .tp_new = py_netr_LogonGetDomainInfo_new,
   48087             : };
   48088             : 
   48089          31 : static bool pack_py_netr_LogonGetDomainInfo_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetDomainInfo *r)
   48090             : {
   48091           0 :         PyObject *py_server_name;
   48092           0 :         PyObject *py_computer_name;
   48093           0 :         PyObject *py_credential;
   48094           0 :         PyObject *py_return_authenticator;
   48095           0 :         PyObject *py_level;
   48096           0 :         PyObject *py_query;
   48097          31 :         const char *kwnames[] = {
   48098             :                 "server_name", "computer_name", "credential", "return_authenticator", "level", "query", NULL
   48099             :         };
   48100             : 
   48101          31 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_LogonGetDomainInfo", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_level, &py_query)) {
   48102           0 :                 return false;
   48103             :         }
   48104             : 
   48105          31 :         if (py_server_name == NULL) {
   48106           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   48107           0 :                 return false;
   48108             :         }
   48109          31 :         r->in.server_name = talloc_ptrtype(r, r->in.server_name);
   48110          31 :         if (r->in.server_name == NULL) {
   48111           0 :                 PyErr_NoMemory();
   48112           0 :                 return false;
   48113             :         }
   48114             :         {
   48115           0 :                 const char *test_str;
   48116           0 :                 const char *talloc_str;
   48117          31 :                 PyObject *unicode = NULL;
   48118          31 :                 if (PyUnicode_Check(py_server_name)) {
   48119          31 :                         unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   48120          31 :                         if (unicode == NULL) {
   48121           0 :                                 PyErr_NoMemory();
   48122           0 :                                 return false;
   48123             :                         }
   48124          31 :                         test_str = PyBytes_AS_STRING(unicode);
   48125           0 :                 } else if (PyBytes_Check(py_server_name)) {
   48126           0 :                         test_str = PyBytes_AS_STRING(py_server_name);
   48127             :                 } else {
   48128           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   48129           0 :                         return false;
   48130             :                 }
   48131          31 :                 talloc_str = talloc_strdup(r, test_str);
   48132          31 :                 if (unicode != NULL) {
   48133          31 :                         Py_DECREF(unicode);
   48134             :                 }
   48135          31 :                 if (talloc_str == NULL) {
   48136           0 :                         PyErr_NoMemory();
   48137           0 :                         return false;
   48138             :                 }
   48139          31 :                 r->in.server_name = talloc_str;
   48140             :         }
   48141          31 :         if (py_computer_name == NULL) {
   48142           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   48143           0 :                 return false;
   48144             :         }
   48145          31 :         if (py_computer_name == Py_None) {
   48146           0 :                 r->in.computer_name = NULL;
   48147             :         } else {
   48148          31 :                 r->in.computer_name = NULL;
   48149             :                 {
   48150           0 :                         const char *test_str;
   48151           0 :                         const char *talloc_str;
   48152          31 :                         PyObject *unicode = NULL;
   48153          31 :                         if (PyUnicode_Check(py_computer_name)) {
   48154          31 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   48155          31 :                                 if (unicode == NULL) {
   48156           0 :                                         PyErr_NoMemory();
   48157           0 :                                         return false;
   48158             :                                 }
   48159          31 :                                 test_str = PyBytes_AS_STRING(unicode);
   48160           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   48161           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   48162             :                         } else {
   48163           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   48164           0 :                                 return false;
   48165             :                         }
   48166          31 :                         talloc_str = talloc_strdup(r, test_str);
   48167          31 :                         if (unicode != NULL) {
   48168          31 :                                 Py_DECREF(unicode);
   48169             :                         }
   48170          31 :                         if (talloc_str == NULL) {
   48171           0 :                                 PyErr_NoMemory();
   48172           0 :                                 return false;
   48173             :                         }
   48174          31 :                         r->in.computer_name = talloc_str;
   48175             :                 }
   48176             :         }
   48177          31 :         if (py_credential == NULL) {
   48178           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   48179           0 :                 return false;
   48180             :         }
   48181          31 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   48182          31 :         if (r->in.credential == NULL) {
   48183           0 :                 PyErr_NoMemory();
   48184           0 :                 return false;
   48185             :         }
   48186          31 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   48187          31 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   48188           0 :                 PyErr_NoMemory();
   48189           0 :                 return false;
   48190             :         }
   48191          31 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   48192          31 :         if (py_return_authenticator == NULL) {
   48193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   48194           0 :                 return false;
   48195             :         }
   48196          31 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   48197          31 :         if (r->in.return_authenticator == NULL) {
   48198           0 :                 PyErr_NoMemory();
   48199           0 :                 return false;
   48200             :         }
   48201          31 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   48202          31 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   48203           0 :                 PyErr_NoMemory();
   48204           0 :                 return false;
   48205             :         }
   48206          31 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   48207          31 :         if (py_level == NULL) {
   48208           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   48209           0 :                 return false;
   48210             :         }
   48211             :         {
   48212          31 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   48213          31 :                 if (PyLong_Check(py_level)) {
   48214           0 :                         unsigned long long test_var;
   48215          31 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   48216          31 :                         if (PyErr_Occurred() != NULL) {
   48217           0 :                                 return false;
   48218             :                         }
   48219          31 :                         if (test_var > uint_max) {
   48220           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48221             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48222           0 :                                 return false;
   48223             :                         }
   48224          31 :                         r->in.level = test_var;
   48225             :                 } else {
   48226           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48227             :                           PyLong_Type.tp_name);
   48228           0 :                         return false;
   48229             :                 }
   48230             :         }
   48231          31 :         if (py_query == NULL) {
   48232           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.query");
   48233           0 :                 return false;
   48234             :         }
   48235          31 :         r->in.query = talloc_ptrtype(r, r->in.query);
   48236          31 :         if (r->in.query == NULL) {
   48237           0 :                 PyErr_NoMemory();
   48238           0 :                 return false;
   48239             :         }
   48240             :         {
   48241           0 :                 union netr_WorkstationInfo *query_switch_1;
   48242          31 :                 query_switch_1 = (union netr_WorkstationInfo *)pyrpc_export_union(&netr_WorkstationInfo_Type, r, r->in.level, py_query, "union netr_WorkstationInfo");
   48243          31 :                 if (query_switch_1 == NULL) {
   48244           0 :                         return false;
   48245             :                 }
   48246          31 :                 r->in.query = query_switch_1;
   48247             :         }
   48248          31 :         return true;
   48249             : }
   48250             : 
   48251          31 : static PyObject *unpack_py_netr_LogonGetDomainInfo_args_out(struct netr_LogonGetDomainInfo *r)
   48252             : {
   48253           0 :         PyObject *result;
   48254           0 :         PyObject *py_return_authenticator;
   48255           0 :         PyObject *py_info;
   48256          31 :         result = PyTuple_New(2);
   48257          31 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   48258          31 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   48259          31 :         py_info = pyrpc_import_union(&netr_DomainInfo_Type, r->out.info, r->in.level, r->out.info, "union netr_DomainInfo");
   48260          31 :         if (py_info == NULL) {
   48261           0 :                 return NULL;
   48262             :         }
   48263          31 :         PyTuple_SetItem(result, 1, py_info);
   48264          31 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   48265           0 :                 PyErr_SetNTSTATUS(r->out.result);
   48266           0 :                 return NULL;
   48267             :         }
   48268             : 
   48269          31 :         return result;
   48270             : }
   48271             : 
   48272             : 
   48273           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_server_name(PyObject *obj, void *closure)
   48274             : {
   48275           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48276           0 :         PyObject *py_server_name;
   48277           0 :         if (object->in.server_name == NULL) {
   48278           0 :                 Py_RETURN_NONE;
   48279             :         }
   48280           0 :         if (object->in.server_name == NULL) {
   48281           0 :                 py_server_name = Py_None;
   48282           0 :                 Py_INCREF(py_server_name);
   48283             :         } else {
   48284           0 :                 if (object->in.server_name == NULL) {
   48285           0 :                         py_server_name = Py_None;
   48286           0 :                         Py_INCREF(py_server_name);
   48287             :                 } else {
   48288           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   48289             :                 }
   48290             :         }
   48291           0 :         return py_server_name;
   48292             : }
   48293             : 
   48294           0 : static int py_netr_ServerPasswordSet2_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   48295             : {
   48296           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48297           0 :         if (value == NULL) {
   48298           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   48299           0 :                 return -1;
   48300             :         }
   48301           0 :         if (value == Py_None) {
   48302           0 :                 object->in.server_name = NULL;
   48303             :         } else {
   48304           0 :                 object->in.server_name = NULL;
   48305             :                 {
   48306           0 :                         const char *test_str;
   48307           0 :                         const char *talloc_str;
   48308           0 :                         PyObject *unicode = NULL;
   48309           0 :                         if (PyUnicode_Check(value)) {
   48310           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48311           0 :                                 if (unicode == NULL) {
   48312           0 :                                         PyErr_NoMemory();
   48313           0 :                                         return -1;
   48314             :                                 }
   48315           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   48316           0 :                         } else if (PyBytes_Check(value)) {
   48317           0 :                                 test_str = PyBytes_AS_STRING(value);
   48318             :                         } else {
   48319           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48320           0 :                                 return -1;
   48321             :                         }
   48322           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48323           0 :                         if (unicode != NULL) {
   48324           0 :                                 Py_DECREF(unicode);
   48325             :                         }
   48326           0 :                         if (talloc_str == NULL) {
   48327           0 :                                 PyErr_NoMemory();
   48328           0 :                                 return -1;
   48329             :                         }
   48330           0 :                         object->in.server_name = talloc_str;
   48331             :                 }
   48332             :         }
   48333           0 :         return 0;
   48334             : }
   48335             : 
   48336           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_account_name(PyObject *obj, void *closure)
   48337             : {
   48338           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48339           0 :         PyObject *py_account_name;
   48340           0 :         if (object->in.account_name == NULL) {
   48341           0 :                 Py_RETURN_NONE;
   48342             :         }
   48343           0 :         if (object->in.account_name == NULL) {
   48344           0 :                 py_account_name = Py_None;
   48345           0 :                 Py_INCREF(py_account_name);
   48346             :         } else {
   48347           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   48348             :         }
   48349           0 :         return py_account_name;
   48350             : }
   48351             : 
   48352           0 : static int py_netr_ServerPasswordSet2_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   48353             : {
   48354           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48355           0 :         if (value == NULL) {
   48356           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   48357           0 :                 return -1;
   48358             :         }
   48359           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   48360           0 :         if (object->in.account_name == NULL) {
   48361           0 :                 PyErr_NoMemory();
   48362           0 :                 return -1;
   48363             :         }
   48364             :         {
   48365           0 :                 const char *test_str;
   48366           0 :                 const char *talloc_str;
   48367           0 :                 PyObject *unicode = NULL;
   48368           0 :                 if (PyUnicode_Check(value)) {
   48369           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48370           0 :                         if (unicode == NULL) {
   48371           0 :                                 PyErr_NoMemory();
   48372           0 :                                 return -1;
   48373             :                         }
   48374           0 :                         test_str = PyBytes_AS_STRING(unicode);
   48375           0 :                 } else if (PyBytes_Check(value)) {
   48376           0 :                         test_str = PyBytes_AS_STRING(value);
   48377             :                 } else {
   48378           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48379           0 :                         return -1;
   48380             :                 }
   48381           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48382           0 :                 if (unicode != NULL) {
   48383           0 :                         Py_DECREF(unicode);
   48384             :                 }
   48385           0 :                 if (talloc_str == NULL) {
   48386           0 :                         PyErr_NoMemory();
   48387           0 :                         return -1;
   48388             :                 }
   48389           0 :                 object->in.account_name = talloc_str;
   48390             :         }
   48391           0 :         return 0;
   48392             : }
   48393             : 
   48394           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_secure_channel_type(PyObject *obj, void *closure)
   48395             : {
   48396           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48397           0 :         PyObject *py_secure_channel_type;
   48398           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   48399           0 :         return py_secure_channel_type;
   48400             : }
   48401             : 
   48402           0 : static int py_netr_ServerPasswordSet2_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   48403             : {
   48404           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48405           0 :         if (value == NULL) {
   48406           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   48407           0 :                 return -1;
   48408             :         }
   48409             :         {
   48410           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   48411           0 :                 if (PyLong_Check(value)) {
   48412           0 :                         unsigned long long test_var;
   48413           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   48414           0 :                         if (PyErr_Occurred() != NULL) {
   48415           0 :                                 return -1;
   48416             :                         }
   48417           0 :                         if (test_var > uint_max) {
   48418           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48419             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48420           0 :                                 return -1;
   48421             :                         }
   48422           0 :                         object->in.secure_channel_type = test_var;
   48423             :                 } else {
   48424           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48425             :                           PyLong_Type.tp_name);
   48426           0 :                         return -1;
   48427             :                 }
   48428             :         }
   48429           0 :         return 0;
   48430             : }
   48431             : 
   48432           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_computer_name(PyObject *obj, void *closure)
   48433             : {
   48434           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48435           0 :         PyObject *py_computer_name;
   48436           0 :         if (object->in.computer_name == NULL) {
   48437           0 :                 Py_RETURN_NONE;
   48438             :         }
   48439           0 :         if (object->in.computer_name == NULL) {
   48440           0 :                 py_computer_name = Py_None;
   48441           0 :                 Py_INCREF(py_computer_name);
   48442             :         } else {
   48443           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   48444             :         }
   48445           0 :         return py_computer_name;
   48446             : }
   48447             : 
   48448           0 : static int py_netr_ServerPasswordSet2_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   48449             : {
   48450           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48451           0 :         if (value == NULL) {
   48452           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   48453           0 :                 return -1;
   48454             :         }
   48455           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   48456           0 :         if (object->in.computer_name == NULL) {
   48457           0 :                 PyErr_NoMemory();
   48458           0 :                 return -1;
   48459             :         }
   48460             :         {
   48461           0 :                 const char *test_str;
   48462           0 :                 const char *talloc_str;
   48463           0 :                 PyObject *unicode = NULL;
   48464           0 :                 if (PyUnicode_Check(value)) {
   48465           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48466           0 :                         if (unicode == NULL) {
   48467           0 :                                 PyErr_NoMemory();
   48468           0 :                                 return -1;
   48469             :                         }
   48470           0 :                         test_str = PyBytes_AS_STRING(unicode);
   48471           0 :                 } else if (PyBytes_Check(value)) {
   48472           0 :                         test_str = PyBytes_AS_STRING(value);
   48473             :                 } else {
   48474           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48475           0 :                         return -1;
   48476             :                 }
   48477           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48478           0 :                 if (unicode != NULL) {
   48479           0 :                         Py_DECREF(unicode);
   48480             :                 }
   48481           0 :                 if (talloc_str == NULL) {
   48482           0 :                         PyErr_NoMemory();
   48483           0 :                         return -1;
   48484             :                 }
   48485           0 :                 object->in.computer_name = talloc_str;
   48486             :         }
   48487           0 :         return 0;
   48488             : }
   48489             : 
   48490           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_credential(PyObject *obj, void *closure)
   48491             : {
   48492           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48493           0 :         PyObject *py_credential;
   48494           0 :         if (object->in.credential == NULL) {
   48495           0 :                 Py_RETURN_NONE;
   48496             :         }
   48497           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   48498           0 :         return py_credential;
   48499             : }
   48500             : 
   48501           0 : static int py_netr_ServerPasswordSet2_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   48502             : {
   48503           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48504           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   48505           0 :         if (value == NULL) {
   48506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   48507           0 :                 return -1;
   48508             :         }
   48509           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   48510           0 :         if (object->in.credential == NULL) {
   48511           0 :                 PyErr_NoMemory();
   48512           0 :                 return -1;
   48513             :         }
   48514           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   48515           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48516           0 :                 PyErr_NoMemory();
   48517           0 :                 return -1;
   48518             :         }
   48519           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   48520           0 :         return 0;
   48521             : }
   48522             : 
   48523           0 : static PyObject *py_netr_ServerPasswordSet2_out_get_return_authenticator(PyObject *obj, void *closure)
   48524             : {
   48525           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48526           0 :         PyObject *py_return_authenticator;
   48527           0 :         if (object->out.return_authenticator == NULL) {
   48528           0 :                 Py_RETURN_NONE;
   48529             :         }
   48530           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   48531           0 :         return py_return_authenticator;
   48532             : }
   48533             : 
   48534           0 : static int py_netr_ServerPasswordSet2_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   48535             : {
   48536           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48537           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   48538           0 :         if (value == NULL) {
   48539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   48540           0 :                 return -1;
   48541             :         }
   48542           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   48543           0 :         if (object->out.return_authenticator == NULL) {
   48544           0 :                 PyErr_NoMemory();
   48545           0 :                 return -1;
   48546             :         }
   48547           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   48548           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48549           0 :                 PyErr_NoMemory();
   48550           0 :                 return -1;
   48551             :         }
   48552           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   48553           0 :         return 0;
   48554             : }
   48555             : 
   48556           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_new_password(PyObject *obj, void *closure)
   48557             : {
   48558           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48559           0 :         PyObject *py_new_password;
   48560           0 :         if (object->in.new_password == NULL) {
   48561           0 :                 Py_RETURN_NONE;
   48562             :         }
   48563           0 :         py_new_password = pytalloc_reference_ex(&netr_CryptPassword_Type, object->in.new_password, object->in.new_password);
   48564           0 :         return py_new_password;
   48565             : }
   48566             : 
   48567           0 : static int py_netr_ServerPasswordSet2_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
   48568             : {
   48569           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48570           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.new_password));
   48571           0 :         if (value == NULL) {
   48572           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_password");
   48573           0 :                 return -1;
   48574             :         }
   48575           0 :         object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
   48576           0 :         if (object->in.new_password == NULL) {
   48577           0 :                 PyErr_NoMemory();
   48578           0 :                 return -1;
   48579             :         }
   48580           0 :         PY_CHECK_TYPE(&netr_CryptPassword_Type, value, return -1;);
   48581           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48582           0 :                 PyErr_NoMemory();
   48583           0 :                 return -1;
   48584             :         }
   48585           0 :         object->in.new_password = (struct netr_CryptPassword *)pytalloc_get_ptr(value);
   48586           0 :         return 0;
   48587             : }
   48588             : 
   48589           0 : static PyObject *py_netr_ServerPasswordSet2_get_result(PyObject *obj, void *closure)
   48590             : {
   48591           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48592           0 :         PyObject *py_result;
   48593           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   48594           0 :         return py_result;
   48595             : }
   48596             : 
   48597           0 : static int py_netr_ServerPasswordSet2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   48598             : {
   48599           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48600           0 :         if (value == NULL) {
   48601           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   48602           0 :                 return -1;
   48603             :         }
   48604           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   48605           0 :         return 0;
   48606             : }
   48607             : 
   48608             : static PyGetSetDef py_netr_ServerPasswordSet2_getsetters[] = {
   48609             :         {
   48610             :                 .name = discard_const_p(char, "in_server_name"),
   48611             :                 .get = py_netr_ServerPasswordSet2_in_get_server_name,
   48612             :                 .set = py_netr_ServerPasswordSet2_in_set_server_name,
   48613             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48614             :         },
   48615             :         {
   48616             :                 .name = discard_const_p(char, "in_account_name"),
   48617             :                 .get = py_netr_ServerPasswordSet2_in_get_account_name,
   48618             :                 .set = py_netr_ServerPasswordSet2_in_set_account_name,
   48619             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48620             :         },
   48621             :         {
   48622             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   48623             :                 .get = py_netr_ServerPasswordSet2_in_get_secure_channel_type,
   48624             :                 .set = py_netr_ServerPasswordSet2_in_set_secure_channel_type,
   48625             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   48626             :         },
   48627             :         {
   48628             :                 .name = discard_const_p(char, "in_computer_name"),
   48629             :                 .get = py_netr_ServerPasswordSet2_in_get_computer_name,
   48630             :                 .set = py_netr_ServerPasswordSet2_in_set_computer_name,
   48631             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48632             :         },
   48633             :         {
   48634             :                 .name = discard_const_p(char, "in_credential"),
   48635             :                 .get = py_netr_ServerPasswordSet2_in_get_credential,
   48636             :                 .set = py_netr_ServerPasswordSet2_in_set_credential,
   48637             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   48638             :         },
   48639             :         {
   48640             :                 .name = discard_const_p(char, "out_return_authenticator"),
   48641             :                 .get = py_netr_ServerPasswordSet2_out_get_return_authenticator,
   48642             :                 .set = py_netr_ServerPasswordSet2_out_set_return_authenticator,
   48643             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   48644             :         },
   48645             :         {
   48646             :                 .name = discard_const_p(char, "in_new_password"),
   48647             :                 .get = py_netr_ServerPasswordSet2_in_get_new_password,
   48648             :                 .set = py_netr_ServerPasswordSet2_in_set_new_password,
   48649             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CryptPassword")
   48650             :         },
   48651             :         {
   48652             :                 .name = discard_const_p(char, "result"),
   48653             :                 .get = py_netr_ServerPasswordSet2_get_result,
   48654             :                 .set = py_netr_ServerPasswordSet2_set_result,
   48655             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   48656             :         },
   48657             :         { .name = NULL }
   48658             : };
   48659             : 
   48660           0 : static PyObject *py_netr_ServerPasswordSet2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   48661             : {
   48662           0 :         PyObject *self = pytalloc_new(struct netr_ServerPasswordSet2, type);
   48663           0 :         struct netr_ServerPasswordSet2 *_self = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(self);
   48664           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   48665           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   48666           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   48667           0 :         _self->in.new_password = talloc_zero(mem_ctx, struct netr_CryptPassword);
   48668           0 :         return self;
   48669             : }
   48670             : 
   48671           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   48672             : {
   48673             : 
   48674             : 
   48675           0 :         return PyLong_FromLong(30);
   48676             : }
   48677             : 
   48678           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   48679             : {
   48680           0 :         const struct ndr_interface_call *call = NULL;
   48681           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48682           0 :         PyObject *ret = NULL;
   48683           0 :         struct ndr_push *push = NULL;
   48684           0 :         DATA_BLOB blob;
   48685           0 :         enum ndr_err_code err;
   48686             : 
   48687           0 :         if (ndr_table_netlogon.num_calls < 31) {
   48688           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_pack");
   48689           0 :                 return NULL;
   48690             :         }
   48691           0 :         call = &ndr_table_netlogon.calls[30];
   48692             : 
   48693           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   48694           0 :         if (push == NULL) {
   48695           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48696           0 :                 return NULL;
   48697             :         }
   48698             : 
   48699           0 :         push->flags |= ndr_push_flags;
   48700             : 
   48701           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   48702           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48703           0 :                 TALLOC_FREE(push);
   48704           0 :                 PyErr_SetNdrError(err);
   48705           0 :                 return NULL;
   48706             :         }
   48707           0 :         blob = ndr_push_blob(push);
   48708           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   48709           0 :         TALLOC_FREE(push);
   48710           0 :         return ret;
   48711             : }
   48712             : 
   48713           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48714             : {
   48715           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48716           0 :         PyObject *bigendian_obj = NULL;
   48717           0 :         PyObject *ndr64_obj = NULL;
   48718           0 :         libndr_flags ndr_push_flags = 0;
   48719             : 
   48720           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   48721             :                 discard_const_p(char *, kwnames),
   48722             :                 &bigendian_obj,
   48723             :                 &ndr64_obj)) {
   48724           0 :                 return NULL;
   48725             :         }
   48726             : 
   48727           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48728           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48729             :         }
   48730           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48731           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48732             :         }
   48733             : 
   48734           0 :         return py_netr_ServerPasswordSet2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   48735             : }
   48736             : 
   48737           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48738             : {
   48739           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48740           0 :         PyObject *bigendian_obj = NULL;
   48741           0 :         PyObject *ndr64_obj = NULL;
   48742           0 :         libndr_flags ndr_push_flags = 0;
   48743             : 
   48744           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   48745             :                 discard_const_p(char *, kwnames),
   48746             :                 &bigendian_obj,
   48747             :                 &ndr64_obj)) {
   48748           0 :                 return NULL;
   48749             :         }
   48750             : 
   48751           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48752           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48753             :         }
   48754           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48755           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48756             :         }
   48757             : 
   48758           0 :         return py_netr_ServerPasswordSet2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   48759             : }
   48760             : 
   48761           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   48762             : {
   48763           0 :         const struct ndr_interface_call *call = NULL;
   48764           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48765           0 :         struct ndr_pull *pull = NULL;
   48766           0 :         enum ndr_err_code err;
   48767             : 
   48768           0 :         if (ndr_table_netlogon.num_calls < 31) {
   48769           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_unpack");
   48770           0 :                 return NULL;
   48771             :         }
   48772           0 :         call = &ndr_table_netlogon.calls[30];
   48773             : 
   48774           0 :         pull = ndr_pull_init_blob(blob, object);
   48775           0 :         if (pull == NULL) {
   48776           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48777           0 :                 return NULL;
   48778             :         }
   48779             : 
   48780           0 :         pull->flags |= ndr_pull_flags;
   48781             : 
   48782           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   48783           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48784           0 :                 TALLOC_FREE(pull);
   48785           0 :                 PyErr_SetNdrError(err);
   48786           0 :                 return NULL;
   48787             :         }
   48788           0 :         if (!allow_remaining) {
   48789           0 :                 uint32_t highest_ofs;
   48790             : 
   48791           0 :                 if (pull->offset > pull->relative_highest_offset) {
   48792           0 :                         highest_ofs = pull->offset;
   48793             :                 } else {
   48794           0 :                         highest_ofs = pull->relative_highest_offset;
   48795             :                 }
   48796           0 :                 if (highest_ofs < pull->data_size) {
   48797           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   48798             :                                 "not all bytes consumed ofs[%u] size[%u]",
   48799             :                                 highest_ofs, pull->data_size);
   48800           0 :                         TALLOC_FREE(pull);
   48801           0 :                         PyErr_SetNdrError(err);
   48802           0 :                         return NULL;
   48803             :                 }
   48804             :         }
   48805             : 
   48806           0 :         TALLOC_FREE(pull);
   48807           0 :         Py_RETURN_NONE;
   48808             : }
   48809             : 
   48810           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48811             : {
   48812           0 :         DATA_BLOB blob;
   48813           0 :         Py_ssize_t blob_length = 0;
   48814           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48815           0 :         PyObject *bigendian_obj = NULL;
   48816           0 :         PyObject *ndr64_obj = NULL;
   48817           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48818           0 :         PyObject *allow_remaining_obj = NULL;
   48819           0 :         bool allow_remaining = false;
   48820             : 
   48821           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   48822             :                 discard_const_p(char *, kwnames),
   48823             :                 &blob.data, &blob_length,
   48824             :                 &bigendian_obj,
   48825             :                 &ndr64_obj,
   48826             :                 &allow_remaining_obj)) {
   48827           0 :                 return NULL;
   48828             :         }
   48829           0 :         blob.length = blob_length;
   48830             : 
   48831           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48832           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48833             :         }
   48834           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48835           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48836             :         }
   48837             : 
   48838           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48839           0 :                 allow_remaining = true;
   48840             :         }
   48841             : 
   48842           0 :         return py_netr_ServerPasswordSet2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   48843             : }
   48844             : 
   48845           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48846             : {
   48847           0 :         DATA_BLOB blob;
   48848           0 :         Py_ssize_t blob_length = 0;
   48849           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48850           0 :         PyObject *bigendian_obj = NULL;
   48851           0 :         PyObject *ndr64_obj = NULL;
   48852           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48853           0 :         PyObject *allow_remaining_obj = NULL;
   48854           0 :         bool allow_remaining = false;
   48855             : 
   48856           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   48857             :                 discard_const_p(char *, kwnames),
   48858             :                 &blob.data, &blob_length,
   48859             :                 &bigendian_obj,
   48860             :                 &ndr64_obj,
   48861             :                 &allow_remaining_obj)) {
   48862           0 :                 return NULL;
   48863             :         }
   48864           0 :         blob.length = blob_length;
   48865             : 
   48866           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48867           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48868             :         }
   48869           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48870           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48871             :         }
   48872             : 
   48873           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48874           0 :                 allow_remaining = true;
   48875             :         }
   48876             : 
   48877           0 :         return py_netr_ServerPasswordSet2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   48878             : }
   48879             : 
   48880           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   48881             : {
   48882           0 :         const struct ndr_interface_call *call = NULL;
   48883           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48884           0 :         PyObject *ret;
   48885           0 :         char *retstr;
   48886             : 
   48887           0 :         if (ndr_table_netlogon.num_calls < 31) {
   48888           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_print");
   48889           0 :                 return NULL;
   48890             :         }
   48891           0 :         call = &ndr_table_netlogon.calls[30];
   48892             : 
   48893           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   48894           0 :         ret = PyUnicode_FromString(retstr);
   48895           0 :         TALLOC_FREE(retstr);
   48896             : 
   48897           0 :         return ret;
   48898             : }
   48899             : 
   48900           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48901             : {
   48902           0 :         return py_netr_ServerPasswordSet2_ndr_print(py_obj, "netr_ServerPasswordSet2_in", NDR_IN);
   48903             : }
   48904             : 
   48905           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48906             : {
   48907           0 :         return py_netr_ServerPasswordSet2_ndr_print(py_obj, "netr_ServerPasswordSet2_out", NDR_OUT);
   48908             : }
   48909             : 
   48910             : static PyMethodDef py_netr_ServerPasswordSet2_methods[] = {
   48911             :         { "opnum", (PyCFunction)py_netr_ServerPasswordSet2_ndr_opnum, METH_NOARGS|METH_CLASS,
   48912             :                 "netlogon.netr_ServerPasswordSet2.opnum() -> 30 (0x1e) " },
   48913             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   48914             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   48915             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   48916             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   48917             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   48918             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   48919             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   48920             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   48921             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerPasswordSet2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   48922             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerPasswordSet2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   48923             :         { NULL, NULL, 0, NULL }
   48924             : };
   48925             : 
   48926             : 
   48927             : static PyTypeObject netr_ServerPasswordSet2_Type = {
   48928             :         PyVarObject_HEAD_INIT(NULL, 0)
   48929             :         .tp_name = "netlogon.netr_ServerPasswordSet2",
   48930             :         .tp_getset = py_netr_ServerPasswordSet2_getsetters,
   48931             :         .tp_methods = py_netr_ServerPasswordSet2_methods,
   48932             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   48933             :         .tp_new = py_netr_ServerPasswordSet2_new,
   48934             : };
   48935             : 
   48936           4 : static bool pack_py_netr_ServerPasswordSet2_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordSet2 *r)
   48937             : {
   48938           0 :         PyObject *py_server_name;
   48939           0 :         PyObject *py_account_name;
   48940           0 :         PyObject *py_secure_channel_type;
   48941           0 :         PyObject *py_computer_name;
   48942           0 :         PyObject *py_credential;
   48943           0 :         PyObject *py_new_password;
   48944           4 :         const char *kwnames[] = {
   48945             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", "new_password", NULL
   48946             :         };
   48947             : 
   48948           4 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_ServerPasswordSet2", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential, &py_new_password)) {
   48949           0 :                 return false;
   48950             :         }
   48951             : 
   48952           4 :         if (py_server_name == NULL) {
   48953           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   48954           0 :                 return false;
   48955             :         }
   48956           4 :         if (py_server_name == Py_None) {
   48957           0 :                 r->in.server_name = NULL;
   48958             :         } else {
   48959           4 :                 r->in.server_name = NULL;
   48960             :                 {
   48961           0 :                         const char *test_str;
   48962           0 :                         const char *talloc_str;
   48963           4 :                         PyObject *unicode = NULL;
   48964           4 :                         if (PyUnicode_Check(py_server_name)) {
   48965           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   48966           4 :                                 if (unicode == NULL) {
   48967           0 :                                         PyErr_NoMemory();
   48968           0 :                                         return false;
   48969             :                                 }
   48970           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   48971           0 :                         } else if (PyBytes_Check(py_server_name)) {
   48972           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   48973             :                         } else {
   48974           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   48975           0 :                                 return false;
   48976             :                         }
   48977           4 :                         talloc_str = talloc_strdup(r, test_str);
   48978           4 :                         if (unicode != NULL) {
   48979           4 :                                 Py_DECREF(unicode);
   48980             :                         }
   48981           4 :                         if (talloc_str == NULL) {
   48982           0 :                                 PyErr_NoMemory();
   48983           0 :                                 return false;
   48984             :                         }
   48985           4 :                         r->in.server_name = talloc_str;
   48986             :                 }
   48987             :         }
   48988           4 :         if (py_account_name == NULL) {
   48989           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   48990           0 :                 return false;
   48991             :         }
   48992           4 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   48993           4 :         if (r->in.account_name == NULL) {
   48994           0 :                 PyErr_NoMemory();
   48995           0 :                 return false;
   48996             :         }
   48997             :         {
   48998           0 :                 const char *test_str;
   48999           0 :                 const char *talloc_str;
   49000           4 :                 PyObject *unicode = NULL;
   49001           4 :                 if (PyUnicode_Check(py_account_name)) {
   49002           4 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   49003           4 :                         if (unicode == NULL) {
   49004           0 :                                 PyErr_NoMemory();
   49005           0 :                                 return false;
   49006             :                         }
   49007           4 :                         test_str = PyBytes_AS_STRING(unicode);
   49008           0 :                 } else if (PyBytes_Check(py_account_name)) {
   49009           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   49010             :                 } else {
   49011           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   49012           0 :                         return false;
   49013             :                 }
   49014           4 :                 talloc_str = talloc_strdup(r, test_str);
   49015           4 :                 if (unicode != NULL) {
   49016           4 :                         Py_DECREF(unicode);
   49017             :                 }
   49018           4 :                 if (talloc_str == NULL) {
   49019           0 :                         PyErr_NoMemory();
   49020           0 :                         return false;
   49021             :                 }
   49022           4 :                 r->in.account_name = talloc_str;
   49023             :         }
   49024           4 :         if (py_secure_channel_type == NULL) {
   49025           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   49026           0 :                 return false;
   49027             :         }
   49028             :         {
   49029           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   49030           4 :                 if (PyLong_Check(py_secure_channel_type)) {
   49031           0 :                         unsigned long long test_var;
   49032           4 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   49033           4 :                         if (PyErr_Occurred() != NULL) {
   49034           0 :                                 return false;
   49035             :                         }
   49036           4 :                         if (test_var > uint_max) {
   49037           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49038             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49039           0 :                                 return false;
   49040             :                         }
   49041           4 :                         r->in.secure_channel_type = test_var;
   49042             :                 } else {
   49043           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49044             :                           PyLong_Type.tp_name);
   49045           0 :                         return false;
   49046             :                 }
   49047             :         }
   49048           4 :         if (py_computer_name == NULL) {
   49049           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   49050           0 :                 return false;
   49051             :         }
   49052           4 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   49053           4 :         if (r->in.computer_name == NULL) {
   49054           0 :                 PyErr_NoMemory();
   49055           0 :                 return false;
   49056             :         }
   49057             :         {
   49058           0 :                 const char *test_str;
   49059           0 :                 const char *talloc_str;
   49060           4 :                 PyObject *unicode = NULL;
   49061           4 :                 if (PyUnicode_Check(py_computer_name)) {
   49062           4 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   49063           4 :                         if (unicode == NULL) {
   49064           0 :                                 PyErr_NoMemory();
   49065           0 :                                 return false;
   49066             :                         }
   49067           4 :                         test_str = PyBytes_AS_STRING(unicode);
   49068           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   49069           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   49070             :                 } else {
   49071           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   49072           0 :                         return false;
   49073             :                 }
   49074           4 :                 talloc_str = talloc_strdup(r, test_str);
   49075           4 :                 if (unicode != NULL) {
   49076           4 :                         Py_DECREF(unicode);
   49077             :                 }
   49078           4 :                 if (talloc_str == NULL) {
   49079           0 :                         PyErr_NoMemory();
   49080           0 :                         return false;
   49081             :                 }
   49082           4 :                 r->in.computer_name = talloc_str;
   49083             :         }
   49084           4 :         if (py_credential == NULL) {
   49085           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   49086           0 :                 return false;
   49087             :         }
   49088           4 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   49089           4 :         if (r->in.credential == NULL) {
   49090           0 :                 PyErr_NoMemory();
   49091           0 :                 return false;
   49092             :         }
   49093           4 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   49094           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   49095           0 :                 PyErr_NoMemory();
   49096           0 :                 return false;
   49097             :         }
   49098           4 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   49099           4 :         if (py_new_password == NULL) {
   49100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_password");
   49101           0 :                 return false;
   49102             :         }
   49103           4 :         r->in.new_password = talloc_ptrtype(r, r->in.new_password);
   49104           4 :         if (r->in.new_password == NULL) {
   49105           0 :                 PyErr_NoMemory();
   49106           0 :                 return false;
   49107             :         }
   49108           4 :         PY_CHECK_TYPE(&netr_CryptPassword_Type, py_new_password, return false;);
   49109           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_new_password)) == NULL) {
   49110           0 :                 PyErr_NoMemory();
   49111           0 :                 return false;
   49112             :         }
   49113           4 :         r->in.new_password = (struct netr_CryptPassword *)pytalloc_get_ptr(py_new_password);
   49114           4 :         return true;
   49115             : }
   49116             : 
   49117           4 : static PyObject *unpack_py_netr_ServerPasswordSet2_args_out(struct netr_ServerPasswordSet2 *r)
   49118             : {
   49119           0 :         PyObject *result;
   49120           0 :         PyObject *py_return_authenticator;
   49121           4 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   49122           4 :         result = py_return_authenticator;
   49123           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   49124           0 :                 PyErr_SetNTSTATUS(r->out.result);
   49125           0 :                 return NULL;
   49126             :         }
   49127             : 
   49128           4 :         return result;
   49129             : }
   49130             : 
   49131             : 
   49132           0 : static PyObject *py_netr_ServerPasswordGet_in_get_server_name(PyObject *obj, void *closure)
   49133             : {
   49134           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49135           0 :         PyObject *py_server_name;
   49136           0 :         if (object->in.server_name == NULL) {
   49137           0 :                 Py_RETURN_NONE;
   49138             :         }
   49139           0 :         if (object->in.server_name == NULL) {
   49140           0 :                 py_server_name = Py_None;
   49141           0 :                 Py_INCREF(py_server_name);
   49142             :         } else {
   49143           0 :                 if (object->in.server_name == NULL) {
   49144           0 :                         py_server_name = Py_None;
   49145           0 :                         Py_INCREF(py_server_name);
   49146             :                 } else {
   49147           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   49148             :                 }
   49149             :         }
   49150           0 :         return py_server_name;
   49151             : }
   49152             : 
   49153           0 : static int py_netr_ServerPasswordGet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   49154             : {
   49155           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49156           0 :         if (value == NULL) {
   49157           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   49158           0 :                 return -1;
   49159             :         }
   49160           0 :         if (value == Py_None) {
   49161           0 :                 object->in.server_name = NULL;
   49162             :         } else {
   49163           0 :                 object->in.server_name = NULL;
   49164             :                 {
   49165           0 :                         const char *test_str;
   49166           0 :                         const char *talloc_str;
   49167           0 :                         PyObject *unicode = NULL;
   49168           0 :                         if (PyUnicode_Check(value)) {
   49169           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49170           0 :                                 if (unicode == NULL) {
   49171           0 :                                         PyErr_NoMemory();
   49172           0 :                                         return -1;
   49173             :                                 }
   49174           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49175           0 :                         } else if (PyBytes_Check(value)) {
   49176           0 :                                 test_str = PyBytes_AS_STRING(value);
   49177             :                         } else {
   49178           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49179           0 :                                 return -1;
   49180             :                         }
   49181           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49182           0 :                         if (unicode != NULL) {
   49183           0 :                                 Py_DECREF(unicode);
   49184             :                         }
   49185           0 :                         if (talloc_str == NULL) {
   49186           0 :                                 PyErr_NoMemory();
   49187           0 :                                 return -1;
   49188             :                         }
   49189           0 :                         object->in.server_name = talloc_str;
   49190             :                 }
   49191             :         }
   49192           0 :         return 0;
   49193             : }
   49194             : 
   49195           0 : static PyObject *py_netr_ServerPasswordGet_in_get_account_name(PyObject *obj, void *closure)
   49196             : {
   49197           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49198           0 :         PyObject *py_account_name;
   49199           0 :         if (object->in.account_name == NULL) {
   49200           0 :                 Py_RETURN_NONE;
   49201             :         }
   49202           0 :         if (object->in.account_name == NULL) {
   49203           0 :                 py_account_name = Py_None;
   49204           0 :                 Py_INCREF(py_account_name);
   49205             :         } else {
   49206           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   49207             :         }
   49208           0 :         return py_account_name;
   49209             : }
   49210             : 
   49211           0 : static int py_netr_ServerPasswordGet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   49212             : {
   49213           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49214           0 :         if (value == NULL) {
   49215           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   49216           0 :                 return -1;
   49217             :         }
   49218           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   49219           0 :         if (object->in.account_name == NULL) {
   49220           0 :                 PyErr_NoMemory();
   49221           0 :                 return -1;
   49222             :         }
   49223             :         {
   49224           0 :                 const char *test_str;
   49225           0 :                 const char *talloc_str;
   49226           0 :                 PyObject *unicode = NULL;
   49227           0 :                 if (PyUnicode_Check(value)) {
   49228           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49229           0 :                         if (unicode == NULL) {
   49230           0 :                                 PyErr_NoMemory();
   49231           0 :                                 return -1;
   49232             :                         }
   49233           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49234           0 :                 } else if (PyBytes_Check(value)) {
   49235           0 :                         test_str = PyBytes_AS_STRING(value);
   49236             :                 } else {
   49237           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49238           0 :                         return -1;
   49239             :                 }
   49240           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49241           0 :                 if (unicode != NULL) {
   49242           0 :                         Py_DECREF(unicode);
   49243             :                 }
   49244           0 :                 if (talloc_str == NULL) {
   49245           0 :                         PyErr_NoMemory();
   49246           0 :                         return -1;
   49247             :                 }
   49248           0 :                 object->in.account_name = talloc_str;
   49249             :         }
   49250           0 :         return 0;
   49251             : }
   49252             : 
   49253           0 : static PyObject *py_netr_ServerPasswordGet_in_get_secure_channel_type(PyObject *obj, void *closure)
   49254             : {
   49255           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49256           0 :         PyObject *py_secure_channel_type;
   49257           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   49258           0 :         return py_secure_channel_type;
   49259             : }
   49260             : 
   49261           0 : static int py_netr_ServerPasswordGet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   49262             : {
   49263           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49264           0 :         if (value == NULL) {
   49265           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   49266           0 :                 return -1;
   49267             :         }
   49268             :         {
   49269           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   49270           0 :                 if (PyLong_Check(value)) {
   49271           0 :                         unsigned long long test_var;
   49272           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   49273           0 :                         if (PyErr_Occurred() != NULL) {
   49274           0 :                                 return -1;
   49275             :                         }
   49276           0 :                         if (test_var > uint_max) {
   49277           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49278             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49279           0 :                                 return -1;
   49280             :                         }
   49281           0 :                         object->in.secure_channel_type = test_var;
   49282             :                 } else {
   49283           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49284             :                           PyLong_Type.tp_name);
   49285           0 :                         return -1;
   49286             :                 }
   49287             :         }
   49288           0 :         return 0;
   49289             : }
   49290             : 
   49291           0 : static PyObject *py_netr_ServerPasswordGet_in_get_computer_name(PyObject *obj, void *closure)
   49292             : {
   49293           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49294           0 :         PyObject *py_computer_name;
   49295           0 :         if (object->in.computer_name == NULL) {
   49296           0 :                 Py_RETURN_NONE;
   49297             :         }
   49298           0 :         if (object->in.computer_name == NULL) {
   49299           0 :                 py_computer_name = Py_None;
   49300           0 :                 Py_INCREF(py_computer_name);
   49301             :         } else {
   49302           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   49303             :         }
   49304           0 :         return py_computer_name;
   49305             : }
   49306             : 
   49307           0 : static int py_netr_ServerPasswordGet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   49308             : {
   49309           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49310           0 :         if (value == NULL) {
   49311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   49312           0 :                 return -1;
   49313             :         }
   49314           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   49315           0 :         if (object->in.computer_name == NULL) {
   49316           0 :                 PyErr_NoMemory();
   49317           0 :                 return -1;
   49318             :         }
   49319             :         {
   49320           0 :                 const char *test_str;
   49321           0 :                 const char *talloc_str;
   49322           0 :                 PyObject *unicode = NULL;
   49323           0 :                 if (PyUnicode_Check(value)) {
   49324           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49325           0 :                         if (unicode == NULL) {
   49326           0 :                                 PyErr_NoMemory();
   49327           0 :                                 return -1;
   49328             :                         }
   49329           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49330           0 :                 } else if (PyBytes_Check(value)) {
   49331           0 :                         test_str = PyBytes_AS_STRING(value);
   49332             :                 } else {
   49333           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49334           0 :                         return -1;
   49335             :                 }
   49336           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49337           0 :                 if (unicode != NULL) {
   49338           0 :                         Py_DECREF(unicode);
   49339             :                 }
   49340           0 :                 if (talloc_str == NULL) {
   49341           0 :                         PyErr_NoMemory();
   49342           0 :                         return -1;
   49343             :                 }
   49344           0 :                 object->in.computer_name = talloc_str;
   49345             :         }
   49346           0 :         return 0;
   49347             : }
   49348             : 
   49349           0 : static PyObject *py_netr_ServerPasswordGet_in_get_credential(PyObject *obj, void *closure)
   49350             : {
   49351           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49352           0 :         PyObject *py_credential;
   49353           0 :         if (object->in.credential == NULL) {
   49354           0 :                 Py_RETURN_NONE;
   49355             :         }
   49356           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   49357           0 :         return py_credential;
   49358             : }
   49359             : 
   49360           0 : static int py_netr_ServerPasswordGet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   49361             : {
   49362           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49363           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   49364           0 :         if (value == NULL) {
   49365           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   49366           0 :                 return -1;
   49367             :         }
   49368           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   49369           0 :         if (object->in.credential == NULL) {
   49370           0 :                 PyErr_NoMemory();
   49371           0 :                 return -1;
   49372             :         }
   49373           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49374           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49375           0 :                 PyErr_NoMemory();
   49376           0 :                 return -1;
   49377             :         }
   49378           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   49379           0 :         return 0;
   49380             : }
   49381             : 
   49382           0 : static PyObject *py_netr_ServerPasswordGet_out_get_return_authenticator(PyObject *obj, void *closure)
   49383             : {
   49384           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49385           0 :         PyObject *py_return_authenticator;
   49386           0 :         if (object->out.return_authenticator == NULL) {
   49387           0 :                 Py_RETURN_NONE;
   49388             :         }
   49389           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   49390           0 :         return py_return_authenticator;
   49391             : }
   49392             : 
   49393           0 : static int py_netr_ServerPasswordGet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   49394             : {
   49395           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49396           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   49397           0 :         if (value == NULL) {
   49398           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   49399           0 :                 return -1;
   49400             :         }
   49401           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   49402           0 :         if (object->out.return_authenticator == NULL) {
   49403           0 :                 PyErr_NoMemory();
   49404           0 :                 return -1;
   49405             :         }
   49406           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49407           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49408           0 :                 PyErr_NoMemory();
   49409           0 :                 return -1;
   49410             :         }
   49411           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   49412           0 :         return 0;
   49413             : }
   49414             : 
   49415           0 : static PyObject *py_netr_ServerPasswordGet_out_get_password(PyObject *obj, void *closure)
   49416             : {
   49417           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49418           0 :         PyObject *py_password;
   49419           0 :         if (object->out.password == NULL) {
   49420           0 :                 Py_RETURN_NONE;
   49421             :         }
   49422           0 :         py_password = pytalloc_reference_ex(samr_Password_Type, object->out.password, object->out.password);
   49423           0 :         return py_password;
   49424             : }
   49425             : 
   49426           0 : static int py_netr_ServerPasswordGet_out_set_password(PyObject *py_obj, PyObject *value, void *closure)
   49427             : {
   49428           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49429           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.password));
   49430           0 :         if (value == NULL) {
   49431           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.password");
   49432           0 :                 return -1;
   49433             :         }
   49434           0 :         object->out.password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.password);
   49435           0 :         if (object->out.password == NULL) {
   49436           0 :                 PyErr_NoMemory();
   49437           0 :                 return -1;
   49438             :         }
   49439           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   49440           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49441           0 :                 PyErr_NoMemory();
   49442           0 :                 return -1;
   49443             :         }
   49444           0 :         object->out.password = (struct samr_Password *)pytalloc_get_ptr(value);
   49445           0 :         return 0;
   49446             : }
   49447             : 
   49448           0 : static PyObject *py_netr_ServerPasswordGet_get_result(PyObject *obj, void *closure)
   49449             : {
   49450           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49451           0 :         PyObject *py_result;
   49452           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   49453           0 :         return py_result;
   49454             : }
   49455             : 
   49456           0 : static int py_netr_ServerPasswordGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   49457             : {
   49458           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49459           0 :         if (value == NULL) {
   49460           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   49461           0 :                 return -1;
   49462             :         }
   49463           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   49464           0 :         return 0;
   49465             : }
   49466             : 
   49467             : static PyGetSetDef py_netr_ServerPasswordGet_getsetters[] = {
   49468             :         {
   49469             :                 .name = discard_const_p(char, "in_server_name"),
   49470             :                 .get = py_netr_ServerPasswordGet_in_get_server_name,
   49471             :                 .set = py_netr_ServerPasswordGet_in_set_server_name,
   49472             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49473             :         },
   49474             :         {
   49475             :                 .name = discard_const_p(char, "in_account_name"),
   49476             :                 .get = py_netr_ServerPasswordGet_in_get_account_name,
   49477             :                 .set = py_netr_ServerPasswordGet_in_set_account_name,
   49478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49479             :         },
   49480             :         {
   49481             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   49482             :                 .get = py_netr_ServerPasswordGet_in_get_secure_channel_type,
   49483             :                 .set = py_netr_ServerPasswordGet_in_set_secure_channel_type,
   49484             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   49485             :         },
   49486             :         {
   49487             :                 .name = discard_const_p(char, "in_computer_name"),
   49488             :                 .get = py_netr_ServerPasswordGet_in_get_computer_name,
   49489             :                 .set = py_netr_ServerPasswordGet_in_set_computer_name,
   49490             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49491             :         },
   49492             :         {
   49493             :                 .name = discard_const_p(char, "in_credential"),
   49494             :                 .get = py_netr_ServerPasswordGet_in_get_credential,
   49495             :                 .set = py_netr_ServerPasswordGet_in_set_credential,
   49496             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   49497             :         },
   49498             :         {
   49499             :                 .name = discard_const_p(char, "out_return_authenticator"),
   49500             :                 .get = py_netr_ServerPasswordGet_out_get_return_authenticator,
   49501             :                 .set = py_netr_ServerPasswordGet_out_set_return_authenticator,
   49502             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   49503             :         },
   49504             :         {
   49505             :                 .name = discard_const_p(char, "out_password"),
   49506             :                 .get = py_netr_ServerPasswordGet_out_get_password,
   49507             :                 .set = py_netr_ServerPasswordGet_out_set_password,
   49508             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   49509             :         },
   49510             :         {
   49511             :                 .name = discard_const_p(char, "result"),
   49512             :                 .get = py_netr_ServerPasswordGet_get_result,
   49513             :                 .set = py_netr_ServerPasswordGet_set_result,
   49514             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   49515             :         },
   49516             :         { .name = NULL }
   49517             : };
   49518             : 
   49519           0 : static PyObject *py_netr_ServerPasswordGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   49520             : {
   49521           0 :         PyObject *self = pytalloc_new(struct netr_ServerPasswordGet, type);
   49522           0 :         struct netr_ServerPasswordGet *_self = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(self);
   49523           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   49524           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   49525           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   49526           0 :         _self->out.password = talloc_zero(mem_ctx, struct samr_Password);
   49527           0 :         return self;
   49528             : }
   49529             : 
   49530           0 : static PyObject *py_netr_ServerPasswordGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   49531             : {
   49532             : 
   49533             : 
   49534           0 :         return PyLong_FromLong(31);
   49535             : }
   49536             : 
   49537           0 : static PyObject *py_netr_ServerPasswordGet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   49538             : {
   49539           0 :         const struct ndr_interface_call *call = NULL;
   49540           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49541           0 :         PyObject *ret = NULL;
   49542           0 :         struct ndr_push *push = NULL;
   49543           0 :         DATA_BLOB blob;
   49544           0 :         enum ndr_err_code err;
   49545             : 
   49546           0 :         if (ndr_table_netlogon.num_calls < 32) {
   49547           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_pack");
   49548           0 :                 return NULL;
   49549             :         }
   49550           0 :         call = &ndr_table_netlogon.calls[31];
   49551             : 
   49552           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   49553           0 :         if (push == NULL) {
   49554           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49555           0 :                 return NULL;
   49556             :         }
   49557             : 
   49558           0 :         push->flags |= ndr_push_flags;
   49559             : 
   49560           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   49561           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49562           0 :                 TALLOC_FREE(push);
   49563           0 :                 PyErr_SetNdrError(err);
   49564           0 :                 return NULL;
   49565             :         }
   49566           0 :         blob = ndr_push_blob(push);
   49567           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   49568           0 :         TALLOC_FREE(push);
   49569           0 :         return ret;
   49570             : }
   49571             : 
   49572           0 : static PyObject *py_netr_ServerPasswordGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49573             : {
   49574           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49575           0 :         PyObject *bigendian_obj = NULL;
   49576           0 :         PyObject *ndr64_obj = NULL;
   49577           0 :         libndr_flags ndr_push_flags = 0;
   49578             : 
   49579           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   49580             :                 discard_const_p(char *, kwnames),
   49581             :                 &bigendian_obj,
   49582             :                 &ndr64_obj)) {
   49583           0 :                 return NULL;
   49584             :         }
   49585             : 
   49586           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49587           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49588             :         }
   49589           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49590           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49591             :         }
   49592             : 
   49593           0 :         return py_netr_ServerPasswordGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   49594             : }
   49595             : 
   49596           0 : static PyObject *py_netr_ServerPasswordGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49597             : {
   49598           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49599           0 :         PyObject *bigendian_obj = NULL;
   49600           0 :         PyObject *ndr64_obj = NULL;
   49601           0 :         libndr_flags ndr_push_flags = 0;
   49602             : 
   49603           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   49604             :                 discard_const_p(char *, kwnames),
   49605             :                 &bigendian_obj,
   49606             :                 &ndr64_obj)) {
   49607           0 :                 return NULL;
   49608             :         }
   49609             : 
   49610           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49611           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49612             :         }
   49613           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49614           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49615             :         }
   49616             : 
   49617           0 :         return py_netr_ServerPasswordGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   49618             : }
   49619             : 
   49620           0 : static PyObject *py_netr_ServerPasswordGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   49621             : {
   49622           0 :         const struct ndr_interface_call *call = NULL;
   49623           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49624           0 :         struct ndr_pull *pull = NULL;
   49625           0 :         enum ndr_err_code err;
   49626             : 
   49627           0 :         if (ndr_table_netlogon.num_calls < 32) {
   49628           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_unpack");
   49629           0 :                 return NULL;
   49630             :         }
   49631           0 :         call = &ndr_table_netlogon.calls[31];
   49632             : 
   49633           0 :         pull = ndr_pull_init_blob(blob, object);
   49634           0 :         if (pull == NULL) {
   49635           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49636           0 :                 return NULL;
   49637             :         }
   49638             : 
   49639           0 :         pull->flags |= ndr_pull_flags;
   49640             : 
   49641           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   49642           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49643           0 :                 TALLOC_FREE(pull);
   49644           0 :                 PyErr_SetNdrError(err);
   49645           0 :                 return NULL;
   49646             :         }
   49647           0 :         if (!allow_remaining) {
   49648           0 :                 uint32_t highest_ofs;
   49649             : 
   49650           0 :                 if (pull->offset > pull->relative_highest_offset) {
   49651           0 :                         highest_ofs = pull->offset;
   49652             :                 } else {
   49653           0 :                         highest_ofs = pull->relative_highest_offset;
   49654             :                 }
   49655           0 :                 if (highest_ofs < pull->data_size) {
   49656           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   49657             :                                 "not all bytes consumed ofs[%u] size[%u]",
   49658             :                                 highest_ofs, pull->data_size);
   49659           0 :                         TALLOC_FREE(pull);
   49660           0 :                         PyErr_SetNdrError(err);
   49661           0 :                         return NULL;
   49662             :                 }
   49663             :         }
   49664             : 
   49665           0 :         TALLOC_FREE(pull);
   49666           0 :         Py_RETURN_NONE;
   49667             : }
   49668             : 
   49669           0 : static PyObject *py_netr_ServerPasswordGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49670             : {
   49671           0 :         DATA_BLOB blob;
   49672           0 :         Py_ssize_t blob_length = 0;
   49673           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49674           0 :         PyObject *bigendian_obj = NULL;
   49675           0 :         PyObject *ndr64_obj = NULL;
   49676           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49677           0 :         PyObject *allow_remaining_obj = NULL;
   49678           0 :         bool allow_remaining = false;
   49679             : 
   49680           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   49681             :                 discard_const_p(char *, kwnames),
   49682             :                 &blob.data, &blob_length,
   49683             :                 &bigendian_obj,
   49684             :                 &ndr64_obj,
   49685             :                 &allow_remaining_obj)) {
   49686           0 :                 return NULL;
   49687             :         }
   49688           0 :         blob.length = blob_length;
   49689             : 
   49690           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49691           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49692             :         }
   49693           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49694           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49695             :         }
   49696             : 
   49697           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49698           0 :                 allow_remaining = true;
   49699             :         }
   49700             : 
   49701           0 :         return py_netr_ServerPasswordGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   49702             : }
   49703             : 
   49704           0 : static PyObject *py_netr_ServerPasswordGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49705             : {
   49706           0 :         DATA_BLOB blob;
   49707           0 :         Py_ssize_t blob_length = 0;
   49708           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49709           0 :         PyObject *bigendian_obj = NULL;
   49710           0 :         PyObject *ndr64_obj = NULL;
   49711           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49712           0 :         PyObject *allow_remaining_obj = NULL;
   49713           0 :         bool allow_remaining = false;
   49714             : 
   49715           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   49716             :                 discard_const_p(char *, kwnames),
   49717             :                 &blob.data, &blob_length,
   49718             :                 &bigendian_obj,
   49719             :                 &ndr64_obj,
   49720             :                 &allow_remaining_obj)) {
   49721           0 :                 return NULL;
   49722             :         }
   49723           0 :         blob.length = blob_length;
   49724             : 
   49725           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49726           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49727             :         }
   49728           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49729           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49730             :         }
   49731             : 
   49732           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49733           0 :                 allow_remaining = true;
   49734             :         }
   49735             : 
   49736           0 :         return py_netr_ServerPasswordGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   49737             : }
   49738             : 
   49739           0 : static PyObject *py_netr_ServerPasswordGet_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   49740             : {
   49741           0 :         const struct ndr_interface_call *call = NULL;
   49742           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49743           0 :         PyObject *ret;
   49744           0 :         char *retstr;
   49745             : 
   49746           0 :         if (ndr_table_netlogon.num_calls < 32) {
   49747           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_print");
   49748           0 :                 return NULL;
   49749             :         }
   49750           0 :         call = &ndr_table_netlogon.calls[31];
   49751             : 
   49752           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   49753           0 :         ret = PyUnicode_FromString(retstr);
   49754           0 :         TALLOC_FREE(retstr);
   49755             : 
   49756           0 :         return ret;
   49757             : }
   49758             : 
   49759           0 : static PyObject *py_netr_ServerPasswordGet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49760             : {
   49761           0 :         return py_netr_ServerPasswordGet_ndr_print(py_obj, "netr_ServerPasswordGet_in", NDR_IN);
   49762             : }
   49763             : 
   49764           0 : static PyObject *py_netr_ServerPasswordGet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49765             : {
   49766           0 :         return py_netr_ServerPasswordGet_ndr_print(py_obj, "netr_ServerPasswordGet_out", NDR_OUT);
   49767             : }
   49768             : 
   49769             : static PyMethodDef py_netr_ServerPasswordGet_methods[] = {
   49770             :         { "opnum", (PyCFunction)py_netr_ServerPasswordGet_ndr_opnum, METH_NOARGS|METH_CLASS,
   49771             :                 "netlogon.netr_ServerPasswordGet.opnum() -> 31 (0x1f) " },
   49772             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   49773             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   49774             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   49775             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   49776             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   49777             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   49778             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   49779             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   49780             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerPasswordGet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   49781             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerPasswordGet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   49782             :         { NULL, NULL, 0, NULL }
   49783             : };
   49784             : 
   49785             : 
   49786             : static PyTypeObject netr_ServerPasswordGet_Type = {
   49787             :         PyVarObject_HEAD_INIT(NULL, 0)
   49788             :         .tp_name = "netlogon.netr_ServerPasswordGet",
   49789             :         .tp_getset = py_netr_ServerPasswordGet_getsetters,
   49790             :         .tp_methods = py_netr_ServerPasswordGet_methods,
   49791             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   49792             :         .tp_new = py_netr_ServerPasswordGet_new,
   49793             : };
   49794             : 
   49795           0 : static bool pack_py_netr_ServerPasswordGet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordGet *r)
   49796             : {
   49797           0 :         PyObject *py_server_name;
   49798           0 :         PyObject *py_account_name;
   49799           0 :         PyObject *py_secure_channel_type;
   49800           0 :         PyObject *py_computer_name;
   49801           0 :         PyObject *py_credential;
   49802           0 :         const char *kwnames[] = {
   49803             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
   49804             :         };
   49805             : 
   49806           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_ServerPasswordGet", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential)) {
   49807           0 :                 return false;
   49808             :         }
   49809             : 
   49810           0 :         if (py_server_name == NULL) {
   49811           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   49812           0 :                 return false;
   49813             :         }
   49814           0 :         if (py_server_name == Py_None) {
   49815           0 :                 r->in.server_name = NULL;
   49816             :         } else {
   49817           0 :                 r->in.server_name = NULL;
   49818             :                 {
   49819           0 :                         const char *test_str;
   49820           0 :                         const char *talloc_str;
   49821           0 :                         PyObject *unicode = NULL;
   49822           0 :                         if (PyUnicode_Check(py_server_name)) {
   49823           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   49824           0 :                                 if (unicode == NULL) {
   49825           0 :                                         PyErr_NoMemory();
   49826           0 :                                         return false;
   49827             :                                 }
   49828           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49829           0 :                         } else if (PyBytes_Check(py_server_name)) {
   49830           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   49831             :                         } else {
   49832           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   49833           0 :                                 return false;
   49834             :                         }
   49835           0 :                         talloc_str = talloc_strdup(r, test_str);
   49836           0 :                         if (unicode != NULL) {
   49837           0 :                                 Py_DECREF(unicode);
   49838             :                         }
   49839           0 :                         if (talloc_str == NULL) {
   49840           0 :                                 PyErr_NoMemory();
   49841           0 :                                 return false;
   49842             :                         }
   49843           0 :                         r->in.server_name = talloc_str;
   49844             :                 }
   49845             :         }
   49846           0 :         if (py_account_name == NULL) {
   49847           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   49848           0 :                 return false;
   49849             :         }
   49850           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   49851           0 :         if (r->in.account_name == NULL) {
   49852           0 :                 PyErr_NoMemory();
   49853           0 :                 return false;
   49854             :         }
   49855             :         {
   49856           0 :                 const char *test_str;
   49857           0 :                 const char *talloc_str;
   49858           0 :                 PyObject *unicode = NULL;
   49859           0 :                 if (PyUnicode_Check(py_account_name)) {
   49860           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   49861           0 :                         if (unicode == NULL) {
   49862           0 :                                 PyErr_NoMemory();
   49863           0 :                                 return false;
   49864             :                         }
   49865           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49866           0 :                 } else if (PyBytes_Check(py_account_name)) {
   49867           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   49868             :                 } else {
   49869           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   49870           0 :                         return false;
   49871             :                 }
   49872           0 :                 talloc_str = talloc_strdup(r, test_str);
   49873           0 :                 if (unicode != NULL) {
   49874           0 :                         Py_DECREF(unicode);
   49875             :                 }
   49876           0 :                 if (talloc_str == NULL) {
   49877           0 :                         PyErr_NoMemory();
   49878           0 :                         return false;
   49879             :                 }
   49880           0 :                 r->in.account_name = talloc_str;
   49881             :         }
   49882           0 :         if (py_secure_channel_type == NULL) {
   49883           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   49884           0 :                 return false;
   49885             :         }
   49886             :         {
   49887           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   49888           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   49889           0 :                         unsigned long long test_var;
   49890           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   49891           0 :                         if (PyErr_Occurred() != NULL) {
   49892           0 :                                 return false;
   49893             :                         }
   49894           0 :                         if (test_var > uint_max) {
   49895           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49896             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49897           0 :                                 return false;
   49898             :                         }
   49899           0 :                         r->in.secure_channel_type = test_var;
   49900             :                 } else {
   49901           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49902             :                           PyLong_Type.tp_name);
   49903           0 :                         return false;
   49904             :                 }
   49905             :         }
   49906           0 :         if (py_computer_name == NULL) {
   49907           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   49908           0 :                 return false;
   49909             :         }
   49910           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   49911           0 :         if (r->in.computer_name == NULL) {
   49912           0 :                 PyErr_NoMemory();
   49913           0 :                 return false;
   49914             :         }
   49915             :         {
   49916           0 :                 const char *test_str;
   49917           0 :                 const char *talloc_str;
   49918           0 :                 PyObject *unicode = NULL;
   49919           0 :                 if (PyUnicode_Check(py_computer_name)) {
   49920           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   49921           0 :                         if (unicode == NULL) {
   49922           0 :                                 PyErr_NoMemory();
   49923           0 :                                 return false;
   49924             :                         }
   49925           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49926           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   49927           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   49928             :                 } else {
   49929           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   49930           0 :                         return false;
   49931             :                 }
   49932           0 :                 talloc_str = talloc_strdup(r, test_str);
   49933           0 :                 if (unicode != NULL) {
   49934           0 :                         Py_DECREF(unicode);
   49935             :                 }
   49936           0 :                 if (talloc_str == NULL) {
   49937           0 :                         PyErr_NoMemory();
   49938           0 :                         return false;
   49939             :                 }
   49940           0 :                 r->in.computer_name = talloc_str;
   49941             :         }
   49942           0 :         if (py_credential == NULL) {
   49943           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   49944           0 :                 return false;
   49945             :         }
   49946           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   49947           0 :         if (r->in.credential == NULL) {
   49948           0 :                 PyErr_NoMemory();
   49949           0 :                 return false;
   49950             :         }
   49951           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   49952           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   49953           0 :                 PyErr_NoMemory();
   49954           0 :                 return false;
   49955             :         }
   49956           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   49957           0 :         return true;
   49958             : }
   49959             : 
   49960           0 : static PyObject *unpack_py_netr_ServerPasswordGet_args_out(struct netr_ServerPasswordGet *r)
   49961             : {
   49962           0 :         PyObject *result;
   49963           0 :         PyObject *py_return_authenticator;
   49964           0 :         PyObject *py_password;
   49965           0 :         result = PyTuple_New(2);
   49966           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   49967           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   49968           0 :         py_password = pytalloc_reference_ex(samr_Password_Type, r->out.password, r->out.password);
   49969           0 :         PyTuple_SetItem(result, 1, py_password);
   49970           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   49971           0 :                 PyErr_SetNTSTATUS(r->out.result);
   49972           0 :                 return NULL;
   49973             :         }
   49974             : 
   49975           0 :         return result;
   49976             : }
   49977             : 
   49978             : 
   49979           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_server_name(PyObject *obj, void *closure)
   49980             : {
   49981           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   49982           0 :         PyObject *py_server_name;
   49983           0 :         if (object->in.server_name == NULL) {
   49984           0 :                 Py_RETURN_NONE;
   49985             :         }
   49986           0 :         if (object->in.server_name == NULL) {
   49987           0 :                 py_server_name = Py_None;
   49988           0 :                 Py_INCREF(py_server_name);
   49989             :         } else {
   49990           0 :                 if (object->in.server_name == NULL) {
   49991           0 :                         py_server_name = Py_None;
   49992           0 :                         Py_INCREF(py_server_name);
   49993             :                 } else {
   49994           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   49995             :                 }
   49996             :         }
   49997           0 :         return py_server_name;
   49998             : }
   49999             : 
   50000           0 : static int py_netr_NetrLogonSendToSam_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   50001             : {
   50002           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50003           0 :         if (value == NULL) {
   50004           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   50005           0 :                 return -1;
   50006             :         }
   50007           0 :         if (value == Py_None) {
   50008           0 :                 object->in.server_name = NULL;
   50009             :         } else {
   50010           0 :                 object->in.server_name = NULL;
   50011             :                 {
   50012           0 :                         const char *test_str;
   50013           0 :                         const char *talloc_str;
   50014           0 :                         PyObject *unicode = NULL;
   50015           0 :                         if (PyUnicode_Check(value)) {
   50016           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50017           0 :                                 if (unicode == NULL) {
   50018           0 :                                         PyErr_NoMemory();
   50019           0 :                                         return -1;
   50020             :                                 }
   50021           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50022           0 :                         } else if (PyBytes_Check(value)) {
   50023           0 :                                 test_str = PyBytes_AS_STRING(value);
   50024             :                         } else {
   50025           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50026           0 :                                 return -1;
   50027             :                         }
   50028           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50029           0 :                         if (unicode != NULL) {
   50030           0 :                                 Py_DECREF(unicode);
   50031             :                         }
   50032           0 :                         if (talloc_str == NULL) {
   50033           0 :                                 PyErr_NoMemory();
   50034           0 :                                 return -1;
   50035             :                         }
   50036           0 :                         object->in.server_name = talloc_str;
   50037             :                 }
   50038             :         }
   50039           0 :         return 0;
   50040             : }
   50041             : 
   50042           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_computer_name(PyObject *obj, void *closure)
   50043             : {
   50044           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   50045           0 :         PyObject *py_computer_name;
   50046           0 :         if (object->in.computer_name == NULL) {
   50047           0 :                 Py_RETURN_NONE;
   50048             :         }
   50049           0 :         if (object->in.computer_name == NULL) {
   50050           0 :                 py_computer_name = Py_None;
   50051           0 :                 Py_INCREF(py_computer_name);
   50052             :         } else {
   50053           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   50054             :         }
   50055           0 :         return py_computer_name;
   50056             : }
   50057             : 
   50058           0 : static int py_netr_NetrLogonSendToSam_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   50059             : {
   50060           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50061           0 :         if (value == NULL) {
   50062           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   50063           0 :                 return -1;
   50064             :         }
   50065           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   50066           0 :         if (object->in.computer_name == NULL) {
   50067           0 :                 PyErr_NoMemory();
   50068           0 :                 return -1;
   50069             :         }
   50070             :         {
   50071           0 :                 const char *test_str;
   50072           0 :                 const char *talloc_str;
   50073           0 :                 PyObject *unicode = NULL;
   50074           0 :                 if (PyUnicode_Check(value)) {
   50075           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50076           0 :                         if (unicode == NULL) {
   50077           0 :                                 PyErr_NoMemory();
   50078           0 :                                 return -1;
   50079             :                         }
   50080           0 :                         test_str = PyBytes_AS_STRING(unicode);
   50081           0 :                 } else if (PyBytes_Check(value)) {
   50082           0 :                         test_str = PyBytes_AS_STRING(value);
   50083             :                 } else {
   50084           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50085           0 :                         return -1;
   50086             :                 }
   50087           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50088           0 :                 if (unicode != NULL) {
   50089           0 :                         Py_DECREF(unicode);
   50090             :                 }
   50091           0 :                 if (talloc_str == NULL) {
   50092           0 :                         PyErr_NoMemory();
   50093           0 :                         return -1;
   50094             :                 }
   50095           0 :                 object->in.computer_name = talloc_str;
   50096             :         }
   50097           0 :         return 0;
   50098             : }
   50099             : 
   50100           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_credential(PyObject *obj, void *closure)
   50101             : {
   50102           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   50103           0 :         PyObject *py_credential;
   50104           0 :         if (object->in.credential == NULL) {
   50105           0 :                 Py_RETURN_NONE;
   50106             :         }
   50107           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   50108           0 :         return py_credential;
   50109             : }
   50110             : 
   50111           0 : static int py_netr_NetrLogonSendToSam_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   50112             : {
   50113           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50114           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   50115           0 :         if (value == NULL) {
   50116           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   50117           0 :                 return -1;
   50118             :         }
   50119           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   50120           0 :         if (object->in.credential == NULL) {
   50121           0 :                 PyErr_NoMemory();
   50122           0 :                 return -1;
   50123             :         }
   50124           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   50125           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   50126           0 :                 PyErr_NoMemory();
   50127           0 :                 return -1;
   50128             :         }
   50129           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   50130           0 :         return 0;
   50131             : }
   50132             : 
   50133           0 : static PyObject *py_netr_NetrLogonSendToSam_out_get_return_authenticator(PyObject *obj, void *closure)
   50134             : {
   50135           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   50136           0 :         PyObject *py_return_authenticator;
   50137           0 :         if (object->out.return_authenticator == NULL) {
   50138           0 :                 Py_RETURN_NONE;
   50139             :         }
   50140           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   50141           0 :         return py_return_authenticator;
   50142             : }
   50143             : 
   50144           0 : static int py_netr_NetrLogonSendToSam_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   50145             : {
   50146           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50147           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   50148           0 :         if (value == NULL) {
   50149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   50150           0 :                 return -1;
   50151             :         }
   50152           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   50153           0 :         if (object->out.return_authenticator == NULL) {
   50154           0 :                 PyErr_NoMemory();
   50155           0 :                 return -1;
   50156             :         }
   50157           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   50158           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   50159           0 :                 PyErr_NoMemory();
   50160           0 :                 return -1;
   50161             :         }
   50162           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   50163           0 :         return 0;
   50164             : }
   50165             : 
   50166           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_opaque_buffer(PyObject *obj, void *closure)
   50167             : {
   50168           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   50169           0 :         PyObject *py_opaque_buffer;
   50170           0 :         if (object->in.opaque_buffer == NULL) {
   50171           0 :                 Py_RETURN_NONE;
   50172             :         }
   50173           0 :         py_opaque_buffer = PyList_New(object->in.buffer_len);
   50174           0 :         if (py_opaque_buffer == NULL) {
   50175           0 :                 return NULL;
   50176             :         }
   50177             :         {
   50178             :                 int opaque_buffer_cntr_1;
   50179           0 :                 for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < (object->in.buffer_len); opaque_buffer_cntr_1++) {
   50180           0 :                         PyObject *py_opaque_buffer_1;
   50181           0 :                         py_opaque_buffer_1 = PyLong_FromLong((uint16_t)object->in.opaque_buffer[opaque_buffer_cntr_1]);
   50182           0 :                         PyList_SetItem(py_opaque_buffer, opaque_buffer_cntr_1, py_opaque_buffer_1);
   50183             :                 }
   50184             :         }
   50185           0 :         return py_opaque_buffer;
   50186             : }
   50187             : 
   50188           0 : static int py_netr_NetrLogonSendToSam_in_set_opaque_buffer(PyObject *py_obj, PyObject *value, void *closure)
   50189             : {
   50190           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50191           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.opaque_buffer));
   50192           0 :         if (value == NULL) {
   50193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.opaque_buffer");
   50194           0 :                 return -1;
   50195             :         }
   50196           0 :         object->in.opaque_buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.opaque_buffer);
   50197           0 :         if (object->in.opaque_buffer == NULL) {
   50198           0 :                 PyErr_NoMemory();
   50199           0 :                 return -1;
   50200             :         }
   50201           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   50202             :         {
   50203           0 :                 int opaque_buffer_cntr_1;
   50204           0 :                 object->in.opaque_buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.opaque_buffer, PyList_GET_SIZE(value));
   50205           0 :                 if (!object->in.opaque_buffer) { return -1; }
   50206           0 :                 talloc_set_name_const(object->in.opaque_buffer, "ARRAY: object->in.opaque_buffer");
   50207           0 :                 for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < PyList_GET_SIZE(value); opaque_buffer_cntr_1++) {
   50208           0 :                         if (PyList_GET_ITEM(value, opaque_buffer_cntr_1) == NULL) {
   50209           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.opaque_buffer[opaque_buffer_cntr_1]");
   50210           0 :                                 return -1;
   50211             :                         }
   50212             :                         {
   50213           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.opaque_buffer[opaque_buffer_cntr_1]));
   50214           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, opaque_buffer_cntr_1))) {
   50215           0 :                                         unsigned long long test_var;
   50216           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, opaque_buffer_cntr_1));
   50217           0 :                                         if (PyErr_Occurred() != NULL) {
   50218           0 :                                                 return -1;
   50219             :                                         }
   50220           0 :                                         if (test_var > uint_max) {
   50221           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50222             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   50223           0 :                                                 return -1;
   50224             :                                         }
   50225           0 :                                         object->in.opaque_buffer[opaque_buffer_cntr_1] = test_var;
   50226             :                                 } else {
   50227           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50228             :                                           PyLong_Type.tp_name);
   50229           0 :                                         return -1;
   50230             :                                 }
   50231             :                         }
   50232             :                 }
   50233             :         }
   50234           0 :         return 0;
   50235             : }
   50236             : 
   50237           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_buffer_len(PyObject *obj, void *closure)
   50238             : {
   50239           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   50240           0 :         PyObject *py_buffer_len;
   50241           0 :         py_buffer_len = PyLong_FromUnsignedLongLong((uint32_t)object->in.buffer_len);
   50242           0 :         return py_buffer_len;
   50243             : }
   50244             : 
   50245           0 : static int py_netr_NetrLogonSendToSam_in_set_buffer_len(PyObject *py_obj, PyObject *value, void *closure)
   50246             : {
   50247           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50248           0 :         if (value == NULL) {
   50249           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.buffer_len");
   50250           0 :                 return -1;
   50251             :         }
   50252             :         {
   50253           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffer_len));
   50254           0 :                 if (PyLong_Check(value)) {
   50255           0 :                         unsigned long long test_var;
   50256           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   50257           0 :                         if (PyErr_Occurred() != NULL) {
   50258           0 :                                 return -1;
   50259             :                         }
   50260           0 :                         if (test_var > uint_max) {
   50261           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50262             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50263           0 :                                 return -1;
   50264             :                         }
   50265           0 :                         object->in.buffer_len = test_var;
   50266             :                 } else {
   50267           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50268             :                           PyLong_Type.tp_name);
   50269           0 :                         return -1;
   50270             :                 }
   50271             :         }
   50272           0 :         return 0;
   50273             : }
   50274             : 
   50275           0 : static PyObject *py_netr_NetrLogonSendToSam_get_result(PyObject *obj, void *closure)
   50276             : {
   50277           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   50278           0 :         PyObject *py_result;
   50279           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   50280           0 :         return py_result;
   50281             : }
   50282             : 
   50283           0 : static int py_netr_NetrLogonSendToSam_set_result(PyObject *py_obj, PyObject *value, void *closure)
   50284             : {
   50285           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50286           0 :         if (value == NULL) {
   50287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   50288           0 :                 return -1;
   50289             :         }
   50290           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   50291           0 :         return 0;
   50292             : }
   50293             : 
   50294             : static PyGetSetDef py_netr_NetrLogonSendToSam_getsetters[] = {
   50295             :         {
   50296             :                 .name = discard_const_p(char, "in_server_name"),
   50297             :                 .get = py_netr_NetrLogonSendToSam_in_get_server_name,
   50298             :                 .set = py_netr_NetrLogonSendToSam_in_set_server_name,
   50299             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50300             :         },
   50301             :         {
   50302             :                 .name = discard_const_p(char, "in_computer_name"),
   50303             :                 .get = py_netr_NetrLogonSendToSam_in_get_computer_name,
   50304             :                 .set = py_netr_NetrLogonSendToSam_in_set_computer_name,
   50305             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50306             :         },
   50307             :         {
   50308             :                 .name = discard_const_p(char, "in_credential"),
   50309             :                 .get = py_netr_NetrLogonSendToSam_in_get_credential,
   50310             :                 .set = py_netr_NetrLogonSendToSam_in_set_credential,
   50311             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   50312             :         },
   50313             :         {
   50314             :                 .name = discard_const_p(char, "out_return_authenticator"),
   50315             :                 .get = py_netr_NetrLogonSendToSam_out_get_return_authenticator,
   50316             :                 .set = py_netr_NetrLogonSendToSam_out_set_return_authenticator,
   50317             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   50318             :         },
   50319             :         {
   50320             :                 .name = discard_const_p(char, "in_opaque_buffer"),
   50321             :                 .get = py_netr_NetrLogonSendToSam_in_get_opaque_buffer,
   50322             :                 .set = py_netr_NetrLogonSendToSam_in_set_opaque_buffer,
   50323             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   50324             :         },
   50325             :         {
   50326             :                 .name = discard_const_p(char, "in_buffer_len"),
   50327             :                 .get = py_netr_NetrLogonSendToSam_in_get_buffer_len,
   50328             :                 .set = py_netr_NetrLogonSendToSam_in_set_buffer_len,
   50329             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   50330             :         },
   50331             :         {
   50332             :                 .name = discard_const_p(char, "result"),
   50333             :                 .get = py_netr_NetrLogonSendToSam_get_result,
   50334             :                 .set = py_netr_NetrLogonSendToSam_set_result,
   50335             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   50336             :         },
   50337             :         { .name = NULL }
   50338             : };
   50339             : 
   50340           0 : static PyObject *py_netr_NetrLogonSendToSam_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   50341             : {
   50342           0 :         PyObject *self = pytalloc_new(struct netr_NetrLogonSendToSam, type);
   50343           0 :         struct netr_NetrLogonSendToSam *_self = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(self);
   50344           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   50345           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   50346           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   50347           0 :         _self->in.opaque_buffer = talloc_zero(mem_ctx, uint8_t);
   50348           0 :         return self;
   50349             : }
   50350             : 
   50351           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   50352             : {
   50353             : 
   50354             : 
   50355           0 :         return PyLong_FromLong(32);
   50356             : }
   50357             : 
   50358           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   50359             : {
   50360           0 :         const struct ndr_interface_call *call = NULL;
   50361           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50362           0 :         PyObject *ret = NULL;
   50363           0 :         struct ndr_push *push = NULL;
   50364           0 :         DATA_BLOB blob;
   50365           0 :         enum ndr_err_code err;
   50366             : 
   50367           0 :         if (ndr_table_netlogon.num_calls < 33) {
   50368           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_pack");
   50369           0 :                 return NULL;
   50370             :         }
   50371           0 :         call = &ndr_table_netlogon.calls[32];
   50372             : 
   50373           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   50374           0 :         if (push == NULL) {
   50375           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50376           0 :                 return NULL;
   50377             :         }
   50378             : 
   50379           0 :         push->flags |= ndr_push_flags;
   50380             : 
   50381           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   50382           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50383           0 :                 TALLOC_FREE(push);
   50384           0 :                 PyErr_SetNdrError(err);
   50385           0 :                 return NULL;
   50386             :         }
   50387           0 :         blob = ndr_push_blob(push);
   50388           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   50389           0 :         TALLOC_FREE(push);
   50390           0 :         return ret;
   50391             : }
   50392             : 
   50393           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50394             : {
   50395           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50396           0 :         PyObject *bigendian_obj = NULL;
   50397           0 :         PyObject *ndr64_obj = NULL;
   50398           0 :         libndr_flags ndr_push_flags = 0;
   50399             : 
   50400           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   50401             :                 discard_const_p(char *, kwnames),
   50402             :                 &bigendian_obj,
   50403             :                 &ndr64_obj)) {
   50404           0 :                 return NULL;
   50405             :         }
   50406             : 
   50407           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50408           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50409             :         }
   50410           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50411           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50412             :         }
   50413             : 
   50414           0 :         return py_netr_NetrLogonSendToSam_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   50415             : }
   50416             : 
   50417           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50418             : {
   50419           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50420           0 :         PyObject *bigendian_obj = NULL;
   50421           0 :         PyObject *ndr64_obj = NULL;
   50422           0 :         libndr_flags ndr_push_flags = 0;
   50423             : 
   50424           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   50425             :                 discard_const_p(char *, kwnames),
   50426             :                 &bigendian_obj,
   50427             :                 &ndr64_obj)) {
   50428           0 :                 return NULL;
   50429             :         }
   50430             : 
   50431           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50432           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50433             :         }
   50434           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50435           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50436             :         }
   50437             : 
   50438           0 :         return py_netr_NetrLogonSendToSam_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   50439             : }
   50440             : 
   50441           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   50442             : {
   50443           0 :         const struct ndr_interface_call *call = NULL;
   50444           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50445           0 :         struct ndr_pull *pull = NULL;
   50446           0 :         enum ndr_err_code err;
   50447             : 
   50448           0 :         if (ndr_table_netlogon.num_calls < 33) {
   50449           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_unpack");
   50450           0 :                 return NULL;
   50451             :         }
   50452           0 :         call = &ndr_table_netlogon.calls[32];
   50453             : 
   50454           0 :         pull = ndr_pull_init_blob(blob, object);
   50455           0 :         if (pull == NULL) {
   50456           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50457           0 :                 return NULL;
   50458             :         }
   50459             : 
   50460           0 :         pull->flags |= ndr_pull_flags;
   50461             : 
   50462           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   50463           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50464           0 :                 TALLOC_FREE(pull);
   50465           0 :                 PyErr_SetNdrError(err);
   50466           0 :                 return NULL;
   50467             :         }
   50468           0 :         if (!allow_remaining) {
   50469           0 :                 uint32_t highest_ofs;
   50470             : 
   50471           0 :                 if (pull->offset > pull->relative_highest_offset) {
   50472           0 :                         highest_ofs = pull->offset;
   50473             :                 } else {
   50474           0 :                         highest_ofs = pull->relative_highest_offset;
   50475             :                 }
   50476           0 :                 if (highest_ofs < pull->data_size) {
   50477           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   50478             :                                 "not all bytes consumed ofs[%u] size[%u]",
   50479             :                                 highest_ofs, pull->data_size);
   50480           0 :                         TALLOC_FREE(pull);
   50481           0 :                         PyErr_SetNdrError(err);
   50482           0 :                         return NULL;
   50483             :                 }
   50484             :         }
   50485             : 
   50486           0 :         TALLOC_FREE(pull);
   50487           0 :         Py_RETURN_NONE;
   50488             : }
   50489             : 
   50490           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50491             : {
   50492           0 :         DATA_BLOB blob;
   50493           0 :         Py_ssize_t blob_length = 0;
   50494           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50495           0 :         PyObject *bigendian_obj = NULL;
   50496           0 :         PyObject *ndr64_obj = NULL;
   50497           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50498           0 :         PyObject *allow_remaining_obj = NULL;
   50499           0 :         bool allow_remaining = false;
   50500             : 
   50501           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   50502             :                 discard_const_p(char *, kwnames),
   50503             :                 &blob.data, &blob_length,
   50504             :                 &bigendian_obj,
   50505             :                 &ndr64_obj,
   50506             :                 &allow_remaining_obj)) {
   50507           0 :                 return NULL;
   50508             :         }
   50509           0 :         blob.length = blob_length;
   50510             : 
   50511           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50512           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50513             :         }
   50514           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50515           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50516             :         }
   50517             : 
   50518           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50519           0 :                 allow_remaining = true;
   50520             :         }
   50521             : 
   50522           0 :         return py_netr_NetrLogonSendToSam_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   50523             : }
   50524             : 
   50525           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50526             : {
   50527           0 :         DATA_BLOB blob;
   50528           0 :         Py_ssize_t blob_length = 0;
   50529           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50530           0 :         PyObject *bigendian_obj = NULL;
   50531           0 :         PyObject *ndr64_obj = NULL;
   50532           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50533           0 :         PyObject *allow_remaining_obj = NULL;
   50534           0 :         bool allow_remaining = false;
   50535             : 
   50536           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   50537             :                 discard_const_p(char *, kwnames),
   50538             :                 &blob.data, &blob_length,
   50539             :                 &bigendian_obj,
   50540             :                 &ndr64_obj,
   50541             :                 &allow_remaining_obj)) {
   50542           0 :                 return NULL;
   50543             :         }
   50544           0 :         blob.length = blob_length;
   50545             : 
   50546           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50547           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50548             :         }
   50549           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50550           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50551             :         }
   50552             : 
   50553           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50554           0 :                 allow_remaining = true;
   50555             :         }
   50556             : 
   50557           0 :         return py_netr_NetrLogonSendToSam_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   50558             : }
   50559             : 
   50560           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   50561             : {
   50562           0 :         const struct ndr_interface_call *call = NULL;
   50563           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50564           0 :         PyObject *ret;
   50565           0 :         char *retstr;
   50566             : 
   50567           0 :         if (ndr_table_netlogon.num_calls < 33) {
   50568           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_print");
   50569           0 :                 return NULL;
   50570             :         }
   50571           0 :         call = &ndr_table_netlogon.calls[32];
   50572             : 
   50573           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   50574           0 :         ret = PyUnicode_FromString(retstr);
   50575           0 :         TALLOC_FREE(retstr);
   50576             : 
   50577           0 :         return ret;
   50578             : }
   50579             : 
   50580           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50581             : {
   50582           0 :         return py_netr_NetrLogonSendToSam_ndr_print(py_obj, "netr_NetrLogonSendToSam_in", NDR_IN);
   50583             : }
   50584             : 
   50585           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50586             : {
   50587           0 :         return py_netr_NetrLogonSendToSam_ndr_print(py_obj, "netr_NetrLogonSendToSam_out", NDR_OUT);
   50588             : }
   50589             : 
   50590             : static PyMethodDef py_netr_NetrLogonSendToSam_methods[] = {
   50591             :         { "opnum", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_opnum, METH_NOARGS|METH_CLASS,
   50592             :                 "netlogon.netr_NetrLogonSendToSam.opnum() -> 32 (0x20) " },
   50593             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   50594             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   50595             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   50596             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   50597             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   50598             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   50599             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   50600             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   50601             :         { "__ndr_print_in__", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   50602             :         { "__ndr_print_out__", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   50603             :         { NULL, NULL, 0, NULL }
   50604             : };
   50605             : 
   50606             : 
   50607             : static PyTypeObject netr_NetrLogonSendToSam_Type = {
   50608             :         PyVarObject_HEAD_INIT(NULL, 0)
   50609             :         .tp_name = "netlogon.netr_NetrLogonSendToSam",
   50610             :         .tp_getset = py_netr_NetrLogonSendToSam_getsetters,
   50611             :         .tp_methods = py_netr_NetrLogonSendToSam_methods,
   50612             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   50613             :         .tp_new = py_netr_NetrLogonSendToSam_new,
   50614             : };
   50615             : 
   50616           0 : static bool pack_py_netr_NetrLogonSendToSam_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrLogonSendToSam *r)
   50617             : {
   50618           0 :         PyObject *py_server_name;
   50619           0 :         PyObject *py_computer_name;
   50620           0 :         PyObject *py_credential;
   50621           0 :         PyObject *py_opaque_buffer;
   50622           0 :         const char *kwnames[] = {
   50623             :                 "server_name", "computer_name", "credential", "opaque_buffer", NULL
   50624             :         };
   50625             : 
   50626           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_NetrLogonSendToSam", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_opaque_buffer)) {
   50627           0 :                 return false;
   50628             :         }
   50629             : 
   50630           0 :         if (py_server_name == NULL) {
   50631           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   50632           0 :                 return false;
   50633             :         }
   50634           0 :         if (py_server_name == Py_None) {
   50635           0 :                 r->in.server_name = NULL;
   50636             :         } else {
   50637           0 :                 r->in.server_name = NULL;
   50638             :                 {
   50639           0 :                         const char *test_str;
   50640           0 :                         const char *talloc_str;
   50641           0 :                         PyObject *unicode = NULL;
   50642           0 :                         if (PyUnicode_Check(py_server_name)) {
   50643           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   50644           0 :                                 if (unicode == NULL) {
   50645           0 :                                         PyErr_NoMemory();
   50646           0 :                                         return false;
   50647             :                                 }
   50648           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50649           0 :                         } else if (PyBytes_Check(py_server_name)) {
   50650           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   50651             :                         } else {
   50652           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   50653           0 :                                 return false;
   50654             :                         }
   50655           0 :                         talloc_str = talloc_strdup(r, test_str);
   50656           0 :                         if (unicode != NULL) {
   50657           0 :                                 Py_DECREF(unicode);
   50658             :                         }
   50659           0 :                         if (talloc_str == NULL) {
   50660           0 :                                 PyErr_NoMemory();
   50661           0 :                                 return false;
   50662             :                         }
   50663           0 :                         r->in.server_name = talloc_str;
   50664             :                 }
   50665             :         }
   50666           0 :         if (py_computer_name == NULL) {
   50667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   50668           0 :                 return false;
   50669             :         }
   50670           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   50671           0 :         if (r->in.computer_name == NULL) {
   50672           0 :                 PyErr_NoMemory();
   50673           0 :                 return false;
   50674             :         }
   50675             :         {
   50676           0 :                 const char *test_str;
   50677           0 :                 const char *talloc_str;
   50678           0 :                 PyObject *unicode = NULL;
   50679           0 :                 if (PyUnicode_Check(py_computer_name)) {
   50680           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   50681           0 :                         if (unicode == NULL) {
   50682           0 :                                 PyErr_NoMemory();
   50683           0 :                                 return false;
   50684             :                         }
   50685           0 :                         test_str = PyBytes_AS_STRING(unicode);
   50686           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   50687           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   50688             :                 } else {
   50689           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   50690           0 :                         return false;
   50691             :                 }
   50692           0 :                 talloc_str = talloc_strdup(r, test_str);
   50693           0 :                 if (unicode != NULL) {
   50694           0 :                         Py_DECREF(unicode);
   50695             :                 }
   50696           0 :                 if (talloc_str == NULL) {
   50697           0 :                         PyErr_NoMemory();
   50698           0 :                         return false;
   50699             :                 }
   50700           0 :                 r->in.computer_name = talloc_str;
   50701             :         }
   50702           0 :         if (py_credential == NULL) {
   50703           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   50704           0 :                 return false;
   50705             :         }
   50706           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   50707           0 :         if (r->in.credential == NULL) {
   50708           0 :                 PyErr_NoMemory();
   50709           0 :                 return false;
   50710             :         }
   50711           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   50712           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   50713           0 :                 PyErr_NoMemory();
   50714           0 :                 return false;
   50715             :         }
   50716           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   50717           0 :         if (py_opaque_buffer == NULL) {
   50718           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.opaque_buffer");
   50719           0 :                 return false;
   50720             :         }
   50721           0 :         r->in.opaque_buffer = talloc_ptrtype(r, r->in.opaque_buffer);
   50722           0 :         if (r->in.opaque_buffer == NULL) {
   50723           0 :                 PyErr_NoMemory();
   50724           0 :                 return false;
   50725             :         }
   50726           0 :         PY_CHECK_TYPE(&PyList_Type, py_opaque_buffer, return false;);
   50727             :         {
   50728           0 :                 int opaque_buffer_cntr_1;
   50729           0 :                 r->in.opaque_buffer = talloc_array_ptrtype(r, r->in.opaque_buffer, PyList_GET_SIZE(py_opaque_buffer));
   50730           0 :                 if (!r->in.opaque_buffer) { return false; }
   50731           0 :                 talloc_set_name_const(r->in.opaque_buffer, "ARRAY: r->in.opaque_buffer");
   50732           0 :                 for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < PyList_GET_SIZE(py_opaque_buffer); opaque_buffer_cntr_1++) {
   50733           0 :                         if (PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1) == NULL) {
   50734           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.opaque_buffer[opaque_buffer_cntr_1]");
   50735           0 :                                 return false;
   50736             :                         }
   50737             :                         {
   50738           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.opaque_buffer[opaque_buffer_cntr_1]));
   50739           0 :                                 if (PyLong_Check(PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1))) {
   50740           0 :                                         unsigned long long test_var;
   50741           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1));
   50742           0 :                                         if (PyErr_Occurred() != NULL) {
   50743           0 :                                                 return false;
   50744             :                                         }
   50745           0 :                                         if (test_var > uint_max) {
   50746           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50747             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   50748           0 :                                                 return false;
   50749             :                                         }
   50750           0 :                                         r->in.opaque_buffer[opaque_buffer_cntr_1] = test_var;
   50751             :                                 } else {
   50752           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50753             :                                           PyLong_Type.tp_name);
   50754           0 :                                         return false;
   50755             :                                 }
   50756             :                         }
   50757             :                 }
   50758             :         }
   50759           0 :         PY_CHECK_TYPE(&PyList_Type, py_opaque_buffer, return false;);
   50760           0 :         r->in.buffer_len = PyList_GET_SIZE(py_opaque_buffer);
   50761           0 :         return true;
   50762             : }
   50763             : 
   50764           0 : static PyObject *unpack_py_netr_NetrLogonSendToSam_args_out(struct netr_NetrLogonSendToSam *r)
   50765             : {
   50766           0 :         PyObject *result;
   50767           0 :         PyObject *py_return_authenticator;
   50768           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   50769           0 :         result = py_return_authenticator;
   50770           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   50771           0 :                 PyErr_SetNTSTATUS(r->out.result);
   50772           0 :                 return NULL;
   50773             :         }
   50774             : 
   50775           0 :         return result;
   50776             : }
   50777             : 
   50778             : 
   50779           0 : static PyObject *py_netr_DsRAddressToSitenamesW_in_get_server_name(PyObject *obj, void *closure)
   50780             : {
   50781           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50782           0 :         PyObject *py_server_name;
   50783           0 :         if (object->in.server_name == NULL) {
   50784           0 :                 Py_RETURN_NONE;
   50785             :         }
   50786           0 :         if (object->in.server_name == NULL) {
   50787           0 :                 py_server_name = Py_None;
   50788           0 :                 Py_INCREF(py_server_name);
   50789             :         } else {
   50790           0 :                 if (object->in.server_name == NULL) {
   50791           0 :                         py_server_name = Py_None;
   50792           0 :                         Py_INCREF(py_server_name);
   50793             :                 } else {
   50794           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   50795             :                 }
   50796             :         }
   50797           0 :         return py_server_name;
   50798             : }
   50799             : 
   50800           0 : static int py_netr_DsRAddressToSitenamesW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   50801             : {
   50802           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50803           0 :         if (value == NULL) {
   50804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   50805           0 :                 return -1;
   50806             :         }
   50807           0 :         if (value == Py_None) {
   50808           0 :                 object->in.server_name = NULL;
   50809             :         } else {
   50810           0 :                 object->in.server_name = NULL;
   50811             :                 {
   50812           0 :                         const char *test_str;
   50813           0 :                         const char *talloc_str;
   50814           0 :                         PyObject *unicode = NULL;
   50815           0 :                         if (PyUnicode_Check(value)) {
   50816           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50817           0 :                                 if (unicode == NULL) {
   50818           0 :                                         PyErr_NoMemory();
   50819           0 :                                         return -1;
   50820             :                                 }
   50821           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50822           0 :                         } else if (PyBytes_Check(value)) {
   50823           0 :                                 test_str = PyBytes_AS_STRING(value);
   50824             :                         } else {
   50825           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50826           0 :                                 return -1;
   50827             :                         }
   50828           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50829           0 :                         if (unicode != NULL) {
   50830           0 :                                 Py_DECREF(unicode);
   50831             :                         }
   50832           0 :                         if (talloc_str == NULL) {
   50833           0 :                                 PyErr_NoMemory();
   50834           0 :                                 return -1;
   50835             :                         }
   50836           0 :                         object->in.server_name = talloc_str;
   50837             :                 }
   50838             :         }
   50839           0 :         return 0;
   50840             : }
   50841             : 
   50842           0 : static PyObject *py_netr_DsRAddressToSitenamesW_in_get_count(PyObject *obj, void *closure)
   50843             : {
   50844           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50845           0 :         PyObject *py_count;
   50846           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->in.count);
   50847           0 :         return py_count;
   50848             : }
   50849             : 
   50850           0 : static int py_netr_DsRAddressToSitenamesW_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
   50851             : {
   50852           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50853           0 :         if (value == NULL) {
   50854           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.count");
   50855           0 :                 return -1;
   50856             :         }
   50857             :         {
   50858           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
   50859           0 :                 if (PyLong_Check(value)) {
   50860           0 :                         unsigned long long test_var;
   50861           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   50862           0 :                         if (PyErr_Occurred() != NULL) {
   50863           0 :                                 return -1;
   50864             :                         }
   50865           0 :                         if (test_var > uint_max) {
   50866           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50867             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50868           0 :                                 return -1;
   50869             :                         }
   50870           0 :                         object->in.count = test_var;
   50871             :                 } else {
   50872           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50873             :                           PyLong_Type.tp_name);
   50874           0 :                         return -1;
   50875             :                 }
   50876             :         }
   50877           0 :         return 0;
   50878             : }
   50879             : 
   50880           0 : static PyObject *py_netr_DsRAddressToSitenamesW_in_get_addresses(PyObject *obj, void *closure)
   50881             : {
   50882           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50883           0 :         PyObject *py_addresses;
   50884           0 :         if (object->in.addresses == NULL) {
   50885           0 :                 Py_RETURN_NONE;
   50886             :         }
   50887           0 :         py_addresses = PyList_New(object->in.count);
   50888           0 :         if (py_addresses == NULL) {
   50889           0 :                 return NULL;
   50890             :         }
   50891             :         {
   50892             :                 int addresses_cntr_1;
   50893           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < (object->in.count); addresses_cntr_1++) {
   50894           0 :                         PyObject *py_addresses_1;
   50895           0 :                         py_addresses_1 = pytalloc_reference_ex(&netr_DsRAddress_Type, object->in.addresses, &object->in.addresses[addresses_cntr_1]);
   50896           0 :                         PyList_SetItem(py_addresses, addresses_cntr_1, py_addresses_1);
   50897             :                 }
   50898             :         }
   50899           0 :         return py_addresses;
   50900             : }
   50901             : 
   50902           0 : static int py_netr_DsRAddressToSitenamesW_in_set_addresses(PyObject *py_obj, PyObject *value, void *closure)
   50903             : {
   50904           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50905           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.addresses));
   50906           0 :         if (value == NULL) {
   50907           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.addresses");
   50908           0 :                 return -1;
   50909             :         }
   50910           0 :         object->in.addresses = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses);
   50911           0 :         if (object->in.addresses == NULL) {
   50912           0 :                 PyErr_NoMemory();
   50913           0 :                 return -1;
   50914             :         }
   50915           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   50916             :         {
   50917           0 :                 int addresses_cntr_1;
   50918           0 :                 object->in.addresses = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses, PyList_GET_SIZE(value));
   50919           0 :                 if (!object->in.addresses) { return -1; }
   50920           0 :                 talloc_set_name_const(object->in.addresses, "ARRAY: object->in.addresses");
   50921           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(value); addresses_cntr_1++) {
   50922           0 :                         if (PyList_GET_ITEM(value, addresses_cntr_1) == NULL) {
   50923           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.addresses[addresses_cntr_1]");
   50924           0 :                                 return -1;
   50925             :                         }
   50926           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(value, addresses_cntr_1), return -1;);
   50927           0 :                         if (talloc_reference(object->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, addresses_cntr_1))) == NULL) {
   50928           0 :                                 PyErr_NoMemory();
   50929           0 :                                 return -1;
   50930             :                         }
   50931           0 :                         object->in.addresses[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(value, addresses_cntr_1));
   50932             :                 }
   50933             :         }
   50934           0 :         return 0;
   50935             : }
   50936             : 
   50937           0 : static PyObject *py_netr_DsRAddressToSitenamesW_out_get_ctr(PyObject *obj, void *closure)
   50938             : {
   50939           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50940           0 :         PyObject *py_ctr;
   50941           0 :         if (object->out.ctr == NULL) {
   50942           0 :                 Py_RETURN_NONE;
   50943             :         }
   50944           0 :         if (*object->out.ctr == NULL) {
   50945           0 :                 py_ctr = Py_None;
   50946           0 :                 Py_INCREF(py_ctr);
   50947             :         } else {
   50948           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesWCtr_Type, *object->out.ctr, *object->out.ctr);
   50949             :         }
   50950           0 :         return py_ctr;
   50951             : }
   50952             : 
   50953           0 : static int py_netr_DsRAddressToSitenamesW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   50954             : {
   50955           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50956           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   50957           0 :         if (value == NULL) {
   50958           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   50959           0 :                 return -1;
   50960             :         }
   50961           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   50962           0 :         if (object->out.ctr == NULL) {
   50963           0 :                 PyErr_NoMemory();
   50964           0 :                 return -1;
   50965             :         }
   50966           0 :         if (value == Py_None) {
   50967           0 :                 *object->out.ctr = NULL;
   50968             :         } else {
   50969           0 :                 *object->out.ctr = NULL;
   50970           0 :                 PY_CHECK_TYPE(&netr_DsRAddressToSitenamesWCtr_Type, value, return -1;);
   50971           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   50972           0 :                         PyErr_NoMemory();
   50973           0 :                         return -1;
   50974             :                 }
   50975           0 :                 *object->out.ctr = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(value);
   50976             :         }
   50977           0 :         return 0;
   50978             : }
   50979             : 
   50980           0 : static PyObject *py_netr_DsRAddressToSitenamesW_get_result(PyObject *obj, void *closure)
   50981             : {
   50982           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50983           0 :         PyObject *py_result;
   50984           0 :         py_result = PyErr_FromWERROR(object->out.result);
   50985           0 :         return py_result;
   50986             : }
   50987             : 
   50988           0 : static int py_netr_DsRAddressToSitenamesW_set_result(PyObject *py_obj, PyObject *value, void *closure)
   50989             : {
   50990           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50991           0 :         if (value == NULL) {
   50992           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   50993           0 :                 return -1;
   50994             :         }
   50995           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   50996           0 :         return 0;
   50997             : }
   50998             : 
   50999             : static PyGetSetDef py_netr_DsRAddressToSitenamesW_getsetters[] = {
   51000             :         {
   51001             :                 .name = discard_const_p(char, "in_server_name"),
   51002             :                 .get = py_netr_DsRAddressToSitenamesW_in_get_server_name,
   51003             :                 .set = py_netr_DsRAddressToSitenamesW_in_set_server_name,
   51004             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51005             :         },
   51006             :         {
   51007             :                 .name = discard_const_p(char, "in_count"),
   51008             :                 .get = py_netr_DsRAddressToSitenamesW_in_get_count,
   51009             :                 .set = py_netr_DsRAddressToSitenamesW_in_set_count,
   51010             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   51011             :         },
   51012             :         {
   51013             :                 .name = discard_const_p(char, "in_addresses"),
   51014             :                 .get = py_netr_DsRAddressToSitenamesW_in_get_addresses,
   51015             :                 .set = py_netr_DsRAddressToSitenamesW_in_set_addresses,
   51016             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddress")
   51017             :         },
   51018             :         {
   51019             :                 .name = discard_const_p(char, "out_ctr"),
   51020             :                 .get = py_netr_DsRAddressToSitenamesW_out_get_ctr,
   51021             :                 .set = py_netr_DsRAddressToSitenamesW_out_set_ctr,
   51022             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddressToSitenamesWCtr")
   51023             :         },
   51024             :         {
   51025             :                 .name = discard_const_p(char, "result"),
   51026             :                 .get = py_netr_DsRAddressToSitenamesW_get_result,
   51027             :                 .set = py_netr_DsRAddressToSitenamesW_set_result,
   51028             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   51029             :         },
   51030             :         { .name = NULL }
   51031             : };
   51032             : 
   51033           0 : static PyObject *py_netr_DsRAddressToSitenamesW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   51034             : {
   51035           0 :         PyObject *self = pytalloc_new(struct netr_DsRAddressToSitenamesW, type);
   51036           0 :         struct netr_DsRAddressToSitenamesW *_self = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(self);
   51037           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   51038           0 :         _self->in.addresses = talloc_zero(mem_ctx, struct netr_DsRAddress);
   51039             :         /* a pointer to a NULL pointer */
   51040           0 :         _self->out.ctr = talloc_zero(mem_ctx, struct netr_DsRAddressToSitenamesWCtr *);
   51041           0 :         return self;
   51042             : }
   51043             : 
   51044           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   51045             : {
   51046             : 
   51047             : 
   51048           0 :         return PyLong_FromLong(33);
   51049             : }
   51050             : 
   51051           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   51052             : {
   51053           0 :         const struct ndr_interface_call *call = NULL;
   51054           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   51055           0 :         PyObject *ret = NULL;
   51056           0 :         struct ndr_push *push = NULL;
   51057           0 :         DATA_BLOB blob;
   51058           0 :         enum ndr_err_code err;
   51059             : 
   51060           0 :         if (ndr_table_netlogon.num_calls < 34) {
   51061           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_pack");
   51062           0 :                 return NULL;
   51063             :         }
   51064           0 :         call = &ndr_table_netlogon.calls[33];
   51065             : 
   51066           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   51067           0 :         if (push == NULL) {
   51068           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51069           0 :                 return NULL;
   51070             :         }
   51071             : 
   51072           0 :         push->flags |= ndr_push_flags;
   51073             : 
   51074           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   51075           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51076           0 :                 TALLOC_FREE(push);
   51077           0 :                 PyErr_SetNdrError(err);
   51078           0 :                 return NULL;
   51079             :         }
   51080           0 :         blob = ndr_push_blob(push);
   51081           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   51082           0 :         TALLOC_FREE(push);
   51083           0 :         return ret;
   51084             : }
   51085             : 
   51086           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51087             : {
   51088           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51089           0 :         PyObject *bigendian_obj = NULL;
   51090           0 :         PyObject *ndr64_obj = NULL;
   51091           0 :         libndr_flags ndr_push_flags = 0;
   51092             : 
   51093           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   51094             :                 discard_const_p(char *, kwnames),
   51095             :                 &bigendian_obj,
   51096             :                 &ndr64_obj)) {
   51097           0 :                 return NULL;
   51098             :         }
   51099             : 
   51100           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51101           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51102             :         }
   51103           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51104           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51105             :         }
   51106             : 
   51107           0 :         return py_netr_DsRAddressToSitenamesW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   51108             : }
   51109             : 
   51110           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51111             : {
   51112           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51113           0 :         PyObject *bigendian_obj = NULL;
   51114           0 :         PyObject *ndr64_obj = NULL;
   51115           0 :         libndr_flags ndr_push_flags = 0;
   51116             : 
   51117           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   51118             :                 discard_const_p(char *, kwnames),
   51119             :                 &bigendian_obj,
   51120             :                 &ndr64_obj)) {
   51121           0 :                 return NULL;
   51122             :         }
   51123             : 
   51124           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51125           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51126             :         }
   51127           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51128           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51129             :         }
   51130             : 
   51131           0 :         return py_netr_DsRAddressToSitenamesW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   51132             : }
   51133             : 
   51134           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   51135             : {
   51136           0 :         const struct ndr_interface_call *call = NULL;
   51137           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   51138           0 :         struct ndr_pull *pull = NULL;
   51139           0 :         enum ndr_err_code err;
   51140             : 
   51141           0 :         if (ndr_table_netlogon.num_calls < 34) {
   51142           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_unpack");
   51143           0 :                 return NULL;
   51144             :         }
   51145           0 :         call = &ndr_table_netlogon.calls[33];
   51146             : 
   51147           0 :         pull = ndr_pull_init_blob(blob, object);
   51148           0 :         if (pull == NULL) {
   51149           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51150           0 :                 return NULL;
   51151             :         }
   51152             : 
   51153           0 :         pull->flags |= ndr_pull_flags;
   51154             : 
   51155           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   51156           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51157           0 :                 TALLOC_FREE(pull);
   51158           0 :                 PyErr_SetNdrError(err);
   51159           0 :                 return NULL;
   51160             :         }
   51161           0 :         if (!allow_remaining) {
   51162           0 :                 uint32_t highest_ofs;
   51163             : 
   51164           0 :                 if (pull->offset > pull->relative_highest_offset) {
   51165           0 :                         highest_ofs = pull->offset;
   51166             :                 } else {
   51167           0 :                         highest_ofs = pull->relative_highest_offset;
   51168             :                 }
   51169           0 :                 if (highest_ofs < pull->data_size) {
   51170           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   51171             :                                 "not all bytes consumed ofs[%u] size[%u]",
   51172             :                                 highest_ofs, pull->data_size);
   51173           0 :                         TALLOC_FREE(pull);
   51174           0 :                         PyErr_SetNdrError(err);
   51175           0 :                         return NULL;
   51176             :                 }
   51177             :         }
   51178             : 
   51179           0 :         TALLOC_FREE(pull);
   51180           0 :         Py_RETURN_NONE;
   51181             : }
   51182             : 
   51183           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51184             : {
   51185           0 :         DATA_BLOB blob;
   51186           0 :         Py_ssize_t blob_length = 0;
   51187           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51188           0 :         PyObject *bigendian_obj = NULL;
   51189           0 :         PyObject *ndr64_obj = NULL;
   51190           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51191           0 :         PyObject *allow_remaining_obj = NULL;
   51192           0 :         bool allow_remaining = false;
   51193             : 
   51194           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   51195             :                 discard_const_p(char *, kwnames),
   51196             :                 &blob.data, &blob_length,
   51197             :                 &bigendian_obj,
   51198             :                 &ndr64_obj,
   51199             :                 &allow_remaining_obj)) {
   51200           0 :                 return NULL;
   51201             :         }
   51202           0 :         blob.length = blob_length;
   51203             : 
   51204           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51205           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51206             :         }
   51207           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51208           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51209             :         }
   51210             : 
   51211           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51212           0 :                 allow_remaining = true;
   51213             :         }
   51214             : 
   51215           0 :         return py_netr_DsRAddressToSitenamesW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   51216             : }
   51217             : 
   51218           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51219             : {
   51220           0 :         DATA_BLOB blob;
   51221           0 :         Py_ssize_t blob_length = 0;
   51222           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51223           0 :         PyObject *bigendian_obj = NULL;
   51224           0 :         PyObject *ndr64_obj = NULL;
   51225           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51226           0 :         PyObject *allow_remaining_obj = NULL;
   51227           0 :         bool allow_remaining = false;
   51228             : 
   51229           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   51230             :                 discard_const_p(char *, kwnames),
   51231             :                 &blob.data, &blob_length,
   51232             :                 &bigendian_obj,
   51233             :                 &ndr64_obj,
   51234             :                 &allow_remaining_obj)) {
   51235           0 :                 return NULL;
   51236             :         }
   51237           0 :         blob.length = blob_length;
   51238             : 
   51239           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51240           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51241             :         }
   51242           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51243           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51244             :         }
   51245             : 
   51246           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51247           0 :                 allow_remaining = true;
   51248             :         }
   51249             : 
   51250           0 :         return py_netr_DsRAddressToSitenamesW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   51251             : }
   51252             : 
   51253           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   51254             : {
   51255           0 :         const struct ndr_interface_call *call = NULL;
   51256           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   51257           0 :         PyObject *ret;
   51258           0 :         char *retstr;
   51259             : 
   51260           0 :         if (ndr_table_netlogon.num_calls < 34) {
   51261           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_print");
   51262           0 :                 return NULL;
   51263             :         }
   51264           0 :         call = &ndr_table_netlogon.calls[33];
   51265             : 
   51266           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   51267           0 :         ret = PyUnicode_FromString(retstr);
   51268           0 :         TALLOC_FREE(retstr);
   51269             : 
   51270           0 :         return ret;
   51271             : }
   51272             : 
   51273           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51274             : {
   51275           0 :         return py_netr_DsRAddressToSitenamesW_ndr_print(py_obj, "netr_DsRAddressToSitenamesW_in", NDR_IN);
   51276             : }
   51277             : 
   51278           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51279             : {
   51280           0 :         return py_netr_DsRAddressToSitenamesW_ndr_print(py_obj, "netr_DsRAddressToSitenamesW_out", NDR_OUT);
   51281             : }
   51282             : 
   51283             : static PyMethodDef py_netr_DsRAddressToSitenamesW_methods[] = {
   51284             :         { "opnum", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_opnum, METH_NOARGS|METH_CLASS,
   51285             :                 "netlogon.netr_DsRAddressToSitenamesW.opnum() -> 33 (0x21) " },
   51286             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   51287             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   51288             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   51289             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   51290             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   51291             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   51292             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   51293             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   51294             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   51295             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   51296             :         { NULL, NULL, 0, NULL }
   51297             : };
   51298             : 
   51299             : 
   51300             : static PyTypeObject netr_DsRAddressToSitenamesW_Type = {
   51301             :         PyVarObject_HEAD_INIT(NULL, 0)
   51302             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesW",
   51303             :         .tp_getset = py_netr_DsRAddressToSitenamesW_getsetters,
   51304             :         .tp_methods = py_netr_DsRAddressToSitenamesW_methods,
   51305             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   51306             :         .tp_new = py_netr_DsRAddressToSitenamesW_new,
   51307             : };
   51308             : 
   51309           0 : static bool pack_py_netr_DsRAddressToSitenamesW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRAddressToSitenamesW *r)
   51310             : {
   51311           0 :         PyObject *py_server_name;
   51312           0 :         PyObject *py_addresses;
   51313           0 :         const char *kwnames[] = {
   51314             :                 "server_name", "addresses", NULL
   51315             :         };
   51316             : 
   51317           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsRAddressToSitenamesW", discard_const_p(char *, kwnames), &py_server_name, &py_addresses)) {
   51318           0 :                 return false;
   51319             :         }
   51320             : 
   51321           0 :         if (py_server_name == NULL) {
   51322           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   51323           0 :                 return false;
   51324             :         }
   51325           0 :         if (py_server_name == Py_None) {
   51326           0 :                 r->in.server_name = NULL;
   51327             :         } else {
   51328           0 :                 r->in.server_name = NULL;
   51329             :                 {
   51330           0 :                         const char *test_str;
   51331           0 :                         const char *talloc_str;
   51332           0 :                         PyObject *unicode = NULL;
   51333           0 :                         if (PyUnicode_Check(py_server_name)) {
   51334           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   51335           0 :                                 if (unicode == NULL) {
   51336           0 :                                         PyErr_NoMemory();
   51337           0 :                                         return false;
   51338             :                                 }
   51339           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51340           0 :                         } else if (PyBytes_Check(py_server_name)) {
   51341           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   51342             :                         } else {
   51343           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   51344           0 :                                 return false;
   51345             :                         }
   51346           0 :                         talloc_str = talloc_strdup(r, test_str);
   51347           0 :                         if (unicode != NULL) {
   51348           0 :                                 Py_DECREF(unicode);
   51349             :                         }
   51350           0 :                         if (talloc_str == NULL) {
   51351           0 :                                 PyErr_NoMemory();
   51352           0 :                                 return false;
   51353             :                         }
   51354           0 :                         r->in.server_name = talloc_str;
   51355             :                 }
   51356             :         }
   51357           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   51358           0 :         r->in.count = PyList_GET_SIZE(py_addresses);
   51359           0 :         if (py_addresses == NULL) {
   51360           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.addresses");
   51361           0 :                 return false;
   51362             :         }
   51363           0 :         r->in.addresses = talloc_ptrtype(r, r->in.addresses);
   51364           0 :         if (r->in.addresses == NULL) {
   51365           0 :                 PyErr_NoMemory();
   51366           0 :                 return false;
   51367             :         }
   51368           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   51369             :         {
   51370           0 :                 int addresses_cntr_1;
   51371           0 :                 r->in.addresses = talloc_array_ptrtype(r, r->in.addresses, PyList_GET_SIZE(py_addresses));
   51372           0 :                 if (!r->in.addresses) { return false; }
   51373           0 :                 talloc_set_name_const(r->in.addresses, "ARRAY: r->in.addresses");
   51374           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(py_addresses); addresses_cntr_1++) {
   51375           0 :                         if (PyList_GET_ITEM(py_addresses, addresses_cntr_1) == NULL) {
   51376           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.addresses[addresses_cntr_1]");
   51377           0 :                                 return false;
   51378             :                         }
   51379           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(py_addresses, addresses_cntr_1), return false;);
   51380           0 :                         if (talloc_reference(r->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_addresses, addresses_cntr_1))) == NULL) {
   51381           0 :                                 PyErr_NoMemory();
   51382           0 :                                 return false;
   51383             :                         }
   51384           0 :                         r->in.addresses[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(py_addresses, addresses_cntr_1));
   51385             :                 }
   51386             :         }
   51387           0 :         return true;
   51388             : }
   51389             : 
   51390           0 : static PyObject *unpack_py_netr_DsRAddressToSitenamesW_args_out(struct netr_DsRAddressToSitenamesW *r)
   51391             : {
   51392           0 :         PyObject *result;
   51393           0 :         PyObject *py_ctr;
   51394           0 :         if (*r->out.ctr == NULL) {
   51395           0 :                 py_ctr = Py_None;
   51396           0 :                 Py_INCREF(py_ctr);
   51397             :         } else {
   51398           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesWCtr_Type, *r->out.ctr, *r->out.ctr);
   51399             :         }
   51400           0 :         result = py_ctr;
   51401           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   51402           0 :                 PyErr_SetWERROR(r->out.result);
   51403           0 :                 return NULL;
   51404             :         }
   51405             : 
   51406           0 :         return result;
   51407             : }
   51408             : 
   51409             : 
   51410           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_server_unc(PyObject *obj, void *closure)
   51411             : {
   51412           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51413           0 :         PyObject *py_server_unc;
   51414           0 :         if (object->in.server_unc == NULL) {
   51415           0 :                 Py_RETURN_NONE;
   51416             :         }
   51417           0 :         if (object->in.server_unc == NULL) {
   51418           0 :                 py_server_unc = Py_None;
   51419           0 :                 Py_INCREF(py_server_unc);
   51420             :         } else {
   51421           0 :                 if (object->in.server_unc == NULL) {
   51422           0 :                         py_server_unc = Py_None;
   51423           0 :                         Py_INCREF(py_server_unc);
   51424             :                 } else {
   51425           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   51426             :                 }
   51427             :         }
   51428           0 :         return py_server_unc;
   51429             : }
   51430             : 
   51431           0 : static int py_netr_DsRGetDCNameEx2_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   51432             : {
   51433           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51434           0 :         if (value == NULL) {
   51435           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   51436           0 :                 return -1;
   51437             :         }
   51438           0 :         if (value == Py_None) {
   51439           0 :                 object->in.server_unc = NULL;
   51440             :         } else {
   51441           0 :                 object->in.server_unc = NULL;
   51442             :                 {
   51443           0 :                         const char *test_str;
   51444           0 :                         const char *talloc_str;
   51445           0 :                         PyObject *unicode = NULL;
   51446           0 :                         if (PyUnicode_Check(value)) {
   51447           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51448           0 :                                 if (unicode == NULL) {
   51449           0 :                                         PyErr_NoMemory();
   51450           0 :                                         return -1;
   51451             :                                 }
   51452           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51453           0 :                         } else if (PyBytes_Check(value)) {
   51454           0 :                                 test_str = PyBytes_AS_STRING(value);
   51455             :                         } else {
   51456           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51457           0 :                                 return -1;
   51458             :                         }
   51459           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51460           0 :                         if (unicode != NULL) {
   51461           0 :                                 Py_DECREF(unicode);
   51462             :                         }
   51463           0 :                         if (talloc_str == NULL) {
   51464           0 :                                 PyErr_NoMemory();
   51465           0 :                                 return -1;
   51466             :                         }
   51467           0 :                         object->in.server_unc = talloc_str;
   51468             :                 }
   51469             :         }
   51470           0 :         return 0;
   51471             : }
   51472             : 
   51473           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_client_account(PyObject *obj, void *closure)
   51474             : {
   51475           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51476           0 :         PyObject *py_client_account;
   51477           0 :         if (object->in.client_account == NULL) {
   51478           0 :                 Py_RETURN_NONE;
   51479             :         }
   51480           0 :         if (object->in.client_account == NULL) {
   51481           0 :                 py_client_account = Py_None;
   51482           0 :                 Py_INCREF(py_client_account);
   51483             :         } else {
   51484           0 :                 if (object->in.client_account == NULL) {
   51485           0 :                         py_client_account = Py_None;
   51486           0 :                         Py_INCREF(py_client_account);
   51487             :                 } else {
   51488           0 :                         py_client_account = PyUnicode_Decode(object->in.client_account, strlen(object->in.client_account), "utf-8", "ignore");
   51489             :                 }
   51490             :         }
   51491           0 :         return py_client_account;
   51492             : }
   51493             : 
   51494           0 : static int py_netr_DsRGetDCNameEx2_in_set_client_account(PyObject *py_obj, PyObject *value, void *closure)
   51495             : {
   51496           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51497           0 :         if (value == NULL) {
   51498           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_account");
   51499           0 :                 return -1;
   51500             :         }
   51501           0 :         if (value == Py_None) {
   51502           0 :                 object->in.client_account = NULL;
   51503             :         } else {
   51504           0 :                 object->in.client_account = NULL;
   51505             :                 {
   51506           0 :                         const char *test_str;
   51507           0 :                         const char *talloc_str;
   51508           0 :                         PyObject *unicode = NULL;
   51509           0 :                         if (PyUnicode_Check(value)) {
   51510           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51511           0 :                                 if (unicode == NULL) {
   51512           0 :                                         PyErr_NoMemory();
   51513           0 :                                         return -1;
   51514             :                                 }
   51515           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51516           0 :                         } else if (PyBytes_Check(value)) {
   51517           0 :                                 test_str = PyBytes_AS_STRING(value);
   51518             :                         } else {
   51519           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51520           0 :                                 return -1;
   51521             :                         }
   51522           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51523           0 :                         if (unicode != NULL) {
   51524           0 :                                 Py_DECREF(unicode);
   51525             :                         }
   51526           0 :                         if (talloc_str == NULL) {
   51527           0 :                                 PyErr_NoMemory();
   51528           0 :                                 return -1;
   51529             :                         }
   51530           0 :                         object->in.client_account = talloc_str;
   51531             :                 }
   51532             :         }
   51533           0 :         return 0;
   51534             : }
   51535             : 
   51536           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_mask(PyObject *obj, void *closure)
   51537             : {
   51538           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51539           0 :         PyObject *py_mask;
   51540           0 :         py_mask = PyLong_FromUnsignedLongLong((uint32_t)object->in.mask);
   51541           0 :         return py_mask;
   51542             : }
   51543             : 
   51544           0 : static int py_netr_DsRGetDCNameEx2_in_set_mask(PyObject *py_obj, PyObject *value, void *closure)
   51545             : {
   51546           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51547           0 :         if (value == NULL) {
   51548           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.mask");
   51549           0 :                 return -1;
   51550             :         }
   51551             :         {
   51552           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.mask));
   51553           0 :                 if (PyLong_Check(value)) {
   51554           0 :                         unsigned long long test_var;
   51555           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51556           0 :                         if (PyErr_Occurred() != NULL) {
   51557           0 :                                 return -1;
   51558             :                         }
   51559           0 :                         if (test_var > uint_max) {
   51560           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51561             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51562           0 :                                 return -1;
   51563             :                         }
   51564           0 :                         object->in.mask = test_var;
   51565             :                 } else {
   51566           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51567             :                           PyLong_Type.tp_name);
   51568           0 :                         return -1;
   51569             :                 }
   51570             :         }
   51571           0 :         return 0;
   51572             : }
   51573             : 
   51574           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_domain_name(PyObject *obj, void *closure)
   51575             : {
   51576           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51577           0 :         PyObject *py_domain_name;
   51578           0 :         if (object->in.domain_name == NULL) {
   51579           0 :                 Py_RETURN_NONE;
   51580             :         }
   51581           0 :         if (object->in.domain_name == NULL) {
   51582           0 :                 py_domain_name = Py_None;
   51583           0 :                 Py_INCREF(py_domain_name);
   51584             :         } else {
   51585           0 :                 if (object->in.domain_name == NULL) {
   51586           0 :                         py_domain_name = Py_None;
   51587           0 :                         Py_INCREF(py_domain_name);
   51588             :                 } else {
   51589           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   51590             :                 }
   51591             :         }
   51592           0 :         return py_domain_name;
   51593             : }
   51594             : 
   51595           0 : static int py_netr_DsRGetDCNameEx2_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   51596             : {
   51597           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51598           0 :         if (value == NULL) {
   51599           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   51600           0 :                 return -1;
   51601             :         }
   51602           0 :         if (value == Py_None) {
   51603           0 :                 object->in.domain_name = NULL;
   51604             :         } else {
   51605           0 :                 object->in.domain_name = NULL;
   51606             :                 {
   51607           0 :                         const char *test_str;
   51608           0 :                         const char *talloc_str;
   51609           0 :                         PyObject *unicode = NULL;
   51610           0 :                         if (PyUnicode_Check(value)) {
   51611           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51612           0 :                                 if (unicode == NULL) {
   51613           0 :                                         PyErr_NoMemory();
   51614           0 :                                         return -1;
   51615             :                                 }
   51616           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51617           0 :                         } else if (PyBytes_Check(value)) {
   51618           0 :                                 test_str = PyBytes_AS_STRING(value);
   51619             :                         } else {
   51620           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51621           0 :                                 return -1;
   51622             :                         }
   51623           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51624           0 :                         if (unicode != NULL) {
   51625           0 :                                 Py_DECREF(unicode);
   51626             :                         }
   51627           0 :                         if (talloc_str == NULL) {
   51628           0 :                                 PyErr_NoMemory();
   51629           0 :                                 return -1;
   51630             :                         }
   51631           0 :                         object->in.domain_name = talloc_str;
   51632             :                 }
   51633             :         }
   51634           0 :         return 0;
   51635             : }
   51636             : 
   51637           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_domain_guid(PyObject *obj, void *closure)
   51638             : {
   51639           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51640           0 :         PyObject *py_domain_guid;
   51641           0 :         if (object->in.domain_guid == NULL) {
   51642           0 :                 Py_RETURN_NONE;
   51643             :         }
   51644           0 :         if (object->in.domain_guid == NULL) {
   51645           0 :                 py_domain_guid = Py_None;
   51646           0 :                 Py_INCREF(py_domain_guid);
   51647             :         } else {
   51648           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   51649             :         }
   51650           0 :         return py_domain_guid;
   51651             : }
   51652             : 
   51653           0 : static int py_netr_DsRGetDCNameEx2_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   51654             : {
   51655           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51656           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   51657           0 :         if (value == NULL) {
   51658           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   51659           0 :                 return -1;
   51660             :         }
   51661           0 :         if (value == Py_None) {
   51662           0 :                 object->in.domain_guid = NULL;
   51663             :         } else {
   51664           0 :                 object->in.domain_guid = NULL;
   51665           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   51666           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   51667           0 :                         PyErr_NoMemory();
   51668           0 :                         return -1;
   51669             :                 }
   51670           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   51671             :         }
   51672           0 :         return 0;
   51673             : }
   51674             : 
   51675           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_site_name(PyObject *obj, void *closure)
   51676             : {
   51677           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51678           0 :         PyObject *py_site_name;
   51679           0 :         if (object->in.site_name == NULL) {
   51680           0 :                 Py_RETURN_NONE;
   51681             :         }
   51682           0 :         if (object->in.site_name == NULL) {
   51683           0 :                 py_site_name = Py_None;
   51684           0 :                 Py_INCREF(py_site_name);
   51685             :         } else {
   51686           0 :                 if (object->in.site_name == NULL) {
   51687           0 :                         py_site_name = Py_None;
   51688           0 :                         Py_INCREF(py_site_name);
   51689             :                 } else {
   51690           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   51691             :                 }
   51692             :         }
   51693           0 :         return py_site_name;
   51694             : }
   51695             : 
   51696           0 : static int py_netr_DsRGetDCNameEx2_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   51697             : {
   51698           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51699           0 :         if (value == NULL) {
   51700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   51701           0 :                 return -1;
   51702             :         }
   51703           0 :         if (value == Py_None) {
   51704           0 :                 object->in.site_name = NULL;
   51705             :         } else {
   51706           0 :                 object->in.site_name = NULL;
   51707             :                 {
   51708           0 :                         const char *test_str;
   51709           0 :                         const char *talloc_str;
   51710           0 :                         PyObject *unicode = NULL;
   51711           0 :                         if (PyUnicode_Check(value)) {
   51712           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51713           0 :                                 if (unicode == NULL) {
   51714           0 :                                         PyErr_NoMemory();
   51715           0 :                                         return -1;
   51716             :                                 }
   51717           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51718           0 :                         } else if (PyBytes_Check(value)) {
   51719           0 :                                 test_str = PyBytes_AS_STRING(value);
   51720             :                         } else {
   51721           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51722           0 :                                 return -1;
   51723             :                         }
   51724           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51725           0 :                         if (unicode != NULL) {
   51726           0 :                                 Py_DECREF(unicode);
   51727             :                         }
   51728           0 :                         if (talloc_str == NULL) {
   51729           0 :                                 PyErr_NoMemory();
   51730           0 :                                 return -1;
   51731             :                         }
   51732           0 :                         object->in.site_name = talloc_str;
   51733             :                 }
   51734             :         }
   51735           0 :         return 0;
   51736             : }
   51737             : 
   51738           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_flags(PyObject *obj, void *closure)
   51739             : {
   51740           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51741           0 :         PyObject *py_flags;
   51742           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   51743           0 :         return py_flags;
   51744             : }
   51745             : 
   51746           0 : static int py_netr_DsRGetDCNameEx2_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   51747             : {
   51748           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51749           0 :         if (value == NULL) {
   51750           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   51751           0 :                 return -1;
   51752             :         }
   51753             :         {
   51754           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   51755           0 :                 if (PyLong_Check(value)) {
   51756           0 :                         unsigned long long test_var;
   51757           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51758           0 :                         if (PyErr_Occurred() != NULL) {
   51759           0 :                                 return -1;
   51760             :                         }
   51761           0 :                         if (test_var > uint_max) {
   51762           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51763             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51764           0 :                                 return -1;
   51765             :                         }
   51766           0 :                         object->in.flags = test_var;
   51767             :                 } else {
   51768           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51769             :                           PyLong_Type.tp_name);
   51770           0 :                         return -1;
   51771             :                 }
   51772             :         }
   51773           0 :         return 0;
   51774             : }
   51775             : 
   51776           0 : static PyObject *py_netr_DsRGetDCNameEx2_out_get_info(PyObject *obj, void *closure)
   51777             : {
   51778           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51779           0 :         PyObject *py_info;
   51780           0 :         if (object->out.info == NULL) {
   51781           0 :                 Py_RETURN_NONE;
   51782             :         }
   51783           0 :         if (*object->out.info == NULL) {
   51784           0 :                 py_info = Py_None;
   51785           0 :                 Py_INCREF(py_info);
   51786             :         } else {
   51787           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
   51788             :         }
   51789           0 :         return py_info;
   51790             : }
   51791             : 
   51792           0 : static int py_netr_DsRGetDCNameEx2_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   51793             : {
   51794           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51795           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   51796           0 :         if (value == NULL) {
   51797           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   51798           0 :                 return -1;
   51799             :         }
   51800           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   51801           0 :         if (object->out.info == NULL) {
   51802           0 :                 PyErr_NoMemory();
   51803           0 :                 return -1;
   51804             :         }
   51805           0 :         if (value == Py_None) {
   51806           0 :                 *object->out.info = NULL;
   51807             :         } else {
   51808           0 :                 *object->out.info = NULL;
   51809           0 :                 PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
   51810           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   51811           0 :                         PyErr_NoMemory();
   51812           0 :                         return -1;
   51813             :                 }
   51814           0 :                 *object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   51815             :         }
   51816           0 :         return 0;
   51817             : }
   51818             : 
   51819           0 : static PyObject *py_netr_DsRGetDCNameEx2_get_result(PyObject *obj, void *closure)
   51820             : {
   51821           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51822           0 :         PyObject *py_result;
   51823           0 :         py_result = PyErr_FromWERROR(object->out.result);
   51824           0 :         return py_result;
   51825             : }
   51826             : 
   51827           0 : static int py_netr_DsRGetDCNameEx2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   51828             : {
   51829           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51830           0 :         if (value == NULL) {
   51831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   51832           0 :                 return -1;
   51833             :         }
   51834           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   51835           0 :         return 0;
   51836             : }
   51837             : 
   51838             : static PyGetSetDef py_netr_DsRGetDCNameEx2_getsetters[] = {
   51839             :         {
   51840             :                 .name = discard_const_p(char, "in_server_unc"),
   51841             :                 .get = py_netr_DsRGetDCNameEx2_in_get_server_unc,
   51842             :                 .set = py_netr_DsRGetDCNameEx2_in_set_server_unc,
   51843             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51844             :         },
   51845             :         {
   51846             :                 .name = discard_const_p(char, "in_client_account"),
   51847             :                 .get = py_netr_DsRGetDCNameEx2_in_get_client_account,
   51848             :                 .set = py_netr_DsRGetDCNameEx2_in_set_client_account,
   51849             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51850             :         },
   51851             :         {
   51852             :                 .name = discard_const_p(char, "in_mask"),
   51853             :                 .get = py_netr_DsRGetDCNameEx2_in_get_mask,
   51854             :                 .set = py_netr_DsRGetDCNameEx2_in_set_mask,
   51855             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
   51856             :         },
   51857             :         {
   51858             :                 .name = discard_const_p(char, "in_domain_name"),
   51859             :                 .get = py_netr_DsRGetDCNameEx2_in_get_domain_name,
   51860             :                 .set = py_netr_DsRGetDCNameEx2_in_set_domain_name,
   51861             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51862             :         },
   51863             :         {
   51864             :                 .name = discard_const_p(char, "in_domain_guid"),
   51865             :                 .get = py_netr_DsRGetDCNameEx2_in_get_domain_guid,
   51866             :                 .set = py_netr_DsRGetDCNameEx2_in_set_domain_guid,
   51867             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   51868             :         },
   51869             :         {
   51870             :                 .name = discard_const_p(char, "in_site_name"),
   51871             :                 .get = py_netr_DsRGetDCNameEx2_in_get_site_name,
   51872             :                 .set = py_netr_DsRGetDCNameEx2_in_set_site_name,
   51873             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51874             :         },
   51875             :         {
   51876             :                 .name = discard_const_p(char, "in_flags"),
   51877             :                 .get = py_netr_DsRGetDCNameEx2_in_get_flags,
   51878             :                 .set = py_netr_DsRGetDCNameEx2_in_set_flags,
   51879             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
   51880             :         },
   51881             :         {
   51882             :                 .name = discard_const_p(char, "out_info"),
   51883             :                 .get = py_netr_DsRGetDCNameEx2_out_get_info,
   51884             :                 .set = py_netr_DsRGetDCNameEx2_out_set_info,
   51885             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   51886             :         },
   51887             :         {
   51888             :                 .name = discard_const_p(char, "result"),
   51889             :                 .get = py_netr_DsRGetDCNameEx2_get_result,
   51890             :                 .set = py_netr_DsRGetDCNameEx2_set_result,
   51891             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   51892             :         },
   51893             :         { .name = NULL }
   51894             : };
   51895             : 
   51896           0 : static PyObject *py_netr_DsRGetDCNameEx2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   51897             : {
   51898           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetDCNameEx2, type);
   51899           0 :         struct netr_DsRGetDCNameEx2 *_self = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(self);
   51900           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   51901             :         /* a pointer to a NULL pointer */
   51902           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   51903           0 :         return self;
   51904             : }
   51905             : 
   51906           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   51907             : {
   51908             : 
   51909             : 
   51910           0 :         return PyLong_FromLong(34);
   51911             : }
   51912             : 
   51913           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   51914             : {
   51915           0 :         const struct ndr_interface_call *call = NULL;
   51916           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51917           0 :         PyObject *ret = NULL;
   51918           0 :         struct ndr_push *push = NULL;
   51919           0 :         DATA_BLOB blob;
   51920           0 :         enum ndr_err_code err;
   51921             : 
   51922           0 :         if (ndr_table_netlogon.num_calls < 35) {
   51923           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_pack");
   51924           0 :                 return NULL;
   51925             :         }
   51926           0 :         call = &ndr_table_netlogon.calls[34];
   51927             : 
   51928           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   51929           0 :         if (push == NULL) {
   51930           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51931           0 :                 return NULL;
   51932             :         }
   51933             : 
   51934           0 :         push->flags |= ndr_push_flags;
   51935             : 
   51936           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   51937           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51938           0 :                 TALLOC_FREE(push);
   51939           0 :                 PyErr_SetNdrError(err);
   51940           0 :                 return NULL;
   51941             :         }
   51942           0 :         blob = ndr_push_blob(push);
   51943           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   51944           0 :         TALLOC_FREE(push);
   51945           0 :         return ret;
   51946             : }
   51947             : 
   51948           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51949             : {
   51950           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51951           0 :         PyObject *bigendian_obj = NULL;
   51952           0 :         PyObject *ndr64_obj = NULL;
   51953           0 :         libndr_flags ndr_push_flags = 0;
   51954             : 
   51955           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   51956             :                 discard_const_p(char *, kwnames),
   51957             :                 &bigendian_obj,
   51958             :                 &ndr64_obj)) {
   51959           0 :                 return NULL;
   51960             :         }
   51961             : 
   51962           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51963           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51964             :         }
   51965           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51966           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51967             :         }
   51968             : 
   51969           0 :         return py_netr_DsRGetDCNameEx2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   51970             : }
   51971             : 
   51972           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51973             : {
   51974           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51975           0 :         PyObject *bigendian_obj = NULL;
   51976           0 :         PyObject *ndr64_obj = NULL;
   51977           0 :         libndr_flags ndr_push_flags = 0;
   51978             : 
   51979           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   51980             :                 discard_const_p(char *, kwnames),
   51981             :                 &bigendian_obj,
   51982             :                 &ndr64_obj)) {
   51983           0 :                 return NULL;
   51984             :         }
   51985             : 
   51986           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51987           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51988             :         }
   51989           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51990           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51991             :         }
   51992             : 
   51993           0 :         return py_netr_DsRGetDCNameEx2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   51994             : }
   51995             : 
   51996           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   51997             : {
   51998           0 :         const struct ndr_interface_call *call = NULL;
   51999           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   52000           0 :         struct ndr_pull *pull = NULL;
   52001           0 :         enum ndr_err_code err;
   52002             : 
   52003           0 :         if (ndr_table_netlogon.num_calls < 35) {
   52004           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_unpack");
   52005           0 :                 return NULL;
   52006             :         }
   52007           0 :         call = &ndr_table_netlogon.calls[34];
   52008             : 
   52009           0 :         pull = ndr_pull_init_blob(blob, object);
   52010           0 :         if (pull == NULL) {
   52011           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52012           0 :                 return NULL;
   52013             :         }
   52014             : 
   52015           0 :         pull->flags |= ndr_pull_flags;
   52016             : 
   52017           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   52018           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52019           0 :                 TALLOC_FREE(pull);
   52020           0 :                 PyErr_SetNdrError(err);
   52021           0 :                 return NULL;
   52022             :         }
   52023           0 :         if (!allow_remaining) {
   52024           0 :                 uint32_t highest_ofs;
   52025             : 
   52026           0 :                 if (pull->offset > pull->relative_highest_offset) {
   52027           0 :                         highest_ofs = pull->offset;
   52028             :                 } else {
   52029           0 :                         highest_ofs = pull->relative_highest_offset;
   52030             :                 }
   52031           0 :                 if (highest_ofs < pull->data_size) {
   52032           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   52033             :                                 "not all bytes consumed ofs[%u] size[%u]",
   52034             :                                 highest_ofs, pull->data_size);
   52035           0 :                         TALLOC_FREE(pull);
   52036           0 :                         PyErr_SetNdrError(err);
   52037           0 :                         return NULL;
   52038             :                 }
   52039             :         }
   52040             : 
   52041           0 :         TALLOC_FREE(pull);
   52042           0 :         Py_RETURN_NONE;
   52043             : }
   52044             : 
   52045           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52046             : {
   52047           0 :         DATA_BLOB blob;
   52048           0 :         Py_ssize_t blob_length = 0;
   52049           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52050           0 :         PyObject *bigendian_obj = NULL;
   52051           0 :         PyObject *ndr64_obj = NULL;
   52052           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52053           0 :         PyObject *allow_remaining_obj = NULL;
   52054           0 :         bool allow_remaining = false;
   52055             : 
   52056           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   52057             :                 discard_const_p(char *, kwnames),
   52058             :                 &blob.data, &blob_length,
   52059             :                 &bigendian_obj,
   52060             :                 &ndr64_obj,
   52061             :                 &allow_remaining_obj)) {
   52062           0 :                 return NULL;
   52063             :         }
   52064           0 :         blob.length = blob_length;
   52065             : 
   52066           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52067           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52068             :         }
   52069           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52070           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52071             :         }
   52072             : 
   52073           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52074           0 :                 allow_remaining = true;
   52075             :         }
   52076             : 
   52077           0 :         return py_netr_DsRGetDCNameEx2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   52078             : }
   52079             : 
   52080           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52081             : {
   52082           0 :         DATA_BLOB blob;
   52083           0 :         Py_ssize_t blob_length = 0;
   52084           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52085           0 :         PyObject *bigendian_obj = NULL;
   52086           0 :         PyObject *ndr64_obj = NULL;
   52087           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52088           0 :         PyObject *allow_remaining_obj = NULL;
   52089           0 :         bool allow_remaining = false;
   52090             : 
   52091           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   52092             :                 discard_const_p(char *, kwnames),
   52093             :                 &blob.data, &blob_length,
   52094             :                 &bigendian_obj,
   52095             :                 &ndr64_obj,
   52096             :                 &allow_remaining_obj)) {
   52097           0 :                 return NULL;
   52098             :         }
   52099           0 :         blob.length = blob_length;
   52100             : 
   52101           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52102           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52103             :         }
   52104           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52105           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52106             :         }
   52107             : 
   52108           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52109           0 :                 allow_remaining = true;
   52110             :         }
   52111             : 
   52112           0 :         return py_netr_DsRGetDCNameEx2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   52113             : }
   52114             : 
   52115           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   52116             : {
   52117           0 :         const struct ndr_interface_call *call = NULL;
   52118           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   52119           0 :         PyObject *ret;
   52120           0 :         char *retstr;
   52121             : 
   52122           0 :         if (ndr_table_netlogon.num_calls < 35) {
   52123           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_print");
   52124           0 :                 return NULL;
   52125             :         }
   52126           0 :         call = &ndr_table_netlogon.calls[34];
   52127             : 
   52128           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   52129           0 :         ret = PyUnicode_FromString(retstr);
   52130           0 :         TALLOC_FREE(retstr);
   52131             : 
   52132           0 :         return ret;
   52133             : }
   52134             : 
   52135           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52136             : {
   52137           0 :         return py_netr_DsRGetDCNameEx2_ndr_print(py_obj, "netr_DsRGetDCNameEx2_in", NDR_IN);
   52138             : }
   52139             : 
   52140           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52141             : {
   52142           0 :         return py_netr_DsRGetDCNameEx2_ndr_print(py_obj, "netr_DsRGetDCNameEx2_out", NDR_OUT);
   52143             : }
   52144             : 
   52145             : static PyMethodDef py_netr_DsRGetDCNameEx2_methods[] = {
   52146             :         { "opnum", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_opnum, METH_NOARGS|METH_CLASS,
   52147             :                 "netlogon.netr_DsRGetDCNameEx2.opnum() -> 34 (0x22) " },
   52148             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   52149             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   52150             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   52151             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   52152             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   52153             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   52154             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   52155             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   52156             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   52157             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   52158             :         { NULL, NULL, 0, NULL }
   52159             : };
   52160             : 
   52161             : 
   52162             : static PyTypeObject netr_DsRGetDCNameEx2_Type = {
   52163             :         PyVarObject_HEAD_INIT(NULL, 0)
   52164             :         .tp_name = "netlogon.netr_DsRGetDCNameEx2",
   52165             :         .tp_getset = py_netr_DsRGetDCNameEx2_getsetters,
   52166             :         .tp_methods = py_netr_DsRGetDCNameEx2_methods,
   52167             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   52168             :         .tp_new = py_netr_DsRGetDCNameEx2_new,
   52169             : };
   52170             : 
   52171         133 : static bool pack_py_netr_DsRGetDCNameEx2_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCNameEx2 *r)
   52172             : {
   52173           2 :         PyObject *py_server_unc;
   52174           2 :         PyObject *py_client_account;
   52175           2 :         PyObject *py_mask;
   52176           2 :         PyObject *py_domain_name;
   52177           2 :         PyObject *py_domain_guid;
   52178           2 :         PyObject *py_site_name;
   52179           2 :         PyObject *py_flags;
   52180         133 :         const char *kwnames[] = {
   52181             :                 "server_unc", "client_account", "mask", "domain_name", "domain_guid", "site_name", "flags", NULL
   52182             :         };
   52183             : 
   52184         133 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:netr_DsRGetDCNameEx2", discard_const_p(char *, kwnames), &py_server_unc, &py_client_account, &py_mask, &py_domain_name, &py_domain_guid, &py_site_name, &py_flags)) {
   52185           0 :                 return false;
   52186             :         }
   52187             : 
   52188         133 :         if (py_server_unc == NULL) {
   52189           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   52190           0 :                 return false;
   52191             :         }
   52192         133 :         if (py_server_unc == Py_None) {
   52193           0 :                 r->in.server_unc = NULL;
   52194             :         } else {
   52195         133 :                 r->in.server_unc = NULL;
   52196             :                 {
   52197           2 :                         const char *test_str;
   52198           2 :                         const char *talloc_str;
   52199         133 :                         PyObject *unicode = NULL;
   52200         133 :                         if (PyUnicode_Check(py_server_unc)) {
   52201         133 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   52202         133 :                                 if (unicode == NULL) {
   52203           0 :                                         PyErr_NoMemory();
   52204           0 :                                         return false;
   52205             :                                 }
   52206         133 :                                 test_str = PyBytes_AS_STRING(unicode);
   52207           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   52208           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   52209             :                         } else {
   52210           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   52211           0 :                                 return false;
   52212             :                         }
   52213         133 :                         talloc_str = talloc_strdup(r, test_str);
   52214         133 :                         if (unicode != NULL) {
   52215         133 :                                 Py_DECREF(unicode);
   52216             :                         }
   52217         133 :                         if (talloc_str == NULL) {
   52218           0 :                                 PyErr_NoMemory();
   52219           0 :                                 return false;
   52220             :                         }
   52221         133 :                         r->in.server_unc = talloc_str;
   52222             :                 }
   52223             :         }
   52224         133 :         if (py_client_account == NULL) {
   52225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_account");
   52226           0 :                 return false;
   52227             :         }
   52228         133 :         if (py_client_account == Py_None) {
   52229         133 :                 r->in.client_account = NULL;
   52230             :         } else {
   52231           0 :                 r->in.client_account = NULL;
   52232             :                 {
   52233           0 :                         const char *test_str;
   52234           0 :                         const char *talloc_str;
   52235           0 :                         PyObject *unicode = NULL;
   52236           0 :                         if (PyUnicode_Check(py_client_account)) {
   52237           0 :                                 unicode = PyUnicode_AsEncodedString(py_client_account, "utf-8", "ignore");
   52238           0 :                                 if (unicode == NULL) {
   52239           0 :                                         PyErr_NoMemory();
   52240           0 :                                         return false;
   52241             :                                 }
   52242           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52243           0 :                         } else if (PyBytes_Check(py_client_account)) {
   52244           0 :                                 test_str = PyBytes_AS_STRING(py_client_account);
   52245             :                         } else {
   52246           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_account)->tp_name);
   52247           0 :                                 return false;
   52248             :                         }
   52249           0 :                         talloc_str = talloc_strdup(r, test_str);
   52250           0 :                         if (unicode != NULL) {
   52251           0 :                                 Py_DECREF(unicode);
   52252             :                         }
   52253           0 :                         if (talloc_str == NULL) {
   52254           0 :                                 PyErr_NoMemory();
   52255           0 :                                 return false;
   52256             :                         }
   52257           0 :                         r->in.client_account = talloc_str;
   52258             :                 }
   52259             :         }
   52260         133 :         if (py_mask == NULL) {
   52261           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.mask");
   52262           0 :                 return false;
   52263             :         }
   52264             :         {
   52265         133 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.mask));
   52266         133 :                 if (PyLong_Check(py_mask)) {
   52267           2 :                         unsigned long long test_var;
   52268         133 :                         test_var = PyLong_AsUnsignedLongLong(py_mask);
   52269         133 :                         if (PyErr_Occurred() != NULL) {
   52270           0 :                                 return false;
   52271             :                         }
   52272         133 :                         if (test_var > uint_max) {
   52273           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52274             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52275           0 :                                 return false;
   52276             :                         }
   52277         133 :                         r->in.mask = test_var;
   52278             :                 } else {
   52279           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52280             :                           PyLong_Type.tp_name);
   52281           0 :                         return false;
   52282             :                 }
   52283             :         }
   52284         133 :         if (py_domain_name == NULL) {
   52285           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   52286           0 :                 return false;
   52287             :         }
   52288         133 :         if (py_domain_name == Py_None) {
   52289         121 :                 r->in.domain_name = NULL;
   52290             :         } else {
   52291          12 :                 r->in.domain_name = NULL;
   52292             :                 {
   52293           0 :                         const char *test_str;
   52294           0 :                         const char *talloc_str;
   52295          12 :                         PyObject *unicode = NULL;
   52296          12 :                         if (PyUnicode_Check(py_domain_name)) {
   52297          12 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   52298          12 :                                 if (unicode == NULL) {
   52299           0 :                                         PyErr_NoMemory();
   52300           0 :                                         return false;
   52301             :                                 }
   52302          12 :                                 test_str = PyBytes_AS_STRING(unicode);
   52303           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   52304           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   52305             :                         } else {
   52306           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   52307           0 :                                 return false;
   52308             :                         }
   52309          12 :                         talloc_str = talloc_strdup(r, test_str);
   52310          12 :                         if (unicode != NULL) {
   52311          12 :                                 Py_DECREF(unicode);
   52312             :                         }
   52313          12 :                         if (talloc_str == NULL) {
   52314           0 :                                 PyErr_NoMemory();
   52315           0 :                                 return false;
   52316             :                         }
   52317          12 :                         r->in.domain_name = talloc_str;
   52318             :                 }
   52319             :         }
   52320         133 :         if (py_domain_guid == NULL) {
   52321           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   52322           0 :                 return false;
   52323             :         }
   52324         133 :         if (py_domain_guid == Py_None) {
   52325         133 :                 r->in.domain_guid = NULL;
   52326             :         } else {
   52327           0 :                 r->in.domain_guid = NULL;
   52328           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   52329           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   52330           0 :                         PyErr_NoMemory();
   52331           0 :                         return false;
   52332             :                 }
   52333           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   52334             :         }
   52335         133 :         if (py_site_name == NULL) {
   52336           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   52337           0 :                 return false;
   52338             :         }
   52339         133 :         if (py_site_name == Py_None) {
   52340         129 :                 r->in.site_name = NULL;
   52341             :         } else {
   52342           4 :                 r->in.site_name = NULL;
   52343             :                 {
   52344           0 :                         const char *test_str;
   52345           0 :                         const char *talloc_str;
   52346           4 :                         PyObject *unicode = NULL;
   52347           4 :                         if (PyUnicode_Check(py_site_name)) {
   52348           4 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   52349           4 :                                 if (unicode == NULL) {
   52350           0 :                                         PyErr_NoMemory();
   52351           0 :                                         return false;
   52352             :                                 }
   52353           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   52354           0 :                         } else if (PyBytes_Check(py_site_name)) {
   52355           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   52356             :                         } else {
   52357           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   52358           0 :                                 return false;
   52359             :                         }
   52360           4 :                         talloc_str = talloc_strdup(r, test_str);
   52361           4 :                         if (unicode != NULL) {
   52362           4 :                                 Py_DECREF(unicode);
   52363             :                         }
   52364           4 :                         if (talloc_str == NULL) {
   52365           0 :                                 PyErr_NoMemory();
   52366           0 :                                 return false;
   52367             :                         }
   52368           4 :                         r->in.site_name = talloc_str;
   52369             :                 }
   52370             :         }
   52371         133 :         if (py_flags == NULL) {
   52372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   52373           0 :                 return false;
   52374             :         }
   52375             :         {
   52376         133 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   52377         133 :                 if (PyLong_Check(py_flags)) {
   52378           2 :                         unsigned long long test_var;
   52379         133 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   52380         133 :                         if (PyErr_Occurred() != NULL) {
   52381           0 :                                 return false;
   52382             :                         }
   52383         133 :                         if (test_var > uint_max) {
   52384           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52385             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52386           0 :                                 return false;
   52387             :                         }
   52388         133 :                         r->in.flags = test_var;
   52389             :                 } else {
   52390           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52391             :                           PyLong_Type.tp_name);
   52392           0 :                         return false;
   52393             :                 }
   52394             :         }
   52395         133 :         return true;
   52396             : }
   52397             : 
   52398         133 : static PyObject *unpack_py_netr_DsRGetDCNameEx2_args_out(struct netr_DsRGetDCNameEx2 *r)
   52399             : {
   52400           2 :         PyObject *result;
   52401           2 :         PyObject *py_info;
   52402         133 :         if (*r->out.info == NULL) {
   52403           0 :                 py_info = Py_None;
   52404           0 :                 Py_INCREF(py_info);
   52405             :         } else {
   52406         133 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
   52407             :         }
   52408         133 :         result = py_info;
   52409         133 :         if (!W_ERROR_IS_OK(r->out.result)) {
   52410           4 :                 PyErr_SetWERROR(r->out.result);
   52411           4 :                 return NULL;
   52412             :         }
   52413             : 
   52414         127 :         return result;
   52415             : }
   52416             : 
   52417             : 
   52418           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_in_get_server_name(PyObject *obj, void *closure)
   52419             : {
   52420           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(obj);
   52421           0 :         PyObject *py_server_name;
   52422           0 :         if (object->in.server_name == NULL) {
   52423           0 :                 Py_RETURN_NONE;
   52424             :         }
   52425           0 :         if (object->in.server_name == NULL) {
   52426           0 :                 py_server_name = Py_None;
   52427           0 :                 Py_INCREF(py_server_name);
   52428             :         } else {
   52429           0 :                 if (object->in.server_name == NULL) {
   52430           0 :                         py_server_name = Py_None;
   52431           0 :                         Py_INCREF(py_server_name);
   52432             :                 } else {
   52433           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   52434             :                 }
   52435             :         }
   52436           0 :         return py_server_name;
   52437             : }
   52438             : 
   52439           0 : static int py_netr_NetrEnumerateTrustedDomainsEx_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   52440             : {
   52441           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52442           0 :         if (value == NULL) {
   52443           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   52444           0 :                 return -1;
   52445             :         }
   52446           0 :         if (value == Py_None) {
   52447           0 :                 object->in.server_name = NULL;
   52448             :         } else {
   52449           0 :                 object->in.server_name = NULL;
   52450             :                 {
   52451           0 :                         const char *test_str;
   52452           0 :                         const char *talloc_str;
   52453           0 :                         PyObject *unicode = NULL;
   52454           0 :                         if (PyUnicode_Check(value)) {
   52455           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52456           0 :                                 if (unicode == NULL) {
   52457           0 :                                         PyErr_NoMemory();
   52458           0 :                                         return -1;
   52459             :                                 }
   52460           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52461           0 :                         } else if (PyBytes_Check(value)) {
   52462           0 :                                 test_str = PyBytes_AS_STRING(value);
   52463             :                         } else {
   52464           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52465           0 :                                 return -1;
   52466             :                         }
   52467           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52468           0 :                         if (unicode != NULL) {
   52469           0 :                                 Py_DECREF(unicode);
   52470             :                         }
   52471           0 :                         if (talloc_str == NULL) {
   52472           0 :                                 PyErr_NoMemory();
   52473           0 :                                 return -1;
   52474             :                         }
   52475           0 :                         object->in.server_name = talloc_str;
   52476             :                 }
   52477             :         }
   52478           0 :         return 0;
   52479             : }
   52480             : 
   52481           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_out_get_dom_trust_list(PyObject *obj, void *closure)
   52482             : {
   52483           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(obj);
   52484           0 :         PyObject *py_dom_trust_list;
   52485           0 :         if (object->out.dom_trust_list == NULL) {
   52486           0 :                 Py_RETURN_NONE;
   52487             :         }
   52488           0 :         py_dom_trust_list = pytalloc_reference_ex(&netr_DomainTrustList_Type, object->out.dom_trust_list, object->out.dom_trust_list);
   52489           0 :         return py_dom_trust_list;
   52490             : }
   52491             : 
   52492           0 : static int py_netr_NetrEnumerateTrustedDomainsEx_out_set_dom_trust_list(PyObject *py_obj, PyObject *value, void *closure)
   52493             : {
   52494           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52495           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dom_trust_list));
   52496           0 :         if (value == NULL) {
   52497           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dom_trust_list");
   52498           0 :                 return -1;
   52499             :         }
   52500           0 :         object->out.dom_trust_list = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dom_trust_list);
   52501           0 :         if (object->out.dom_trust_list == NULL) {
   52502           0 :                 PyErr_NoMemory();
   52503           0 :                 return -1;
   52504             :         }
   52505           0 :         PY_CHECK_TYPE(&netr_DomainTrustList_Type, value, return -1;);
   52506           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   52507           0 :                 PyErr_NoMemory();
   52508           0 :                 return -1;
   52509             :         }
   52510           0 :         object->out.dom_trust_list = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
   52511           0 :         return 0;
   52512             : }
   52513             : 
   52514           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_get_result(PyObject *obj, void *closure)
   52515             : {
   52516           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(obj);
   52517           0 :         PyObject *py_result;
   52518           0 :         py_result = PyErr_FromWERROR(object->out.result);
   52519           0 :         return py_result;
   52520             : }
   52521             : 
   52522           0 : static int py_netr_NetrEnumerateTrustedDomainsEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   52523             : {
   52524           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52525           0 :         if (value == NULL) {
   52526           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   52527           0 :                 return -1;
   52528             :         }
   52529           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   52530           0 :         return 0;
   52531             : }
   52532             : 
   52533             : static PyGetSetDef py_netr_NetrEnumerateTrustedDomainsEx_getsetters[] = {
   52534             :         {
   52535             :                 .name = discard_const_p(char, "in_server_name"),
   52536             :                 .get = py_netr_NetrEnumerateTrustedDomainsEx_in_get_server_name,
   52537             :                 .set = py_netr_NetrEnumerateTrustedDomainsEx_in_set_server_name,
   52538             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52539             :         },
   52540             :         {
   52541             :                 .name = discard_const_p(char, "out_dom_trust_list"),
   52542             :                 .get = py_netr_NetrEnumerateTrustedDomainsEx_out_get_dom_trust_list,
   52543             :                 .set = py_netr_NetrEnumerateTrustedDomainsEx_out_set_dom_trust_list,
   52544             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
   52545             :         },
   52546             :         {
   52547             :                 .name = discard_const_p(char, "result"),
   52548             :                 .get = py_netr_NetrEnumerateTrustedDomainsEx_get_result,
   52549             :                 .set = py_netr_NetrEnumerateTrustedDomainsEx_set_result,
   52550             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   52551             :         },
   52552             :         { .name = NULL }
   52553             : };
   52554             : 
   52555           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   52556             : {
   52557           0 :         PyObject *self = pytalloc_new(struct netr_NetrEnumerateTrustedDomainsEx, type);
   52558           0 :         struct netr_NetrEnumerateTrustedDomainsEx *_self = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(self);
   52559           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   52560           0 :         _self->out.dom_trust_list = talloc_zero(mem_ctx, struct netr_DomainTrustList);
   52561           0 :         return self;
   52562             : }
   52563             : 
   52564           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   52565             : {
   52566             : 
   52567             : 
   52568           0 :         return PyLong_FromLong(36);
   52569             : }
   52570             : 
   52571           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   52572             : {
   52573           0 :         const struct ndr_interface_call *call = NULL;
   52574           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52575           0 :         PyObject *ret = NULL;
   52576           0 :         struct ndr_push *push = NULL;
   52577           0 :         DATA_BLOB blob;
   52578           0 :         enum ndr_err_code err;
   52579             : 
   52580           0 :         if (ndr_table_netlogon.num_calls < 37) {
   52581           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack");
   52582           0 :                 return NULL;
   52583             :         }
   52584           0 :         call = &ndr_table_netlogon.calls[36];
   52585             : 
   52586           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   52587           0 :         if (push == NULL) {
   52588           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52589           0 :                 return NULL;
   52590             :         }
   52591             : 
   52592           0 :         push->flags |= ndr_push_flags;
   52593             : 
   52594           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   52595           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52596           0 :                 TALLOC_FREE(push);
   52597           0 :                 PyErr_SetNdrError(err);
   52598           0 :                 return NULL;
   52599             :         }
   52600           0 :         blob = ndr_push_blob(push);
   52601           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   52602           0 :         TALLOC_FREE(push);
   52603           0 :         return ret;
   52604             : }
   52605             : 
   52606           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52607             : {
   52608           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52609           0 :         PyObject *bigendian_obj = NULL;
   52610           0 :         PyObject *ndr64_obj = NULL;
   52611           0 :         libndr_flags ndr_push_flags = 0;
   52612             : 
   52613           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   52614             :                 discard_const_p(char *, kwnames),
   52615             :                 &bigendian_obj,
   52616             :                 &ndr64_obj)) {
   52617           0 :                 return NULL;
   52618             :         }
   52619             : 
   52620           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52621           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52622             :         }
   52623           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52624           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52625             :         }
   52626             : 
   52627           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   52628             : }
   52629             : 
   52630           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52631             : {
   52632           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52633           0 :         PyObject *bigendian_obj = NULL;
   52634           0 :         PyObject *ndr64_obj = NULL;
   52635           0 :         libndr_flags ndr_push_flags = 0;
   52636             : 
   52637           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   52638             :                 discard_const_p(char *, kwnames),
   52639             :                 &bigendian_obj,
   52640             :                 &ndr64_obj)) {
   52641           0 :                 return NULL;
   52642             :         }
   52643             : 
   52644           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52645           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52646             :         }
   52647           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52648           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52649             :         }
   52650             : 
   52651           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   52652             : }
   52653             : 
   52654           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   52655             : {
   52656           0 :         const struct ndr_interface_call *call = NULL;
   52657           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52658           0 :         struct ndr_pull *pull = NULL;
   52659           0 :         enum ndr_err_code err;
   52660             : 
   52661           0 :         if (ndr_table_netlogon.num_calls < 37) {
   52662           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack");
   52663           0 :                 return NULL;
   52664             :         }
   52665           0 :         call = &ndr_table_netlogon.calls[36];
   52666             : 
   52667           0 :         pull = ndr_pull_init_blob(blob, object);
   52668           0 :         if (pull == NULL) {
   52669           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52670           0 :                 return NULL;
   52671             :         }
   52672             : 
   52673           0 :         pull->flags |= ndr_pull_flags;
   52674             : 
   52675           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   52676           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52677           0 :                 TALLOC_FREE(pull);
   52678           0 :                 PyErr_SetNdrError(err);
   52679           0 :                 return NULL;
   52680             :         }
   52681           0 :         if (!allow_remaining) {
   52682           0 :                 uint32_t highest_ofs;
   52683             : 
   52684           0 :                 if (pull->offset > pull->relative_highest_offset) {
   52685           0 :                         highest_ofs = pull->offset;
   52686             :                 } else {
   52687           0 :                         highest_ofs = pull->relative_highest_offset;
   52688             :                 }
   52689           0 :                 if (highest_ofs < pull->data_size) {
   52690           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   52691             :                                 "not all bytes consumed ofs[%u] size[%u]",
   52692             :                                 highest_ofs, pull->data_size);
   52693           0 :                         TALLOC_FREE(pull);
   52694           0 :                         PyErr_SetNdrError(err);
   52695           0 :                         return NULL;
   52696             :                 }
   52697             :         }
   52698             : 
   52699           0 :         TALLOC_FREE(pull);
   52700           0 :         Py_RETURN_NONE;
   52701             : }
   52702             : 
   52703           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52704             : {
   52705           0 :         DATA_BLOB blob;
   52706           0 :         Py_ssize_t blob_length = 0;
   52707           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52708           0 :         PyObject *bigendian_obj = NULL;
   52709           0 :         PyObject *ndr64_obj = NULL;
   52710           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52711           0 :         PyObject *allow_remaining_obj = NULL;
   52712           0 :         bool allow_remaining = false;
   52713             : 
   52714           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   52715             :                 discard_const_p(char *, kwnames),
   52716             :                 &blob.data, &blob_length,
   52717             :                 &bigendian_obj,
   52718             :                 &ndr64_obj,
   52719             :                 &allow_remaining_obj)) {
   52720           0 :                 return NULL;
   52721             :         }
   52722           0 :         blob.length = blob_length;
   52723             : 
   52724           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52725           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52726             :         }
   52727           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52728           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52729             :         }
   52730             : 
   52731           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52732           0 :                 allow_remaining = true;
   52733             :         }
   52734             : 
   52735           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   52736             : }
   52737             : 
   52738           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52739             : {
   52740           0 :         DATA_BLOB blob;
   52741           0 :         Py_ssize_t blob_length = 0;
   52742           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52743           0 :         PyObject *bigendian_obj = NULL;
   52744           0 :         PyObject *ndr64_obj = NULL;
   52745           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52746           0 :         PyObject *allow_remaining_obj = NULL;
   52747           0 :         bool allow_remaining = false;
   52748             : 
   52749           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   52750             :                 discard_const_p(char *, kwnames),
   52751             :                 &blob.data, &blob_length,
   52752             :                 &bigendian_obj,
   52753             :                 &ndr64_obj,
   52754             :                 &allow_remaining_obj)) {
   52755           0 :                 return NULL;
   52756             :         }
   52757           0 :         blob.length = blob_length;
   52758             : 
   52759           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52760           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52761             :         }
   52762           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52763           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52764             :         }
   52765             : 
   52766           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52767           0 :                 allow_remaining = true;
   52768             :         }
   52769             : 
   52770           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   52771             : }
   52772             : 
   52773           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   52774             : {
   52775           0 :         const struct ndr_interface_call *call = NULL;
   52776           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52777           0 :         PyObject *ret;
   52778           0 :         char *retstr;
   52779             : 
   52780           0 :         if (ndr_table_netlogon.num_calls < 37) {
   52781           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_print");
   52782           0 :                 return NULL;
   52783             :         }
   52784           0 :         call = &ndr_table_netlogon.calls[36];
   52785             : 
   52786           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   52787           0 :         ret = PyUnicode_FromString(retstr);
   52788           0 :         TALLOC_FREE(retstr);
   52789             : 
   52790           0 :         return ret;
   52791             : }
   52792             : 
   52793           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52794             : {
   52795           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomainsEx_in", NDR_IN);
   52796             : }
   52797             : 
   52798           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52799             : {
   52800           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomainsEx_out", NDR_OUT);
   52801             : }
   52802             : 
   52803             : static PyMethodDef py_netr_NetrEnumerateTrustedDomainsEx_methods[] = {
   52804             :         { "opnum", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   52805             :                 "netlogon.netr_NetrEnumerateTrustedDomainsEx.opnum() -> 36 (0x24) " },
   52806             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   52807             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   52808             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   52809             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   52810             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   52811             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   52812             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   52813             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   52814             :         { "__ndr_print_in__", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   52815             :         { "__ndr_print_out__", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   52816             :         { NULL, NULL, 0, NULL }
   52817             : };
   52818             : 
   52819             : 
   52820             : static PyTypeObject netr_NetrEnumerateTrustedDomainsEx_Type = {
   52821             :         PyVarObject_HEAD_INIT(NULL, 0)
   52822             :         .tp_name = "netlogon.netr_NetrEnumerateTrustedDomainsEx",
   52823             :         .tp_getset = py_netr_NetrEnumerateTrustedDomainsEx_getsetters,
   52824             :         .tp_methods = py_netr_NetrEnumerateTrustedDomainsEx_methods,
   52825             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   52826             :         .tp_new = py_netr_NetrEnumerateTrustedDomainsEx_new,
   52827             : };
   52828             : 
   52829           0 : static bool pack_py_netr_NetrEnumerateTrustedDomainsEx_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrEnumerateTrustedDomainsEx *r)
   52830             : {
   52831           0 :         PyObject *py_server_name;
   52832           0 :         const char *kwnames[] = {
   52833             :                 "server_name", NULL
   52834             :         };
   52835             : 
   52836           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_NetrEnumerateTrustedDomainsEx", discard_const_p(char *, kwnames), &py_server_name)) {
   52837           0 :                 return false;
   52838             :         }
   52839             : 
   52840           0 :         if (py_server_name == NULL) {
   52841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   52842           0 :                 return false;
   52843             :         }
   52844           0 :         if (py_server_name == Py_None) {
   52845           0 :                 r->in.server_name = NULL;
   52846             :         } else {
   52847           0 :                 r->in.server_name = NULL;
   52848             :                 {
   52849           0 :                         const char *test_str;
   52850           0 :                         const char *talloc_str;
   52851           0 :                         PyObject *unicode = NULL;
   52852           0 :                         if (PyUnicode_Check(py_server_name)) {
   52853           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   52854           0 :                                 if (unicode == NULL) {
   52855           0 :                                         PyErr_NoMemory();
   52856           0 :                                         return false;
   52857             :                                 }
   52858           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52859           0 :                         } else if (PyBytes_Check(py_server_name)) {
   52860           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   52861             :                         } else {
   52862           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   52863           0 :                                 return false;
   52864             :                         }
   52865           0 :                         talloc_str = talloc_strdup(r, test_str);
   52866           0 :                         if (unicode != NULL) {
   52867           0 :                                 Py_DECREF(unicode);
   52868             :                         }
   52869           0 :                         if (talloc_str == NULL) {
   52870           0 :                                 PyErr_NoMemory();
   52871           0 :                                 return false;
   52872             :                         }
   52873           0 :                         r->in.server_name = talloc_str;
   52874             :                 }
   52875             :         }
   52876           0 :         return true;
   52877             : }
   52878             : 
   52879           0 : static PyObject *unpack_py_netr_NetrEnumerateTrustedDomainsEx_args_out(struct netr_NetrEnumerateTrustedDomainsEx *r)
   52880             : {
   52881           0 :         PyObject *result;
   52882           0 :         PyObject *py_dom_trust_list;
   52883           0 :         py_dom_trust_list = pytalloc_reference_ex(&netr_DomainTrustList_Type, r->out.dom_trust_list, r->out.dom_trust_list);
   52884           0 :         result = py_dom_trust_list;
   52885           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   52886           0 :                 PyErr_SetWERROR(r->out.result);
   52887           0 :                 return NULL;
   52888             :         }
   52889             : 
   52890           0 :         return result;
   52891             : }
   52892             : 
   52893             : 
   52894           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_server_name(PyObject *obj, void *closure)
   52895             : {
   52896           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   52897           0 :         PyObject *py_server_name;
   52898           0 :         if (object->in.server_name == NULL) {
   52899           0 :                 Py_RETURN_NONE;
   52900             :         }
   52901           0 :         if (object->in.server_name == NULL) {
   52902           0 :                 py_server_name = Py_None;
   52903           0 :                 Py_INCREF(py_server_name);
   52904             :         } else {
   52905           0 :                 if (object->in.server_name == NULL) {
   52906           0 :                         py_server_name = Py_None;
   52907           0 :                         Py_INCREF(py_server_name);
   52908             :                 } else {
   52909           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   52910             :                 }
   52911             :         }
   52912           0 :         return py_server_name;
   52913             : }
   52914             : 
   52915           0 : static int py_netr_DsRAddressToSitenamesExW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   52916             : {
   52917           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   52918           0 :         if (value == NULL) {
   52919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   52920           0 :                 return -1;
   52921             :         }
   52922           0 :         if (value == Py_None) {
   52923           0 :                 object->in.server_name = NULL;
   52924             :         } else {
   52925           0 :                 object->in.server_name = NULL;
   52926             :                 {
   52927           0 :                         const char *test_str;
   52928           0 :                         const char *talloc_str;
   52929           0 :                         PyObject *unicode = NULL;
   52930           0 :                         if (PyUnicode_Check(value)) {
   52931           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52932           0 :                                 if (unicode == NULL) {
   52933           0 :                                         PyErr_NoMemory();
   52934           0 :                                         return -1;
   52935             :                                 }
   52936           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52937           0 :                         } else if (PyBytes_Check(value)) {
   52938           0 :                                 test_str = PyBytes_AS_STRING(value);
   52939             :                         } else {
   52940           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52941           0 :                                 return -1;
   52942             :                         }
   52943           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52944           0 :                         if (unicode != NULL) {
   52945           0 :                                 Py_DECREF(unicode);
   52946             :                         }
   52947           0 :                         if (talloc_str == NULL) {
   52948           0 :                                 PyErr_NoMemory();
   52949           0 :                                 return -1;
   52950             :                         }
   52951           0 :                         object->in.server_name = talloc_str;
   52952             :                 }
   52953             :         }
   52954           0 :         return 0;
   52955             : }
   52956             : 
   52957           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_count(PyObject *obj, void *closure)
   52958             : {
   52959           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   52960           0 :         PyObject *py_count;
   52961           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->in.count);
   52962           0 :         return py_count;
   52963             : }
   52964             : 
   52965           0 : static int py_netr_DsRAddressToSitenamesExW_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
   52966             : {
   52967           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   52968           0 :         if (value == NULL) {
   52969           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.count");
   52970           0 :                 return -1;
   52971             :         }
   52972             :         {
   52973           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
   52974           0 :                 if (PyLong_Check(value)) {
   52975           0 :                         unsigned long long test_var;
   52976           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52977           0 :                         if (PyErr_Occurred() != NULL) {
   52978           0 :                                 return -1;
   52979             :                         }
   52980           0 :                         if (test_var > uint_max) {
   52981           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52982             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52983           0 :                                 return -1;
   52984             :                         }
   52985           0 :                         object->in.count = test_var;
   52986             :                 } else {
   52987           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52988             :                           PyLong_Type.tp_name);
   52989           0 :                         return -1;
   52990             :                 }
   52991             :         }
   52992           0 :         return 0;
   52993             : }
   52994             : 
   52995           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_addresses(PyObject *obj, void *closure)
   52996             : {
   52997           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   52998           0 :         PyObject *py_addresses;
   52999           0 :         if (object->in.addresses == NULL) {
   53000           0 :                 Py_RETURN_NONE;
   53001             :         }
   53002           0 :         py_addresses = PyList_New(object->in.count);
   53003           0 :         if (py_addresses == NULL) {
   53004           0 :                 return NULL;
   53005             :         }
   53006             :         {
   53007             :                 int addresses_cntr_1;
   53008           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < (object->in.count); addresses_cntr_1++) {
   53009           0 :                         PyObject *py_addresses_1;
   53010           0 :                         py_addresses_1 = pytalloc_reference_ex(&netr_DsRAddress_Type, object->in.addresses, &object->in.addresses[addresses_cntr_1]);
   53011           0 :                         PyList_SetItem(py_addresses, addresses_cntr_1, py_addresses_1);
   53012             :                 }
   53013             :         }
   53014           0 :         return py_addresses;
   53015             : }
   53016             : 
   53017           0 : static int py_netr_DsRAddressToSitenamesExW_in_set_addresses(PyObject *py_obj, PyObject *value, void *closure)
   53018             : {
   53019           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   53020           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.addresses));
   53021           0 :         if (value == NULL) {
   53022           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.addresses");
   53023           0 :                 return -1;
   53024             :         }
   53025           0 :         object->in.addresses = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses);
   53026           0 :         if (object->in.addresses == NULL) {
   53027           0 :                 PyErr_NoMemory();
   53028           0 :                 return -1;
   53029             :         }
   53030           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   53031             :         {
   53032           0 :                 int addresses_cntr_1;
   53033           0 :                 object->in.addresses = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses, PyList_GET_SIZE(value));
   53034           0 :                 if (!object->in.addresses) { return -1; }
   53035           0 :                 talloc_set_name_const(object->in.addresses, "ARRAY: object->in.addresses");
   53036           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(value); addresses_cntr_1++) {
   53037           0 :                         if (PyList_GET_ITEM(value, addresses_cntr_1) == NULL) {
   53038           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.addresses[addresses_cntr_1]");
   53039           0 :                                 return -1;
   53040             :                         }
   53041           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(value, addresses_cntr_1), return -1;);
   53042           0 :                         if (talloc_reference(object->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, addresses_cntr_1))) == NULL) {
   53043           0 :                                 PyErr_NoMemory();
   53044           0 :                                 return -1;
   53045             :                         }
   53046           0 :                         object->in.addresses[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(value, addresses_cntr_1));
   53047             :                 }
   53048             :         }
   53049           0 :         return 0;
   53050             : }
   53051             : 
   53052           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_out_get_ctr(PyObject *obj, void *closure)
   53053             : {
   53054           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   53055           0 :         PyObject *py_ctr;
   53056           0 :         if (object->out.ctr == NULL) {
   53057           0 :                 Py_RETURN_NONE;
   53058             :         }
   53059           0 :         if (*object->out.ctr == NULL) {
   53060           0 :                 py_ctr = Py_None;
   53061           0 :                 Py_INCREF(py_ctr);
   53062             :         } else {
   53063           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesExWCtr_Type, *object->out.ctr, *object->out.ctr);
   53064             :         }
   53065           0 :         return py_ctr;
   53066             : }
   53067             : 
   53068           0 : static int py_netr_DsRAddressToSitenamesExW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   53069             : {
   53070           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   53071           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   53072           0 :         if (value == NULL) {
   53073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   53074           0 :                 return -1;
   53075             :         }
   53076           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   53077           0 :         if (object->out.ctr == NULL) {
   53078           0 :                 PyErr_NoMemory();
   53079           0 :                 return -1;
   53080             :         }
   53081           0 :         if (value == Py_None) {
   53082           0 :                 *object->out.ctr = NULL;
   53083             :         } else {
   53084           0 :                 *object->out.ctr = NULL;
   53085           0 :                 PY_CHECK_TYPE(&netr_DsRAddressToSitenamesExWCtr_Type, value, return -1;);
   53086           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   53087           0 :                         PyErr_NoMemory();
   53088           0 :                         return -1;
   53089             :                 }
   53090           0 :                 *object->out.ctr = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(value);
   53091             :         }
   53092           0 :         return 0;
   53093             : }
   53094             : 
   53095           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_get_result(PyObject *obj, void *closure)
   53096             : {
   53097           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   53098           0 :         PyObject *py_result;
   53099           0 :         py_result = PyErr_FromWERROR(object->out.result);
   53100           0 :         return py_result;
   53101             : }
   53102             : 
   53103           0 : static int py_netr_DsRAddressToSitenamesExW_set_result(PyObject *py_obj, PyObject *value, void *closure)
   53104             : {
   53105           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   53106           0 :         if (value == NULL) {
   53107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   53108           0 :                 return -1;
   53109             :         }
   53110           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   53111           0 :         return 0;
   53112             : }
   53113             : 
   53114             : static PyGetSetDef py_netr_DsRAddressToSitenamesExW_getsetters[] = {
   53115             :         {
   53116             :                 .name = discard_const_p(char, "in_server_name"),
   53117             :                 .get = py_netr_DsRAddressToSitenamesExW_in_get_server_name,
   53118             :                 .set = py_netr_DsRAddressToSitenamesExW_in_set_server_name,
   53119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   53120             :         },
   53121             :         {
   53122             :                 .name = discard_const_p(char, "in_count"),
   53123             :                 .get = py_netr_DsRAddressToSitenamesExW_in_get_count,
   53124             :                 .set = py_netr_DsRAddressToSitenamesExW_in_set_count,
   53125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   53126             :         },
   53127             :         {
   53128             :                 .name = discard_const_p(char, "in_addresses"),
   53129             :                 .get = py_netr_DsRAddressToSitenamesExW_in_get_addresses,
   53130             :                 .set = py_netr_DsRAddressToSitenamesExW_in_set_addresses,
   53131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddress")
   53132             :         },
   53133             :         {
   53134             :                 .name = discard_const_p(char, "out_ctr"),
   53135             :                 .get = py_netr_DsRAddressToSitenamesExW_out_get_ctr,
   53136             :                 .set = py_netr_DsRAddressToSitenamesExW_out_set_ctr,
   53137             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddressToSitenamesExWCtr")
   53138             :         },
   53139             :         {
   53140             :                 .name = discard_const_p(char, "result"),
   53141             :                 .get = py_netr_DsRAddressToSitenamesExW_get_result,
   53142             :                 .set = py_netr_DsRAddressToSitenamesExW_set_result,
   53143             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   53144             :         },
   53145             :         { .name = NULL }
   53146             : };
   53147             : 
   53148           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   53149             : {
   53150           0 :         PyObject *self = pytalloc_new(struct netr_DsRAddressToSitenamesExW, type);
   53151           0 :         struct netr_DsRAddressToSitenamesExW *_self = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(self);
   53152           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   53153           0 :         _self->in.addresses = talloc_zero(mem_ctx, struct netr_DsRAddress);
   53154             :         /* a pointer to a NULL pointer */
   53155           0 :         _self->out.ctr = talloc_zero(mem_ctx, struct netr_DsRAddressToSitenamesExWCtr *);
   53156           0 :         return self;
   53157             : }
   53158             : 
   53159           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   53160             : {
   53161             : 
   53162             : 
   53163           0 :         return PyLong_FromLong(37);
   53164             : }
   53165             : 
   53166           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   53167             : {
   53168           0 :         const struct ndr_interface_call *call = NULL;
   53169           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   53170           0 :         PyObject *ret = NULL;
   53171           0 :         struct ndr_push *push = NULL;
   53172           0 :         DATA_BLOB blob;
   53173           0 :         enum ndr_err_code err;
   53174             : 
   53175           0 :         if (ndr_table_netlogon.num_calls < 38) {
   53176           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_pack");
   53177           0 :                 return NULL;
   53178             :         }
   53179           0 :         call = &ndr_table_netlogon.calls[37];
   53180             : 
   53181           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   53182           0 :         if (push == NULL) {
   53183           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53184           0 :                 return NULL;
   53185             :         }
   53186             : 
   53187           0 :         push->flags |= ndr_push_flags;
   53188             : 
   53189           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   53190           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53191           0 :                 TALLOC_FREE(push);
   53192           0 :                 PyErr_SetNdrError(err);
   53193           0 :                 return NULL;
   53194             :         }
   53195           0 :         blob = ndr_push_blob(push);
   53196           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   53197           0 :         TALLOC_FREE(push);
   53198           0 :         return ret;
   53199             : }
   53200             : 
   53201           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53202             : {
   53203           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53204           0 :         PyObject *bigendian_obj = NULL;
   53205           0 :         PyObject *ndr64_obj = NULL;
   53206           0 :         libndr_flags ndr_push_flags = 0;
   53207             : 
   53208           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   53209             :                 discard_const_p(char *, kwnames),
   53210             :                 &bigendian_obj,
   53211             :                 &ndr64_obj)) {
   53212           0 :                 return NULL;
   53213             :         }
   53214             : 
   53215           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53216           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53217             :         }
   53218           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53219           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53220             :         }
   53221             : 
   53222           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   53223             : }
   53224             : 
   53225           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53226             : {
   53227           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53228           0 :         PyObject *bigendian_obj = NULL;
   53229           0 :         PyObject *ndr64_obj = NULL;
   53230           0 :         libndr_flags ndr_push_flags = 0;
   53231             : 
   53232           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   53233             :                 discard_const_p(char *, kwnames),
   53234             :                 &bigendian_obj,
   53235             :                 &ndr64_obj)) {
   53236           0 :                 return NULL;
   53237             :         }
   53238             : 
   53239           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53240           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53241             :         }
   53242           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53243           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53244             :         }
   53245             : 
   53246           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   53247             : }
   53248             : 
   53249           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   53250             : {
   53251           0 :         const struct ndr_interface_call *call = NULL;
   53252           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   53253           0 :         struct ndr_pull *pull = NULL;
   53254           0 :         enum ndr_err_code err;
   53255             : 
   53256           0 :         if (ndr_table_netlogon.num_calls < 38) {
   53257           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_unpack");
   53258           0 :                 return NULL;
   53259             :         }
   53260           0 :         call = &ndr_table_netlogon.calls[37];
   53261             : 
   53262           0 :         pull = ndr_pull_init_blob(blob, object);
   53263           0 :         if (pull == NULL) {
   53264           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53265           0 :                 return NULL;
   53266             :         }
   53267             : 
   53268           0 :         pull->flags |= ndr_pull_flags;
   53269             : 
   53270           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   53271           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53272           0 :                 TALLOC_FREE(pull);
   53273           0 :                 PyErr_SetNdrError(err);
   53274           0 :                 return NULL;
   53275             :         }
   53276           0 :         if (!allow_remaining) {
   53277           0 :                 uint32_t highest_ofs;
   53278             : 
   53279           0 :                 if (pull->offset > pull->relative_highest_offset) {
   53280           0 :                         highest_ofs = pull->offset;
   53281             :                 } else {
   53282           0 :                         highest_ofs = pull->relative_highest_offset;
   53283             :                 }
   53284           0 :                 if (highest_ofs < pull->data_size) {
   53285           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   53286             :                                 "not all bytes consumed ofs[%u] size[%u]",
   53287             :                                 highest_ofs, pull->data_size);
   53288           0 :                         TALLOC_FREE(pull);
   53289           0 :                         PyErr_SetNdrError(err);
   53290           0 :                         return NULL;
   53291             :                 }
   53292             :         }
   53293             : 
   53294           0 :         TALLOC_FREE(pull);
   53295           0 :         Py_RETURN_NONE;
   53296             : }
   53297             : 
   53298           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53299             : {
   53300           0 :         DATA_BLOB blob;
   53301           0 :         Py_ssize_t blob_length = 0;
   53302           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53303           0 :         PyObject *bigendian_obj = NULL;
   53304           0 :         PyObject *ndr64_obj = NULL;
   53305           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53306           0 :         PyObject *allow_remaining_obj = NULL;
   53307           0 :         bool allow_remaining = false;
   53308             : 
   53309           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   53310             :                 discard_const_p(char *, kwnames),
   53311             :                 &blob.data, &blob_length,
   53312             :                 &bigendian_obj,
   53313             :                 &ndr64_obj,
   53314             :                 &allow_remaining_obj)) {
   53315           0 :                 return NULL;
   53316             :         }
   53317           0 :         blob.length = blob_length;
   53318             : 
   53319           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53320           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53321             :         }
   53322           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53323           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53324             :         }
   53325             : 
   53326           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53327           0 :                 allow_remaining = true;
   53328             :         }
   53329             : 
   53330           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   53331             : }
   53332             : 
   53333           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53334             : {
   53335           0 :         DATA_BLOB blob;
   53336           0 :         Py_ssize_t blob_length = 0;
   53337           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53338           0 :         PyObject *bigendian_obj = NULL;
   53339           0 :         PyObject *ndr64_obj = NULL;
   53340           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53341           0 :         PyObject *allow_remaining_obj = NULL;
   53342           0 :         bool allow_remaining = false;
   53343             : 
   53344           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   53345             :                 discard_const_p(char *, kwnames),
   53346             :                 &blob.data, &blob_length,
   53347             :                 &bigendian_obj,
   53348             :                 &ndr64_obj,
   53349             :                 &allow_remaining_obj)) {
   53350           0 :                 return NULL;
   53351             :         }
   53352           0 :         blob.length = blob_length;
   53353             : 
   53354           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53355           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53356             :         }
   53357           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53358           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53359             :         }
   53360             : 
   53361           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53362           0 :                 allow_remaining = true;
   53363             :         }
   53364             : 
   53365           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53366             : }
   53367             : 
   53368           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   53369             : {
   53370           0 :         const struct ndr_interface_call *call = NULL;
   53371           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   53372           0 :         PyObject *ret;
   53373           0 :         char *retstr;
   53374             : 
   53375           0 :         if (ndr_table_netlogon.num_calls < 38) {
   53376           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_print");
   53377           0 :                 return NULL;
   53378             :         }
   53379           0 :         call = &ndr_table_netlogon.calls[37];
   53380             : 
   53381           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53382           0 :         ret = PyUnicode_FromString(retstr);
   53383           0 :         TALLOC_FREE(retstr);
   53384             : 
   53385           0 :         return ret;
   53386             : }
   53387             : 
   53388           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53389             : {
   53390           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_print(py_obj, "netr_DsRAddressToSitenamesExW_in", NDR_IN);
   53391             : }
   53392             : 
   53393           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53394             : {
   53395           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_print(py_obj, "netr_DsRAddressToSitenamesExW_out", NDR_OUT);
   53396             : }
   53397             : 
   53398             : static PyMethodDef py_netr_DsRAddressToSitenamesExW_methods[] = {
   53399             :         { "opnum", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_opnum, METH_NOARGS|METH_CLASS,
   53400             :                 "netlogon.netr_DsRAddressToSitenamesExW.opnum() -> 37 (0x25) " },
   53401             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53402             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53403             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53404             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53405             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53406             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53407             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53408             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53409             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53410             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53411             :         { NULL, NULL, 0, NULL }
   53412             : };
   53413             : 
   53414             : 
   53415             : static PyTypeObject netr_DsRAddressToSitenamesExW_Type = {
   53416             :         PyVarObject_HEAD_INIT(NULL, 0)
   53417             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesExW",
   53418             :         .tp_getset = py_netr_DsRAddressToSitenamesExW_getsetters,
   53419             :         .tp_methods = py_netr_DsRAddressToSitenamesExW_methods,
   53420             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53421             :         .tp_new = py_netr_DsRAddressToSitenamesExW_new,
   53422             : };
   53423             : 
   53424           0 : static bool pack_py_netr_DsRAddressToSitenamesExW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRAddressToSitenamesExW *r)
   53425             : {
   53426           0 :         PyObject *py_server_name;
   53427           0 :         PyObject *py_addresses;
   53428           0 :         const char *kwnames[] = {
   53429             :                 "server_name", "addresses", NULL
   53430             :         };
   53431             : 
   53432           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsRAddressToSitenamesExW", discard_const_p(char *, kwnames), &py_server_name, &py_addresses)) {
   53433           0 :                 return false;
   53434             :         }
   53435             : 
   53436           0 :         if (py_server_name == NULL) {
   53437           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   53438           0 :                 return false;
   53439             :         }
   53440           0 :         if (py_server_name == Py_None) {
   53441           0 :                 r->in.server_name = NULL;
   53442             :         } else {
   53443           0 :                 r->in.server_name = NULL;
   53444             :                 {
   53445           0 :                         const char *test_str;
   53446           0 :                         const char *talloc_str;
   53447           0 :                         PyObject *unicode = NULL;
   53448           0 :                         if (PyUnicode_Check(py_server_name)) {
   53449           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   53450           0 :                                 if (unicode == NULL) {
   53451           0 :                                         PyErr_NoMemory();
   53452           0 :                                         return false;
   53453             :                                 }
   53454           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53455           0 :                         } else if (PyBytes_Check(py_server_name)) {
   53456           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   53457             :                         } else {
   53458           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   53459           0 :                                 return false;
   53460             :                         }
   53461           0 :                         talloc_str = talloc_strdup(r, test_str);
   53462           0 :                         if (unicode != NULL) {
   53463           0 :                                 Py_DECREF(unicode);
   53464             :                         }
   53465           0 :                         if (talloc_str == NULL) {
   53466           0 :                                 PyErr_NoMemory();
   53467           0 :                                 return false;
   53468             :                         }
   53469           0 :                         r->in.server_name = talloc_str;
   53470             :                 }
   53471             :         }
   53472           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   53473           0 :         r->in.count = PyList_GET_SIZE(py_addresses);
   53474           0 :         if (py_addresses == NULL) {
   53475           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.addresses");
   53476           0 :                 return false;
   53477             :         }
   53478           0 :         r->in.addresses = talloc_ptrtype(r, r->in.addresses);
   53479           0 :         if (r->in.addresses == NULL) {
   53480           0 :                 PyErr_NoMemory();
   53481           0 :                 return false;
   53482             :         }
   53483           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   53484             :         {
   53485           0 :                 int addresses_cntr_1;
   53486           0 :                 r->in.addresses = talloc_array_ptrtype(r, r->in.addresses, PyList_GET_SIZE(py_addresses));
   53487           0 :                 if (!r->in.addresses) { return false; }
   53488           0 :                 talloc_set_name_const(r->in.addresses, "ARRAY: r->in.addresses");
   53489           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(py_addresses); addresses_cntr_1++) {
   53490           0 :                         if (PyList_GET_ITEM(py_addresses, addresses_cntr_1) == NULL) {
   53491           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.addresses[addresses_cntr_1]");
   53492           0 :                                 return false;
   53493             :                         }
   53494           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(py_addresses, addresses_cntr_1), return false;);
   53495           0 :                         if (talloc_reference(r->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_addresses, addresses_cntr_1))) == NULL) {
   53496           0 :                                 PyErr_NoMemory();
   53497           0 :                                 return false;
   53498             :                         }
   53499           0 :                         r->in.addresses[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(py_addresses, addresses_cntr_1));
   53500             :                 }
   53501             :         }
   53502           0 :         return true;
   53503             : }
   53504             : 
   53505           0 : static PyObject *unpack_py_netr_DsRAddressToSitenamesExW_args_out(struct netr_DsRAddressToSitenamesExW *r)
   53506             : {
   53507           0 :         PyObject *result;
   53508           0 :         PyObject *py_ctr;
   53509           0 :         if (*r->out.ctr == NULL) {
   53510           0 :                 py_ctr = Py_None;
   53511           0 :                 Py_INCREF(py_ctr);
   53512             :         } else {
   53513           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesExWCtr_Type, *r->out.ctr, *r->out.ctr);
   53514             :         }
   53515           0 :         result = py_ctr;
   53516           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   53517           0 :                 PyErr_SetWERROR(r->out.result);
   53518           0 :                 return NULL;
   53519             :         }
   53520             : 
   53521           0 :         return result;
   53522             : }
   53523             : 
   53524             : 
   53525           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_in_get_server_name(PyObject *obj, void *closure)
   53526             : {
   53527           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(obj);
   53528           0 :         PyObject *py_server_name;
   53529           0 :         if (object->in.server_name == NULL) {
   53530           0 :                 Py_RETURN_NONE;
   53531             :         }
   53532           0 :         if (object->in.server_name == NULL) {
   53533           0 :                 py_server_name = Py_None;
   53534           0 :                 Py_INCREF(py_server_name);
   53535             :         } else {
   53536           0 :                 if (object->in.server_name == NULL) {
   53537           0 :                         py_server_name = Py_None;
   53538           0 :                         Py_INCREF(py_server_name);
   53539             :                 } else {
   53540           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   53541             :                 }
   53542             :         }
   53543           0 :         return py_server_name;
   53544             : }
   53545             : 
   53546           0 : static int py_netr_DsrGetDcSiteCoverageW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   53547             : {
   53548           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53549           0 :         if (value == NULL) {
   53550           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   53551           0 :                 return -1;
   53552             :         }
   53553           0 :         if (value == Py_None) {
   53554           0 :                 object->in.server_name = NULL;
   53555             :         } else {
   53556           0 :                 object->in.server_name = NULL;
   53557             :                 {
   53558           0 :                         const char *test_str;
   53559           0 :                         const char *talloc_str;
   53560           0 :                         PyObject *unicode = NULL;
   53561           0 :                         if (PyUnicode_Check(value)) {
   53562           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53563           0 :                                 if (unicode == NULL) {
   53564           0 :                                         PyErr_NoMemory();
   53565           0 :                                         return -1;
   53566             :                                 }
   53567           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53568           0 :                         } else if (PyBytes_Check(value)) {
   53569           0 :                                 test_str = PyBytes_AS_STRING(value);
   53570             :                         } else {
   53571           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53572           0 :                                 return -1;
   53573             :                         }
   53574           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53575           0 :                         if (unicode != NULL) {
   53576           0 :                                 Py_DECREF(unicode);
   53577             :                         }
   53578           0 :                         if (talloc_str == NULL) {
   53579           0 :                                 PyErr_NoMemory();
   53580           0 :                                 return -1;
   53581             :                         }
   53582           0 :                         object->in.server_name = talloc_str;
   53583             :                 }
   53584             :         }
   53585           0 :         return 0;
   53586             : }
   53587             : 
   53588           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_out_get_ctr(PyObject *obj, void *closure)
   53589             : {
   53590           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(obj);
   53591           0 :         PyObject *py_ctr;
   53592           0 :         if (object->out.ctr == NULL) {
   53593           0 :                 Py_RETURN_NONE;
   53594             :         }
   53595           0 :         if (*object->out.ctr == NULL) {
   53596           0 :                 py_ctr = Py_None;
   53597           0 :                 Py_INCREF(py_ctr);
   53598             :         } else {
   53599           0 :                 py_ctr = pytalloc_reference_ex(&DcSitesCtr_Type, *object->out.ctr, *object->out.ctr);
   53600             :         }
   53601           0 :         return py_ctr;
   53602             : }
   53603             : 
   53604           0 : static int py_netr_DsrGetDcSiteCoverageW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   53605             : {
   53606           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53607           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   53608           0 :         if (value == NULL) {
   53609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   53610           0 :                 return -1;
   53611             :         }
   53612           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   53613           0 :         if (object->out.ctr == NULL) {
   53614           0 :                 PyErr_NoMemory();
   53615           0 :                 return -1;
   53616             :         }
   53617           0 :         if (value == Py_None) {
   53618           0 :                 *object->out.ctr = NULL;
   53619             :         } else {
   53620           0 :                 *object->out.ctr = NULL;
   53621           0 :                 PY_CHECK_TYPE(&DcSitesCtr_Type, value, return -1;);
   53622           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   53623           0 :                         PyErr_NoMemory();
   53624           0 :                         return -1;
   53625             :                 }
   53626           0 :                 *object->out.ctr = (struct DcSitesCtr *)pytalloc_get_ptr(value);
   53627             :         }
   53628           0 :         return 0;
   53629             : }
   53630             : 
   53631           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_get_result(PyObject *obj, void *closure)
   53632             : {
   53633           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(obj);
   53634           0 :         PyObject *py_result;
   53635           0 :         py_result = PyErr_FromWERROR(object->out.result);
   53636           0 :         return py_result;
   53637             : }
   53638             : 
   53639           0 : static int py_netr_DsrGetDcSiteCoverageW_set_result(PyObject *py_obj, PyObject *value, void *closure)
   53640             : {
   53641           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53642           0 :         if (value == NULL) {
   53643           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   53644           0 :                 return -1;
   53645             :         }
   53646           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   53647           0 :         return 0;
   53648             : }
   53649             : 
   53650             : static PyGetSetDef py_netr_DsrGetDcSiteCoverageW_getsetters[] = {
   53651             :         {
   53652             :                 .name = discard_const_p(char, "in_server_name"),
   53653             :                 .get = py_netr_DsrGetDcSiteCoverageW_in_get_server_name,
   53654             :                 .set = py_netr_DsrGetDcSiteCoverageW_in_set_server_name,
   53655             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   53656             :         },
   53657             :         {
   53658             :                 .name = discard_const_p(char, "out_ctr"),
   53659             :                 .get = py_netr_DsrGetDcSiteCoverageW_out_get_ctr,
   53660             :                 .set = py_netr_DsrGetDcSiteCoverageW_out_set_ctr,
   53661             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DcSitesCtr")
   53662             :         },
   53663             :         {
   53664             :                 .name = discard_const_p(char, "result"),
   53665             :                 .get = py_netr_DsrGetDcSiteCoverageW_get_result,
   53666             :                 .set = py_netr_DsrGetDcSiteCoverageW_set_result,
   53667             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   53668             :         },
   53669             :         { .name = NULL }
   53670             : };
   53671             : 
   53672           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   53673             : {
   53674           0 :         PyObject *self = pytalloc_new(struct netr_DsrGetDcSiteCoverageW, type);
   53675           0 :         struct netr_DsrGetDcSiteCoverageW *_self = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(self);
   53676           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   53677             :         /* a pointer to a NULL pointer */
   53678           0 :         _self->out.ctr = talloc_zero(mem_ctx, struct DcSitesCtr *);
   53679           0 :         return self;
   53680             : }
   53681             : 
   53682           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   53683             : {
   53684             : 
   53685             : 
   53686           0 :         return PyLong_FromLong(38);
   53687             : }
   53688             : 
   53689           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   53690             : {
   53691           0 :         const struct ndr_interface_call *call = NULL;
   53692           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53693           0 :         PyObject *ret = NULL;
   53694           0 :         struct ndr_push *push = NULL;
   53695           0 :         DATA_BLOB blob;
   53696           0 :         enum ndr_err_code err;
   53697             : 
   53698           0 :         if (ndr_table_netlogon.num_calls < 39) {
   53699           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_pack");
   53700           0 :                 return NULL;
   53701             :         }
   53702           0 :         call = &ndr_table_netlogon.calls[38];
   53703             : 
   53704           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   53705           0 :         if (push == NULL) {
   53706           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53707           0 :                 return NULL;
   53708             :         }
   53709             : 
   53710           0 :         push->flags |= ndr_push_flags;
   53711             : 
   53712           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   53713           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53714           0 :                 TALLOC_FREE(push);
   53715           0 :                 PyErr_SetNdrError(err);
   53716           0 :                 return NULL;
   53717             :         }
   53718           0 :         blob = ndr_push_blob(push);
   53719           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   53720           0 :         TALLOC_FREE(push);
   53721           0 :         return ret;
   53722             : }
   53723             : 
   53724           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53725             : {
   53726           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53727           0 :         PyObject *bigendian_obj = NULL;
   53728           0 :         PyObject *ndr64_obj = NULL;
   53729           0 :         libndr_flags ndr_push_flags = 0;
   53730             : 
   53731           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   53732             :                 discard_const_p(char *, kwnames),
   53733             :                 &bigendian_obj,
   53734             :                 &ndr64_obj)) {
   53735           0 :                 return NULL;
   53736             :         }
   53737             : 
   53738           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53739           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53740             :         }
   53741           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53742           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53743             :         }
   53744             : 
   53745           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   53746             : }
   53747             : 
   53748           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53749             : {
   53750           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53751           0 :         PyObject *bigendian_obj = NULL;
   53752           0 :         PyObject *ndr64_obj = NULL;
   53753           0 :         libndr_flags ndr_push_flags = 0;
   53754             : 
   53755           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   53756             :                 discard_const_p(char *, kwnames),
   53757             :                 &bigendian_obj,
   53758             :                 &ndr64_obj)) {
   53759           0 :                 return NULL;
   53760             :         }
   53761             : 
   53762           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53763           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53764             :         }
   53765           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53766           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53767             :         }
   53768             : 
   53769           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   53770             : }
   53771             : 
   53772           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   53773             : {
   53774           0 :         const struct ndr_interface_call *call = NULL;
   53775           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53776           0 :         struct ndr_pull *pull = NULL;
   53777           0 :         enum ndr_err_code err;
   53778             : 
   53779           0 :         if (ndr_table_netlogon.num_calls < 39) {
   53780           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_unpack");
   53781           0 :                 return NULL;
   53782             :         }
   53783           0 :         call = &ndr_table_netlogon.calls[38];
   53784             : 
   53785           0 :         pull = ndr_pull_init_blob(blob, object);
   53786           0 :         if (pull == NULL) {
   53787           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53788           0 :                 return NULL;
   53789             :         }
   53790             : 
   53791           0 :         pull->flags |= ndr_pull_flags;
   53792             : 
   53793           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   53794           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53795           0 :                 TALLOC_FREE(pull);
   53796           0 :                 PyErr_SetNdrError(err);
   53797           0 :                 return NULL;
   53798             :         }
   53799           0 :         if (!allow_remaining) {
   53800           0 :                 uint32_t highest_ofs;
   53801             : 
   53802           0 :                 if (pull->offset > pull->relative_highest_offset) {
   53803           0 :                         highest_ofs = pull->offset;
   53804             :                 } else {
   53805           0 :                         highest_ofs = pull->relative_highest_offset;
   53806             :                 }
   53807           0 :                 if (highest_ofs < pull->data_size) {
   53808           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   53809             :                                 "not all bytes consumed ofs[%u] size[%u]",
   53810             :                                 highest_ofs, pull->data_size);
   53811           0 :                         TALLOC_FREE(pull);
   53812           0 :                         PyErr_SetNdrError(err);
   53813           0 :                         return NULL;
   53814             :                 }
   53815             :         }
   53816             : 
   53817           0 :         TALLOC_FREE(pull);
   53818           0 :         Py_RETURN_NONE;
   53819             : }
   53820             : 
   53821           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53822             : {
   53823           0 :         DATA_BLOB blob;
   53824           0 :         Py_ssize_t blob_length = 0;
   53825           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53826           0 :         PyObject *bigendian_obj = NULL;
   53827           0 :         PyObject *ndr64_obj = NULL;
   53828           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53829           0 :         PyObject *allow_remaining_obj = NULL;
   53830           0 :         bool allow_remaining = false;
   53831             : 
   53832           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   53833             :                 discard_const_p(char *, kwnames),
   53834             :                 &blob.data, &blob_length,
   53835             :                 &bigendian_obj,
   53836             :                 &ndr64_obj,
   53837             :                 &allow_remaining_obj)) {
   53838           0 :                 return NULL;
   53839             :         }
   53840           0 :         blob.length = blob_length;
   53841             : 
   53842           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53843           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53844             :         }
   53845           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53846           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53847             :         }
   53848             : 
   53849           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53850           0 :                 allow_remaining = true;
   53851             :         }
   53852             : 
   53853           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   53854             : }
   53855             : 
   53856           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53857             : {
   53858           0 :         DATA_BLOB blob;
   53859           0 :         Py_ssize_t blob_length = 0;
   53860           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53861           0 :         PyObject *bigendian_obj = NULL;
   53862           0 :         PyObject *ndr64_obj = NULL;
   53863           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53864           0 :         PyObject *allow_remaining_obj = NULL;
   53865           0 :         bool allow_remaining = false;
   53866             : 
   53867           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   53868             :                 discard_const_p(char *, kwnames),
   53869             :                 &blob.data, &blob_length,
   53870             :                 &bigendian_obj,
   53871             :                 &ndr64_obj,
   53872             :                 &allow_remaining_obj)) {
   53873           0 :                 return NULL;
   53874             :         }
   53875           0 :         blob.length = blob_length;
   53876             : 
   53877           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53878           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53879             :         }
   53880           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53881           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53882             :         }
   53883             : 
   53884           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53885           0 :                 allow_remaining = true;
   53886             :         }
   53887             : 
   53888           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53889             : }
   53890             : 
   53891           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   53892             : {
   53893           0 :         const struct ndr_interface_call *call = NULL;
   53894           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53895           0 :         PyObject *ret;
   53896           0 :         char *retstr;
   53897             : 
   53898           0 :         if (ndr_table_netlogon.num_calls < 39) {
   53899           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_print");
   53900           0 :                 return NULL;
   53901             :         }
   53902           0 :         call = &ndr_table_netlogon.calls[38];
   53903             : 
   53904           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53905           0 :         ret = PyUnicode_FromString(retstr);
   53906           0 :         TALLOC_FREE(retstr);
   53907             : 
   53908           0 :         return ret;
   53909             : }
   53910             : 
   53911           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53912             : {
   53913           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_print(py_obj, "netr_DsrGetDcSiteCoverageW_in", NDR_IN);
   53914             : }
   53915             : 
   53916           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53917             : {
   53918           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_print(py_obj, "netr_DsrGetDcSiteCoverageW_out", NDR_OUT);
   53919             : }
   53920             : 
   53921             : static PyMethodDef py_netr_DsrGetDcSiteCoverageW_methods[] = {
   53922             :         { "opnum", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_opnum, METH_NOARGS|METH_CLASS,
   53923             :                 "netlogon.netr_DsrGetDcSiteCoverageW.opnum() -> 38 (0x26) " },
   53924             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53925             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53926             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53927             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53928             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53929             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53930             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53931             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53932             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53933             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53934             :         { NULL, NULL, 0, NULL }
   53935             : };
   53936             : 
   53937             : 
   53938             : static PyTypeObject netr_DsrGetDcSiteCoverageW_Type = {
   53939             :         PyVarObject_HEAD_INIT(NULL, 0)
   53940             :         .tp_name = "netlogon.netr_DsrGetDcSiteCoverageW",
   53941             :         .tp_getset = py_netr_DsrGetDcSiteCoverageW_getsetters,
   53942             :         .tp_methods = py_netr_DsrGetDcSiteCoverageW_methods,
   53943             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53944             :         .tp_new = py_netr_DsrGetDcSiteCoverageW_new,
   53945             : };
   53946             : 
   53947           0 : static bool pack_py_netr_DsrGetDcSiteCoverageW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrGetDcSiteCoverageW *r)
   53948             : {
   53949           0 :         PyObject *py_server_name;
   53950           0 :         const char *kwnames[] = {
   53951             :                 "server_name", NULL
   53952             :         };
   53953             : 
   53954           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_DsrGetDcSiteCoverageW", discard_const_p(char *, kwnames), &py_server_name)) {
   53955           0 :                 return false;
   53956             :         }
   53957             : 
   53958           0 :         if (py_server_name == NULL) {
   53959           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   53960           0 :                 return false;
   53961             :         }
   53962           0 :         if (py_server_name == Py_None) {
   53963           0 :                 r->in.server_name = NULL;
   53964             :         } else {
   53965           0 :                 r->in.server_name = NULL;
   53966             :                 {
   53967           0 :                         const char *test_str;
   53968           0 :                         const char *talloc_str;
   53969           0 :                         PyObject *unicode = NULL;
   53970           0 :                         if (PyUnicode_Check(py_server_name)) {
   53971           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   53972           0 :                                 if (unicode == NULL) {
   53973           0 :                                         PyErr_NoMemory();
   53974           0 :                                         return false;
   53975             :                                 }
   53976           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53977           0 :                         } else if (PyBytes_Check(py_server_name)) {
   53978           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   53979             :                         } else {
   53980           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   53981           0 :                                 return false;
   53982             :                         }
   53983           0 :                         talloc_str = talloc_strdup(r, test_str);
   53984           0 :                         if (unicode != NULL) {
   53985           0 :                                 Py_DECREF(unicode);
   53986             :                         }
   53987           0 :                         if (talloc_str == NULL) {
   53988           0 :                                 PyErr_NoMemory();
   53989           0 :                                 return false;
   53990             :                         }
   53991           0 :                         r->in.server_name = talloc_str;
   53992             :                 }
   53993             :         }
   53994           0 :         return true;
   53995             : }
   53996             : 
   53997           0 : static PyObject *unpack_py_netr_DsrGetDcSiteCoverageW_args_out(struct netr_DsrGetDcSiteCoverageW *r)
   53998             : {
   53999           0 :         PyObject *result;
   54000           0 :         PyObject *py_ctr;
   54001           0 :         if (*r->out.ctr == NULL) {
   54002           0 :                 py_ctr = Py_None;
   54003           0 :                 Py_INCREF(py_ctr);
   54004             :         } else {
   54005           0 :                 py_ctr = pytalloc_reference_ex(&DcSitesCtr_Type, *r->out.ctr, *r->out.ctr);
   54006             :         }
   54007           0 :         result = py_ctr;
   54008           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   54009           0 :                 PyErr_SetWERROR(r->out.result);
   54010           0 :                 return NULL;
   54011             :         }
   54012             : 
   54013           0 :         return result;
   54014             : }
   54015             : 
   54016             : 
   54017           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_server_name(PyObject *obj, void *closure)
   54018             : {
   54019           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54020           0 :         PyObject *py_server_name;
   54021           0 :         if (object->in.server_name == NULL) {
   54022           0 :                 Py_RETURN_NONE;
   54023             :         }
   54024           0 :         if (object->in.server_name == NULL) {
   54025           0 :                 py_server_name = Py_None;
   54026           0 :                 Py_INCREF(py_server_name);
   54027             :         } else {
   54028           0 :                 if (object->in.server_name == NULL) {
   54029           0 :                         py_server_name = Py_None;
   54030           0 :                         Py_INCREF(py_server_name);
   54031             :                 } else {
   54032           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   54033             :                 }
   54034             :         }
   54035           0 :         return py_server_name;
   54036             : }
   54037             : 
   54038           0 : static int py_netr_LogonSamLogonEx_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   54039             : {
   54040           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54041           0 :         if (value == NULL) {
   54042           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   54043           0 :                 return -1;
   54044             :         }
   54045           0 :         if (value == Py_None) {
   54046           0 :                 object->in.server_name = NULL;
   54047             :         } else {
   54048           0 :                 object->in.server_name = NULL;
   54049             :                 {
   54050           0 :                         const char *test_str;
   54051           0 :                         const char *talloc_str;
   54052           0 :                         PyObject *unicode = NULL;
   54053           0 :                         if (PyUnicode_Check(value)) {
   54054           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54055           0 :                                 if (unicode == NULL) {
   54056           0 :                                         PyErr_NoMemory();
   54057           0 :                                         return -1;
   54058             :                                 }
   54059           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   54060           0 :                         } else if (PyBytes_Check(value)) {
   54061           0 :                                 test_str = PyBytes_AS_STRING(value);
   54062             :                         } else {
   54063           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54064           0 :                                 return -1;
   54065             :                         }
   54066           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54067           0 :                         if (unicode != NULL) {
   54068           0 :                                 Py_DECREF(unicode);
   54069             :                         }
   54070           0 :                         if (talloc_str == NULL) {
   54071           0 :                                 PyErr_NoMemory();
   54072           0 :                                 return -1;
   54073             :                         }
   54074           0 :                         object->in.server_name = talloc_str;
   54075             :                 }
   54076             :         }
   54077           0 :         return 0;
   54078             : }
   54079             : 
   54080           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_computer_name(PyObject *obj, void *closure)
   54081             : {
   54082           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54083           0 :         PyObject *py_computer_name;
   54084           0 :         if (object->in.computer_name == NULL) {
   54085           0 :                 Py_RETURN_NONE;
   54086             :         }
   54087           0 :         if (object->in.computer_name == NULL) {
   54088           0 :                 py_computer_name = Py_None;
   54089           0 :                 Py_INCREF(py_computer_name);
   54090             :         } else {
   54091           0 :                 if (object->in.computer_name == NULL) {
   54092           0 :                         py_computer_name = Py_None;
   54093           0 :                         Py_INCREF(py_computer_name);
   54094             :                 } else {
   54095           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   54096             :                 }
   54097             :         }
   54098           0 :         return py_computer_name;
   54099             : }
   54100             : 
   54101           0 : static int py_netr_LogonSamLogonEx_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   54102             : {
   54103           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54104           0 :         if (value == NULL) {
   54105           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   54106           0 :                 return -1;
   54107             :         }
   54108           0 :         if (value == Py_None) {
   54109           0 :                 object->in.computer_name = NULL;
   54110             :         } else {
   54111           0 :                 object->in.computer_name = NULL;
   54112             :                 {
   54113           0 :                         const char *test_str;
   54114           0 :                         const char *talloc_str;
   54115           0 :                         PyObject *unicode = NULL;
   54116           0 :                         if (PyUnicode_Check(value)) {
   54117           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54118           0 :                                 if (unicode == NULL) {
   54119           0 :                                         PyErr_NoMemory();
   54120           0 :                                         return -1;
   54121             :                                 }
   54122           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   54123           0 :                         } else if (PyBytes_Check(value)) {
   54124           0 :                                 test_str = PyBytes_AS_STRING(value);
   54125             :                         } else {
   54126           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54127           0 :                                 return -1;
   54128             :                         }
   54129           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54130           0 :                         if (unicode != NULL) {
   54131           0 :                                 Py_DECREF(unicode);
   54132             :                         }
   54133           0 :                         if (talloc_str == NULL) {
   54134           0 :                                 PyErr_NoMemory();
   54135           0 :                                 return -1;
   54136             :                         }
   54137           0 :                         object->in.computer_name = talloc_str;
   54138             :                 }
   54139             :         }
   54140           0 :         return 0;
   54141             : }
   54142             : 
   54143           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_logon_level(PyObject *obj, void *closure)
   54144             : {
   54145           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54146           0 :         PyObject *py_logon_level;
   54147           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   54148           0 :         return py_logon_level;
   54149             : }
   54150             : 
   54151           0 : static int py_netr_LogonSamLogonEx_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   54152             : {
   54153           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54154           0 :         if (value == NULL) {
   54155           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   54156           0 :                 return -1;
   54157             :         }
   54158             :         {
   54159           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   54160           0 :                 if (PyLong_Check(value)) {
   54161           0 :                         unsigned long long test_var;
   54162           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54163           0 :                         if (PyErr_Occurred() != NULL) {
   54164           0 :                                 return -1;
   54165             :                         }
   54166           0 :                         if (test_var > uint_max) {
   54167           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54168             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54169           0 :                                 return -1;
   54170             :                         }
   54171           0 :                         object->in.logon_level = test_var;
   54172             :                 } else {
   54173           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54174             :                           PyLong_Type.tp_name);
   54175           0 :                         return -1;
   54176             :                 }
   54177             :         }
   54178           0 :         return 0;
   54179             : }
   54180             : 
   54181           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_logon(PyObject *obj, void *closure)
   54182             : {
   54183           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54184           0 :         PyObject *py_logon;
   54185           0 :         if (object->in.logon == NULL) {
   54186           0 :                 Py_RETURN_NONE;
   54187             :         }
   54188           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
   54189           0 :         if (py_logon == NULL) {
   54190           0 :                 return NULL;
   54191             :         }
   54192           0 :         return py_logon;
   54193             : }
   54194             : 
   54195           0 : static int py_netr_LogonSamLogonEx_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   54196             : {
   54197           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54198           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
   54199           0 :         if (value == NULL) {
   54200           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   54201           0 :                 return -1;
   54202             :         }
   54203           0 :         object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
   54204           0 :         if (object->in.logon == NULL) {
   54205           0 :                 PyErr_NoMemory();
   54206           0 :                 return -1;
   54207             :         }
   54208             :         {
   54209           0 :                 union netr_LogonLevel *logon_switch_1;
   54210           0 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(py_obj), object->in.logon_level, value, "union netr_LogonLevel");
   54211           0 :                 if (logon_switch_1 == NULL) {
   54212           0 :                         return -1;
   54213             :                 }
   54214           0 :                 object->in.logon = logon_switch_1;
   54215             :         }
   54216           0 :         return 0;
   54217             : }
   54218             : 
   54219           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_validation_level(PyObject *obj, void *closure)
   54220             : {
   54221           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54222           0 :         PyObject *py_validation_level;
   54223           0 :         py_validation_level = PyLong_FromLong((uint16_t)object->in.validation_level);
   54224           0 :         return py_validation_level;
   54225             : }
   54226             : 
   54227           0 : static int py_netr_LogonSamLogonEx_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   54228             : {
   54229           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54230           0 :         if (value == NULL) {
   54231           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.validation_level");
   54232           0 :                 return -1;
   54233             :         }
   54234             :         {
   54235           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   54236           0 :                 if (PyLong_Check(value)) {
   54237           0 :                         unsigned long long test_var;
   54238           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54239           0 :                         if (PyErr_Occurred() != NULL) {
   54240           0 :                                 return -1;
   54241             :                         }
   54242           0 :                         if (test_var > uint_max) {
   54243           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54244             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54245           0 :                                 return -1;
   54246             :                         }
   54247           0 :                         object->in.validation_level = test_var;
   54248             :                 } else {
   54249           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54250             :                           PyLong_Type.tp_name);
   54251           0 :                         return -1;
   54252             :                 }
   54253             :         }
   54254           0 :         return 0;
   54255             : }
   54256             : 
   54257           0 : static PyObject *py_netr_LogonSamLogonEx_out_get_validation(PyObject *obj, void *closure)
   54258             : {
   54259           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54260           0 :         PyObject *py_validation;
   54261           0 :         if (object->out.validation == NULL) {
   54262           0 :                 Py_RETURN_NONE;
   54263             :         }
   54264           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
   54265           0 :         if (py_validation == NULL) {
   54266           0 :                 return NULL;
   54267             :         }
   54268           0 :         return py_validation;
   54269             : }
   54270             : 
   54271           0 : static int py_netr_LogonSamLogonEx_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   54272             : {
   54273           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54274           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   54275           0 :         if (value == NULL) {
   54276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   54277           0 :                 return -1;
   54278             :         }
   54279           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   54280           0 :         if (object->out.validation == NULL) {
   54281           0 :                 PyErr_NoMemory();
   54282           0 :                 return -1;
   54283             :         }
   54284             :         {
   54285           0 :                 union netr_Validation *validation_switch_1;
   54286           0 :                 validation_switch_1 = (union netr_Validation *)pyrpc_export_union(&netr_Validation_Type, pytalloc_get_mem_ctx(py_obj), object->in.validation_level, value, "union netr_Validation");
   54287           0 :                 if (validation_switch_1 == NULL) {
   54288           0 :                         return -1;
   54289             :                 }
   54290           0 :                 object->out.validation = validation_switch_1;
   54291             :         }
   54292           0 :         return 0;
   54293             : }
   54294             : 
   54295           0 : static PyObject *py_netr_LogonSamLogonEx_out_get_authoritative(PyObject *obj, void *closure)
   54296             : {
   54297           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54298           0 :         PyObject *py_authoritative;
   54299           0 :         if (object->out.authoritative == NULL) {
   54300           0 :                 Py_RETURN_NONE;
   54301             :         }
   54302           0 :         py_authoritative = PyLong_FromLong((uint16_t)*object->out.authoritative);
   54303           0 :         return py_authoritative;
   54304             : }
   54305             : 
   54306           0 : static int py_netr_LogonSamLogonEx_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   54307             : {
   54308           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54309           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   54310           0 :         if (value == NULL) {
   54311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   54312           0 :                 return -1;
   54313             :         }
   54314           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   54315           0 :         if (object->out.authoritative == NULL) {
   54316           0 :                 PyErr_NoMemory();
   54317           0 :                 return -1;
   54318             :         }
   54319             :         {
   54320           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   54321           0 :                 if (PyLong_Check(value)) {
   54322           0 :                         unsigned long long test_var;
   54323           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54324           0 :                         if (PyErr_Occurred() != NULL) {
   54325           0 :                                 return -1;
   54326             :                         }
   54327           0 :                         if (test_var > uint_max) {
   54328           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54329             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54330           0 :                                 return -1;
   54331             :                         }
   54332           0 :                         *object->out.authoritative = test_var;
   54333             :                 } else {
   54334           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54335             :                           PyLong_Type.tp_name);
   54336           0 :                         return -1;
   54337             :                 }
   54338             :         }
   54339           0 :         return 0;
   54340             : }
   54341             : 
   54342           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_flags(PyObject *obj, void *closure)
   54343             : {
   54344           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54345           0 :         PyObject *py_flags;
   54346           0 :         if (object->in.flags == NULL) {
   54347           0 :                 Py_RETURN_NONE;
   54348             :         }
   54349           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->in.flags);
   54350           0 :         return py_flags;
   54351             : }
   54352             : 
   54353           0 : static int py_netr_LogonSamLogonEx_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   54354             : {
   54355           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54356           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.flags));
   54357           0 :         if (value == NULL) {
   54358           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   54359           0 :                 return -1;
   54360             :         }
   54361           0 :         object->in.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.flags);
   54362           0 :         if (object->in.flags == NULL) {
   54363           0 :                 PyErr_NoMemory();
   54364           0 :                 return -1;
   54365             :         }
   54366             :         {
   54367           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.flags));
   54368           0 :                 if (PyLong_Check(value)) {
   54369           0 :                         unsigned long long test_var;
   54370           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54371           0 :                         if (PyErr_Occurred() != NULL) {
   54372           0 :                                 return -1;
   54373             :                         }
   54374           0 :                         if (test_var > uint_max) {
   54375           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54376             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54377           0 :                                 return -1;
   54378             :                         }
   54379           0 :                         *object->in.flags = test_var;
   54380             :                 } else {
   54381           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54382             :                           PyLong_Type.tp_name);
   54383           0 :                         return -1;
   54384             :                 }
   54385             :         }
   54386           0 :         return 0;
   54387             : }
   54388             : 
   54389           0 : static PyObject *py_netr_LogonSamLogonEx_out_get_flags(PyObject *obj, void *closure)
   54390             : {
   54391           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54392           0 :         PyObject *py_flags;
   54393           0 :         if (object->out.flags == NULL) {
   54394           0 :                 Py_RETURN_NONE;
   54395             :         }
   54396           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->out.flags);
   54397           0 :         return py_flags;
   54398             : }
   54399             : 
   54400           0 : static int py_netr_LogonSamLogonEx_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   54401             : {
   54402           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54403           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
   54404           0 :         if (value == NULL) {
   54405           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.flags");
   54406           0 :                 return -1;
   54407             :         }
   54408           0 :         object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
   54409           0 :         if (object->out.flags == NULL) {
   54410           0 :                 PyErr_NoMemory();
   54411           0 :                 return -1;
   54412             :         }
   54413             :         {
   54414           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
   54415           0 :                 if (PyLong_Check(value)) {
   54416           0 :                         unsigned long long test_var;
   54417           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54418           0 :                         if (PyErr_Occurred() != NULL) {
   54419           0 :                                 return -1;
   54420             :                         }
   54421           0 :                         if (test_var > uint_max) {
   54422           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54423             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54424           0 :                                 return -1;
   54425             :                         }
   54426           0 :                         *object->out.flags = test_var;
   54427             :                 } else {
   54428           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54429             :                           PyLong_Type.tp_name);
   54430           0 :                         return -1;
   54431             :                 }
   54432             :         }
   54433           0 :         return 0;
   54434             : }
   54435             : 
   54436           0 : static PyObject *py_netr_LogonSamLogonEx_get_result(PyObject *obj, void *closure)
   54437             : {
   54438           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54439           0 :         PyObject *py_result;
   54440           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   54441           0 :         return py_result;
   54442             : }
   54443             : 
   54444           0 : static int py_netr_LogonSamLogonEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   54445             : {
   54446           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54447           0 :         if (value == NULL) {
   54448           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   54449           0 :                 return -1;
   54450             :         }
   54451           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   54452           0 :         return 0;
   54453             : }
   54454             : 
   54455             : static PyGetSetDef py_netr_LogonSamLogonEx_getsetters[] = {
   54456             :         {
   54457             :                 .name = discard_const_p(char, "in_server_name"),
   54458             :                 .get = py_netr_LogonSamLogonEx_in_get_server_name,
   54459             :                 .set = py_netr_LogonSamLogonEx_in_set_server_name,
   54460             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54461             :         },
   54462             :         {
   54463             :                 .name = discard_const_p(char, "in_computer_name"),
   54464             :                 .get = py_netr_LogonSamLogonEx_in_get_computer_name,
   54465             :                 .set = py_netr_LogonSamLogonEx_in_set_computer_name,
   54466             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54467             :         },
   54468             :         {
   54469             :                 .name = discard_const_p(char, "in_logon_level"),
   54470             :                 .get = py_netr_LogonSamLogonEx_in_get_logon_level,
   54471             :                 .set = py_netr_LogonSamLogonEx_in_set_logon_level,
   54472             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   54473             :         },
   54474             :         {
   54475             :                 .name = discard_const_p(char, "in_logon"),
   54476             :                 .get = py_netr_LogonSamLogonEx_in_get_logon,
   54477             :                 .set = py_netr_LogonSamLogonEx_in_set_logon,
   54478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   54479             :         },
   54480             :         {
   54481             :                 .name = discard_const_p(char, "in_validation_level"),
   54482             :                 .get = py_netr_LogonSamLogonEx_in_get_validation_level,
   54483             :                 .set = py_netr_LogonSamLogonEx_in_set_validation_level,
   54484             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54485             :         },
   54486             :         {
   54487             :                 .name = discard_const_p(char, "out_validation"),
   54488             :                 .get = py_netr_LogonSamLogonEx_out_get_validation,
   54489             :                 .set = py_netr_LogonSamLogonEx_out_set_validation,
   54490             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   54491             :         },
   54492             :         {
   54493             :                 .name = discard_const_p(char, "out_authoritative"),
   54494             :                 .get = py_netr_LogonSamLogonEx_out_get_authoritative,
   54495             :                 .set = py_netr_LogonSamLogonEx_out_set_authoritative,
   54496             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   54497             :         },
   54498             :         {
   54499             :                 .name = discard_const_p(char, "in_flags"),
   54500             :                 .get = py_netr_LogonSamLogonEx_in_get_flags,
   54501             :                 .set = py_netr_LogonSamLogonEx_in_set_flags,
   54502             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   54503             :         },
   54504             :         {
   54505             :                 .name = discard_const_p(char, "out_flags"),
   54506             :                 .get = py_netr_LogonSamLogonEx_out_get_flags,
   54507             :                 .set = py_netr_LogonSamLogonEx_out_set_flags,
   54508             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   54509             :         },
   54510             :         {
   54511             :                 .name = discard_const_p(char, "result"),
   54512             :                 .get = py_netr_LogonSamLogonEx_get_result,
   54513             :                 .set = py_netr_LogonSamLogonEx_set_result,
   54514             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   54515             :         },
   54516             :         { .name = NULL }
   54517             : };
   54518             : 
   54519           0 : static PyObject *py_netr_LogonSamLogonEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   54520             : {
   54521           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogonEx, type);
   54522           0 :         struct netr_LogonSamLogonEx *_self = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(self);
   54523           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   54524           0 :         _self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
   54525           0 :         _self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
   54526           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   54527           0 :         _self->in.flags = talloc_zero(mem_ctx, uint32_t);
   54528           0 :         _self->out.flags = talloc_zero(mem_ctx, uint32_t);
   54529           0 :         return self;
   54530             : }
   54531             : 
   54532           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   54533             : {
   54534             : 
   54535             : 
   54536           0 :         return PyLong_FromLong(39);
   54537             : }
   54538             : 
   54539           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   54540             : {
   54541           0 :         const struct ndr_interface_call *call = NULL;
   54542           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54543           0 :         PyObject *ret = NULL;
   54544           0 :         struct ndr_push *push = NULL;
   54545           0 :         DATA_BLOB blob;
   54546           0 :         enum ndr_err_code err;
   54547             : 
   54548           0 :         if (ndr_table_netlogon.num_calls < 40) {
   54549           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_pack");
   54550           0 :                 return NULL;
   54551             :         }
   54552           0 :         call = &ndr_table_netlogon.calls[39];
   54553             : 
   54554           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   54555           0 :         if (push == NULL) {
   54556           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54557           0 :                 return NULL;
   54558             :         }
   54559             : 
   54560           0 :         push->flags |= ndr_push_flags;
   54561             : 
   54562           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   54563           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54564           0 :                 TALLOC_FREE(push);
   54565           0 :                 PyErr_SetNdrError(err);
   54566           0 :                 return NULL;
   54567             :         }
   54568           0 :         blob = ndr_push_blob(push);
   54569           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   54570           0 :         TALLOC_FREE(push);
   54571           0 :         return ret;
   54572             : }
   54573             : 
   54574           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54575             : {
   54576           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54577           0 :         PyObject *bigendian_obj = NULL;
   54578           0 :         PyObject *ndr64_obj = NULL;
   54579           0 :         libndr_flags ndr_push_flags = 0;
   54580             : 
   54581           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   54582             :                 discard_const_p(char *, kwnames),
   54583             :                 &bigendian_obj,
   54584             :                 &ndr64_obj)) {
   54585           0 :                 return NULL;
   54586             :         }
   54587             : 
   54588           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54589           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54590             :         }
   54591           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54592           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54593             :         }
   54594             : 
   54595           0 :         return py_netr_LogonSamLogonEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   54596             : }
   54597             : 
   54598           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54599             : {
   54600           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54601           0 :         PyObject *bigendian_obj = NULL;
   54602           0 :         PyObject *ndr64_obj = NULL;
   54603           0 :         libndr_flags ndr_push_flags = 0;
   54604             : 
   54605           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   54606             :                 discard_const_p(char *, kwnames),
   54607             :                 &bigendian_obj,
   54608             :                 &ndr64_obj)) {
   54609           0 :                 return NULL;
   54610             :         }
   54611             : 
   54612           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54613           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54614             :         }
   54615           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54616           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54617             :         }
   54618             : 
   54619           0 :         return py_netr_LogonSamLogonEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   54620             : }
   54621             : 
   54622           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   54623             : {
   54624           0 :         const struct ndr_interface_call *call = NULL;
   54625           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54626           0 :         struct ndr_pull *pull = NULL;
   54627           0 :         enum ndr_err_code err;
   54628             : 
   54629           0 :         if (ndr_table_netlogon.num_calls < 40) {
   54630           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_unpack");
   54631           0 :                 return NULL;
   54632             :         }
   54633           0 :         call = &ndr_table_netlogon.calls[39];
   54634             : 
   54635           0 :         pull = ndr_pull_init_blob(blob, object);
   54636           0 :         if (pull == NULL) {
   54637           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54638           0 :                 return NULL;
   54639             :         }
   54640             : 
   54641           0 :         pull->flags |= ndr_pull_flags;
   54642             : 
   54643           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   54644           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54645           0 :                 TALLOC_FREE(pull);
   54646           0 :                 PyErr_SetNdrError(err);
   54647           0 :                 return NULL;
   54648             :         }
   54649           0 :         if (!allow_remaining) {
   54650           0 :                 uint32_t highest_ofs;
   54651             : 
   54652           0 :                 if (pull->offset > pull->relative_highest_offset) {
   54653           0 :                         highest_ofs = pull->offset;
   54654             :                 } else {
   54655           0 :                         highest_ofs = pull->relative_highest_offset;
   54656             :                 }
   54657           0 :                 if (highest_ofs < pull->data_size) {
   54658           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   54659             :                                 "not all bytes consumed ofs[%u] size[%u]",
   54660             :                                 highest_ofs, pull->data_size);
   54661           0 :                         TALLOC_FREE(pull);
   54662           0 :                         PyErr_SetNdrError(err);
   54663           0 :                         return NULL;
   54664             :                 }
   54665             :         }
   54666             : 
   54667           0 :         TALLOC_FREE(pull);
   54668           0 :         Py_RETURN_NONE;
   54669             : }
   54670             : 
   54671           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54672             : {
   54673           0 :         DATA_BLOB blob;
   54674           0 :         Py_ssize_t blob_length = 0;
   54675           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54676           0 :         PyObject *bigendian_obj = NULL;
   54677           0 :         PyObject *ndr64_obj = NULL;
   54678           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54679           0 :         PyObject *allow_remaining_obj = NULL;
   54680           0 :         bool allow_remaining = false;
   54681             : 
   54682           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   54683             :                 discard_const_p(char *, kwnames),
   54684             :                 &blob.data, &blob_length,
   54685             :                 &bigendian_obj,
   54686             :                 &ndr64_obj,
   54687             :                 &allow_remaining_obj)) {
   54688           0 :                 return NULL;
   54689             :         }
   54690           0 :         blob.length = blob_length;
   54691             : 
   54692           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54693           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54694             :         }
   54695           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54696           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54697             :         }
   54698             : 
   54699           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54700           0 :                 allow_remaining = true;
   54701             :         }
   54702             : 
   54703           0 :         return py_netr_LogonSamLogonEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   54704             : }
   54705             : 
   54706           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54707             : {
   54708           0 :         DATA_BLOB blob;
   54709           0 :         Py_ssize_t blob_length = 0;
   54710           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54711           0 :         PyObject *bigendian_obj = NULL;
   54712           0 :         PyObject *ndr64_obj = NULL;
   54713           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54714           0 :         PyObject *allow_remaining_obj = NULL;
   54715           0 :         bool allow_remaining = false;
   54716             : 
   54717           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   54718             :                 discard_const_p(char *, kwnames),
   54719             :                 &blob.data, &blob_length,
   54720             :                 &bigendian_obj,
   54721             :                 &ndr64_obj,
   54722             :                 &allow_remaining_obj)) {
   54723           0 :                 return NULL;
   54724             :         }
   54725           0 :         blob.length = blob_length;
   54726             : 
   54727           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54728           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54729             :         }
   54730           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54731           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54732             :         }
   54733             : 
   54734           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54735           0 :                 allow_remaining = true;
   54736             :         }
   54737             : 
   54738           0 :         return py_netr_LogonSamLogonEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   54739             : }
   54740             : 
   54741           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   54742             : {
   54743           0 :         const struct ndr_interface_call *call = NULL;
   54744           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54745           0 :         PyObject *ret;
   54746           0 :         char *retstr;
   54747             : 
   54748           0 :         if (ndr_table_netlogon.num_calls < 40) {
   54749           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_print");
   54750           0 :                 return NULL;
   54751             :         }
   54752           0 :         call = &ndr_table_netlogon.calls[39];
   54753             : 
   54754           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   54755           0 :         ret = PyUnicode_FromString(retstr);
   54756           0 :         TALLOC_FREE(retstr);
   54757             : 
   54758           0 :         return ret;
   54759             : }
   54760             : 
   54761           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54762             : {
   54763           0 :         return py_netr_LogonSamLogonEx_ndr_print(py_obj, "netr_LogonSamLogonEx_in", NDR_IN);
   54764             : }
   54765             : 
   54766           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54767             : {
   54768           0 :         return py_netr_LogonSamLogonEx_ndr_print(py_obj, "netr_LogonSamLogonEx_out", NDR_OUT);
   54769             : }
   54770             : 
   54771             : static PyMethodDef py_netr_LogonSamLogonEx_methods[] = {
   54772             :         { "opnum", (PyCFunction)py_netr_LogonSamLogonEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   54773             :                 "netlogon.netr_LogonSamLogonEx.opnum() -> 39 (0x27) " },
   54774             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   54775             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   54776             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   54777             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   54778             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   54779             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   54780             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   54781             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   54782             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogonEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   54783             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogonEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   54784             :         { NULL, NULL, 0, NULL }
   54785             : };
   54786             : 
   54787             : 
   54788             : static PyTypeObject netr_LogonSamLogonEx_Type = {
   54789             :         PyVarObject_HEAD_INIT(NULL, 0)
   54790             :         .tp_name = "netlogon.netr_LogonSamLogonEx",
   54791             :         .tp_getset = py_netr_LogonSamLogonEx_getsetters,
   54792             :         .tp_methods = py_netr_LogonSamLogonEx_methods,
   54793             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   54794             :         .tp_new = py_netr_LogonSamLogonEx_new,
   54795             : };
   54796             : 
   54797         171 : static bool pack_py_netr_LogonSamLogonEx_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogonEx *r)
   54798             : {
   54799           0 :         PyObject *py_server_name;
   54800           0 :         PyObject *py_computer_name;
   54801           0 :         PyObject *py_logon_level;
   54802           0 :         PyObject *py_logon;
   54803           0 :         PyObject *py_validation_level;
   54804           0 :         PyObject *py_flags;
   54805         171 :         const char *kwnames[] = {
   54806             :                 "server_name", "computer_name", "logon_level", "logon", "validation_level", "flags", NULL
   54807             :         };
   54808             : 
   54809         171 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_LogonSamLogonEx", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_logon_level, &py_logon, &py_validation_level, &py_flags)) {
   54810           0 :                 return false;
   54811             :         }
   54812             : 
   54813         171 :         if (py_server_name == NULL) {
   54814           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   54815           0 :                 return false;
   54816             :         }
   54817         171 :         if (py_server_name == Py_None) {
   54818           0 :                 r->in.server_name = NULL;
   54819             :         } else {
   54820         171 :                 r->in.server_name = NULL;
   54821             :                 {
   54822           0 :                         const char *test_str;
   54823           0 :                         const char *talloc_str;
   54824         171 :                         PyObject *unicode = NULL;
   54825         171 :                         if (PyUnicode_Check(py_server_name)) {
   54826         171 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   54827         171 :                                 if (unicode == NULL) {
   54828           0 :                                         PyErr_NoMemory();
   54829           0 :                                         return false;
   54830             :                                 }
   54831         171 :                                 test_str = PyBytes_AS_STRING(unicode);
   54832           0 :                         } else if (PyBytes_Check(py_server_name)) {
   54833           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   54834             :                         } else {
   54835           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   54836           0 :                                 return false;
   54837             :                         }
   54838         171 :                         talloc_str = talloc_strdup(r, test_str);
   54839         171 :                         if (unicode != NULL) {
   54840         171 :                                 Py_DECREF(unicode);
   54841             :                         }
   54842         171 :                         if (talloc_str == NULL) {
   54843           0 :                                 PyErr_NoMemory();
   54844           0 :                                 return false;
   54845             :                         }
   54846         171 :                         r->in.server_name = talloc_str;
   54847             :                 }
   54848             :         }
   54849         171 :         if (py_computer_name == NULL) {
   54850           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   54851           0 :                 return false;
   54852             :         }
   54853         171 :         if (py_computer_name == Py_None) {
   54854           0 :                 r->in.computer_name = NULL;
   54855             :         } else {
   54856         171 :                 r->in.computer_name = NULL;
   54857             :                 {
   54858           0 :                         const char *test_str;
   54859           0 :                         const char *talloc_str;
   54860         171 :                         PyObject *unicode = NULL;
   54861         171 :                         if (PyUnicode_Check(py_computer_name)) {
   54862         171 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   54863         171 :                                 if (unicode == NULL) {
   54864           0 :                                         PyErr_NoMemory();
   54865           0 :                                         return false;
   54866             :                                 }
   54867         171 :                                 test_str = PyBytes_AS_STRING(unicode);
   54868           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   54869           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   54870             :                         } else {
   54871           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   54872           0 :                                 return false;
   54873             :                         }
   54874         171 :                         talloc_str = talloc_strdup(r, test_str);
   54875         171 :                         if (unicode != NULL) {
   54876         171 :                                 Py_DECREF(unicode);
   54877             :                         }
   54878         171 :                         if (talloc_str == NULL) {
   54879           0 :                                 PyErr_NoMemory();
   54880           0 :                                 return false;
   54881             :                         }
   54882         171 :                         r->in.computer_name = talloc_str;
   54883             :                 }
   54884             :         }
   54885         171 :         if (py_logon_level == NULL) {
   54886           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   54887           0 :                 return false;
   54888             :         }
   54889             :         {
   54890         171 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   54891         171 :                 if (PyLong_Check(py_logon_level)) {
   54892           0 :                         unsigned long long test_var;
   54893         171 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   54894         171 :                         if (PyErr_Occurred() != NULL) {
   54895           0 :                                 return false;
   54896             :                         }
   54897         171 :                         if (test_var > uint_max) {
   54898           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54899             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54900           0 :                                 return false;
   54901             :                         }
   54902         171 :                         r->in.logon_level = test_var;
   54903             :                 } else {
   54904           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54905             :                           PyLong_Type.tp_name);
   54906           0 :                         return false;
   54907             :                 }
   54908             :         }
   54909         171 :         if (py_logon == NULL) {
   54910           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   54911           0 :                 return false;
   54912             :         }
   54913         171 :         r->in.logon = talloc_ptrtype(r, r->in.logon);
   54914         171 :         if (r->in.logon == NULL) {
   54915           0 :                 PyErr_NoMemory();
   54916           0 :                 return false;
   54917             :         }
   54918             :         {
   54919           0 :                 union netr_LogonLevel *logon_switch_1;
   54920         171 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   54921         171 :                 if (logon_switch_1 == NULL) {
   54922           0 :                         return false;
   54923             :                 }
   54924         171 :                 r->in.logon = logon_switch_1;
   54925             :         }
   54926         171 :         if (py_validation_level == NULL) {
   54927           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.validation_level");
   54928           0 :                 return false;
   54929             :         }
   54930             :         {
   54931         171 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   54932         171 :                 if (PyLong_Check(py_validation_level)) {
   54933           0 :                         unsigned long long test_var;
   54934         171 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   54935         171 :                         if (PyErr_Occurred() != NULL) {
   54936           0 :                                 return false;
   54937             :                         }
   54938         171 :                         if (test_var > uint_max) {
   54939           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54940             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54941           0 :                                 return false;
   54942             :                         }
   54943         171 :                         r->in.validation_level = test_var;
   54944             :                 } else {
   54945           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54946             :                           PyLong_Type.tp_name);
   54947           0 :                         return false;
   54948             :                 }
   54949             :         }
   54950         171 :         if (py_flags == NULL) {
   54951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   54952           0 :                 return false;
   54953             :         }
   54954         171 :         r->in.flags = talloc_ptrtype(r, r->in.flags);
   54955         171 :         if (r->in.flags == NULL) {
   54956           0 :                 PyErr_NoMemory();
   54957           0 :                 return false;
   54958             :         }
   54959             :         {
   54960         171 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.flags));
   54961         171 :                 if (PyLong_Check(py_flags)) {
   54962           0 :                         unsigned long long test_var;
   54963         171 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   54964         171 :                         if (PyErr_Occurred() != NULL) {
   54965           0 :                                 return false;
   54966             :                         }
   54967         171 :                         if (test_var > uint_max) {
   54968           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54969             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54970           0 :                                 return false;
   54971             :                         }
   54972         171 :                         *r->in.flags = test_var;
   54973             :                 } else {
   54974           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54975             :                           PyLong_Type.tp_name);
   54976           0 :                         return false;
   54977             :                 }
   54978             :         }
   54979         171 :         return true;
   54980             : }
   54981             : 
   54982         171 : static PyObject *unpack_py_netr_LogonSamLogonEx_args_out(struct netr_LogonSamLogonEx *r)
   54983             : {
   54984           0 :         PyObject *result;
   54985           0 :         PyObject *py_validation;
   54986           0 :         PyObject *py_authoritative;
   54987           0 :         PyObject *py_flags;
   54988         171 :         result = PyTuple_New(3);
   54989         171 :         py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
   54990         171 :         if (py_validation == NULL) {
   54991           0 :                 return NULL;
   54992             :         }
   54993         171 :         PyTuple_SetItem(result, 0, py_validation);
   54994         171 :         py_authoritative = PyLong_FromLong((uint16_t)*r->out.authoritative);
   54995         171 :         PyTuple_SetItem(result, 1, py_authoritative);
   54996         171 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*r->out.flags);
   54997         171 :         PyTuple_SetItem(result, 2, py_flags);
   54998         171 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   54999          79 :                 PyErr_SetNTSTATUS(r->out.result);
   55000          79 :                 return NULL;
   55001             :         }
   55002             : 
   55003          92 :         return result;
   55004             : }
   55005             : 
   55006             : 
   55007           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_in_get_server_name(PyObject *obj, void *closure)
   55008             : {
   55009           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(obj);
   55010           0 :         PyObject *py_server_name;
   55011           0 :         if (object->in.server_name == NULL) {
   55012           0 :                 Py_RETURN_NONE;
   55013             :         }
   55014           0 :         if (object->in.server_name == NULL) {
   55015           0 :                 py_server_name = Py_None;
   55016           0 :                 Py_INCREF(py_server_name);
   55017             :         } else {
   55018           0 :                 if (object->in.server_name == NULL) {
   55019           0 :                         py_server_name = Py_None;
   55020           0 :                         Py_INCREF(py_server_name);
   55021             :                 } else {
   55022           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   55023             :                 }
   55024             :         }
   55025           0 :         return py_server_name;
   55026             : }
   55027             : 
   55028           0 : static int py_netr_DsrEnumerateDomainTrusts_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   55029             : {
   55030           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   55031           0 :         if (value == NULL) {
   55032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   55033           0 :                 return -1;
   55034             :         }
   55035           0 :         if (value == Py_None) {
   55036           0 :                 object->in.server_name = NULL;
   55037             :         } else {
   55038           0 :                 object->in.server_name = NULL;
   55039             :                 {
   55040           0 :                         const char *test_str;
   55041           0 :                         const char *talloc_str;
   55042           0 :                         PyObject *unicode = NULL;
   55043           0 :                         if (PyUnicode_Check(value)) {
   55044           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55045           0 :                                 if (unicode == NULL) {
   55046           0 :                                         PyErr_NoMemory();
   55047           0 :                                         return -1;
   55048             :                                 }
   55049           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55050           0 :                         } else if (PyBytes_Check(value)) {
   55051           0 :                                 test_str = PyBytes_AS_STRING(value);
   55052             :                         } else {
   55053           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55054           0 :                                 return -1;
   55055             :                         }
   55056           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55057           0 :                         if (unicode != NULL) {
   55058           0 :                                 Py_DECREF(unicode);
   55059             :                         }
   55060           0 :                         if (talloc_str == NULL) {
   55061           0 :                                 PyErr_NoMemory();
   55062           0 :                                 return -1;
   55063             :                         }
   55064           0 :                         object->in.server_name = talloc_str;
   55065             :                 }
   55066             :         }
   55067           0 :         return 0;
   55068             : }
   55069             : 
   55070           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_in_get_trust_flags(PyObject *obj, void *closure)
   55071             : {
   55072           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(obj);
   55073           0 :         PyObject *py_trust_flags;
   55074           0 :         py_trust_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.trust_flags);
   55075           0 :         return py_trust_flags;
   55076             : }
   55077             : 
   55078           0 : static int py_netr_DsrEnumerateDomainTrusts_in_set_trust_flags(PyObject *py_obj, PyObject *value, void *closure)
   55079             : {
   55080           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   55081           0 :         if (value == NULL) {
   55082           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.trust_flags");
   55083           0 :                 return -1;
   55084             :         }
   55085             :         {
   55086           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.trust_flags));
   55087           0 :                 if (PyLong_Check(value)) {
   55088           0 :                         unsigned long long test_var;
   55089           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   55090           0 :                         if (PyErr_Occurred() != NULL) {
   55091           0 :                                 return -1;
   55092             :                         }
   55093           0 :                         if (test_var > uint_max) {
   55094           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55095             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55096           0 :                                 return -1;
   55097             :                         }
   55098           0 :                         object->in.trust_flags = test_var;
   55099             :                 } else {
   55100           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   55101             :                           PyLong_Type.tp_name);
   55102           0 :                         return -1;
   55103             :                 }
   55104             :         }
   55105           0 :         return 0;
   55106             : }
   55107             : 
   55108           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_out_get_trusts(PyObject *obj, void *closure)
   55109             : {
   55110           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(obj);
   55111           0 :         PyObject *py_trusts;
   55112           0 :         if (object->out.trusts == NULL) {
   55113           0 :                 Py_RETURN_NONE;
   55114             :         }
   55115           0 :         py_trusts = pytalloc_reference_ex(&netr_DomainTrustList_Type, object->out.trusts, object->out.trusts);
   55116           0 :         return py_trusts;
   55117             : }
   55118             : 
   55119           0 : static int py_netr_DsrEnumerateDomainTrusts_out_set_trusts(PyObject *py_obj, PyObject *value, void *closure)
   55120             : {
   55121           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   55122           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trusts));
   55123           0 :         if (value == NULL) {
   55124           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.trusts");
   55125           0 :                 return -1;
   55126             :         }
   55127           0 :         object->out.trusts = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trusts);
   55128           0 :         if (object->out.trusts == NULL) {
   55129           0 :                 PyErr_NoMemory();
   55130           0 :                 return -1;
   55131             :         }
   55132           0 :         PY_CHECK_TYPE(&netr_DomainTrustList_Type, value, return -1;);
   55133           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   55134           0 :                 PyErr_NoMemory();
   55135           0 :                 return -1;
   55136             :         }
   55137           0 :         object->out.trusts = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
   55138           0 :         return 0;
   55139             : }
   55140             : 
   55141           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_get_result(PyObject *obj, void *closure)
   55142             : {
   55143           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(obj);
   55144           0 :         PyObject *py_result;
   55145           0 :         py_result = PyErr_FromWERROR(object->out.result);
   55146           0 :         return py_result;
   55147             : }
   55148             : 
   55149           0 : static int py_netr_DsrEnumerateDomainTrusts_set_result(PyObject *py_obj, PyObject *value, void *closure)
   55150             : {
   55151           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   55152           0 :         if (value == NULL) {
   55153           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   55154           0 :                 return -1;
   55155             :         }
   55156           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   55157           0 :         return 0;
   55158             : }
   55159             : 
   55160             : static PyGetSetDef py_netr_DsrEnumerateDomainTrusts_getsetters[] = {
   55161             :         {
   55162             :                 .name = discard_const_p(char, "in_server_name"),
   55163             :                 .get = py_netr_DsrEnumerateDomainTrusts_in_get_server_name,
   55164             :                 .set = py_netr_DsrEnumerateDomainTrusts_in_set_server_name,
   55165             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55166             :         },
   55167             :         {
   55168             :                 .name = discard_const_p(char, "in_trust_flags"),
   55169             :                 .get = py_netr_DsrEnumerateDomainTrusts_in_get_trust_flags,
   55170             :                 .set = py_netr_DsrEnumerateDomainTrusts_in_set_trust_flags,
   55171             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
   55172             :         },
   55173             :         {
   55174             :                 .name = discard_const_p(char, "out_trusts"),
   55175             :                 .get = py_netr_DsrEnumerateDomainTrusts_out_get_trusts,
   55176             :                 .set = py_netr_DsrEnumerateDomainTrusts_out_set_trusts,
   55177             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
   55178             :         },
   55179             :         {
   55180             :                 .name = discard_const_p(char, "result"),
   55181             :                 .get = py_netr_DsrEnumerateDomainTrusts_get_result,
   55182             :                 .set = py_netr_DsrEnumerateDomainTrusts_set_result,
   55183             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   55184             :         },
   55185             :         { .name = NULL }
   55186             : };
   55187             : 
   55188           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   55189             : {
   55190           0 :         PyObject *self = pytalloc_new(struct netr_DsrEnumerateDomainTrusts, type);
   55191           0 :         struct netr_DsrEnumerateDomainTrusts *_self = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(self);
   55192           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   55193           0 :         _self->out.trusts = talloc_zero(mem_ctx, struct netr_DomainTrustList);
   55194           0 :         return self;
   55195             : }
   55196             : 
   55197           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   55198             : {
   55199             : 
   55200             : 
   55201           0 :         return PyLong_FromLong(40);
   55202             : }
   55203             : 
   55204           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   55205             : {
   55206           0 :         const struct ndr_interface_call *call = NULL;
   55207           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   55208           0 :         PyObject *ret = NULL;
   55209           0 :         struct ndr_push *push = NULL;
   55210           0 :         DATA_BLOB blob;
   55211           0 :         enum ndr_err_code err;
   55212             : 
   55213           0 :         if (ndr_table_netlogon.num_calls < 41) {
   55214           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_pack");
   55215           0 :                 return NULL;
   55216             :         }
   55217           0 :         call = &ndr_table_netlogon.calls[40];
   55218             : 
   55219           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   55220           0 :         if (push == NULL) {
   55221           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55222           0 :                 return NULL;
   55223             :         }
   55224             : 
   55225           0 :         push->flags |= ndr_push_flags;
   55226             : 
   55227           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   55228           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55229           0 :                 TALLOC_FREE(push);
   55230           0 :                 PyErr_SetNdrError(err);
   55231           0 :                 return NULL;
   55232             :         }
   55233           0 :         blob = ndr_push_blob(push);
   55234           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   55235           0 :         TALLOC_FREE(push);
   55236           0 :         return ret;
   55237             : }
   55238             : 
   55239           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55240             : {
   55241           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55242           0 :         PyObject *bigendian_obj = NULL;
   55243           0 :         PyObject *ndr64_obj = NULL;
   55244           0 :         libndr_flags ndr_push_flags = 0;
   55245             : 
   55246           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   55247             :                 discard_const_p(char *, kwnames),
   55248             :                 &bigendian_obj,
   55249             :                 &ndr64_obj)) {
   55250           0 :                 return NULL;
   55251             :         }
   55252             : 
   55253           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55254           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55255             :         }
   55256           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55257           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55258             :         }
   55259             : 
   55260           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   55261             : }
   55262             : 
   55263           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55264             : {
   55265           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55266           0 :         PyObject *bigendian_obj = NULL;
   55267           0 :         PyObject *ndr64_obj = NULL;
   55268           0 :         libndr_flags ndr_push_flags = 0;
   55269             : 
   55270           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   55271             :                 discard_const_p(char *, kwnames),
   55272             :                 &bigendian_obj,
   55273             :                 &ndr64_obj)) {
   55274           0 :                 return NULL;
   55275             :         }
   55276             : 
   55277           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55278           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55279             :         }
   55280           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55281           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55282             :         }
   55283             : 
   55284           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   55285             : }
   55286             : 
   55287           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   55288             : {
   55289           0 :         const struct ndr_interface_call *call = NULL;
   55290           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   55291           0 :         struct ndr_pull *pull = NULL;
   55292           0 :         enum ndr_err_code err;
   55293             : 
   55294           0 :         if (ndr_table_netlogon.num_calls < 41) {
   55295           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_unpack");
   55296           0 :                 return NULL;
   55297             :         }
   55298           0 :         call = &ndr_table_netlogon.calls[40];
   55299             : 
   55300           0 :         pull = ndr_pull_init_blob(blob, object);
   55301           0 :         if (pull == NULL) {
   55302           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55303           0 :                 return NULL;
   55304             :         }
   55305             : 
   55306           0 :         pull->flags |= ndr_pull_flags;
   55307             : 
   55308           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   55309           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55310           0 :                 TALLOC_FREE(pull);
   55311           0 :                 PyErr_SetNdrError(err);
   55312           0 :                 return NULL;
   55313             :         }
   55314           0 :         if (!allow_remaining) {
   55315           0 :                 uint32_t highest_ofs;
   55316             : 
   55317           0 :                 if (pull->offset > pull->relative_highest_offset) {
   55318           0 :                         highest_ofs = pull->offset;
   55319             :                 } else {
   55320           0 :                         highest_ofs = pull->relative_highest_offset;
   55321             :                 }
   55322           0 :                 if (highest_ofs < pull->data_size) {
   55323           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   55324             :                                 "not all bytes consumed ofs[%u] size[%u]",
   55325             :                                 highest_ofs, pull->data_size);
   55326           0 :                         TALLOC_FREE(pull);
   55327           0 :                         PyErr_SetNdrError(err);
   55328           0 :                         return NULL;
   55329             :                 }
   55330             :         }
   55331             : 
   55332           0 :         TALLOC_FREE(pull);
   55333           0 :         Py_RETURN_NONE;
   55334             : }
   55335             : 
   55336           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55337             : {
   55338           0 :         DATA_BLOB blob;
   55339           0 :         Py_ssize_t blob_length = 0;
   55340           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55341           0 :         PyObject *bigendian_obj = NULL;
   55342           0 :         PyObject *ndr64_obj = NULL;
   55343           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55344           0 :         PyObject *allow_remaining_obj = NULL;
   55345           0 :         bool allow_remaining = false;
   55346             : 
   55347           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   55348             :                 discard_const_p(char *, kwnames),
   55349             :                 &blob.data, &blob_length,
   55350             :                 &bigendian_obj,
   55351             :                 &ndr64_obj,
   55352             :                 &allow_remaining_obj)) {
   55353           0 :                 return NULL;
   55354             :         }
   55355           0 :         blob.length = blob_length;
   55356             : 
   55357           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55358           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55359             :         }
   55360           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55361           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55362             :         }
   55363             : 
   55364           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55365           0 :                 allow_remaining = true;
   55366             :         }
   55367             : 
   55368           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   55369             : }
   55370             : 
   55371           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55372             : {
   55373           0 :         DATA_BLOB blob;
   55374           0 :         Py_ssize_t blob_length = 0;
   55375           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55376           0 :         PyObject *bigendian_obj = NULL;
   55377           0 :         PyObject *ndr64_obj = NULL;
   55378           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55379           0 :         PyObject *allow_remaining_obj = NULL;
   55380           0 :         bool allow_remaining = false;
   55381             : 
   55382           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   55383             :                 discard_const_p(char *, kwnames),
   55384             :                 &blob.data, &blob_length,
   55385             :                 &bigendian_obj,
   55386             :                 &ndr64_obj,
   55387             :                 &allow_remaining_obj)) {
   55388           0 :                 return NULL;
   55389             :         }
   55390           0 :         blob.length = blob_length;
   55391             : 
   55392           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55393           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55394             :         }
   55395           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55396           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55397             :         }
   55398             : 
   55399           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55400           0 :                 allow_remaining = true;
   55401             :         }
   55402             : 
   55403           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   55404             : }
   55405             : 
   55406           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   55407             : {
   55408           0 :         const struct ndr_interface_call *call = NULL;
   55409           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   55410           0 :         PyObject *ret;
   55411           0 :         char *retstr;
   55412             : 
   55413           0 :         if (ndr_table_netlogon.num_calls < 41) {
   55414           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_print");
   55415           0 :                 return NULL;
   55416             :         }
   55417           0 :         call = &ndr_table_netlogon.calls[40];
   55418             : 
   55419           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   55420           0 :         ret = PyUnicode_FromString(retstr);
   55421           0 :         TALLOC_FREE(retstr);
   55422             : 
   55423           0 :         return ret;
   55424             : }
   55425             : 
   55426           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55427             : {
   55428           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_print(py_obj, "netr_DsrEnumerateDomainTrusts_in", NDR_IN);
   55429             : }
   55430             : 
   55431           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55432             : {
   55433           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_print(py_obj, "netr_DsrEnumerateDomainTrusts_out", NDR_OUT);
   55434             : }
   55435             : 
   55436             : static PyMethodDef py_netr_DsrEnumerateDomainTrusts_methods[] = {
   55437             :         { "opnum", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_opnum, METH_NOARGS|METH_CLASS,
   55438             :                 "netlogon.netr_DsrEnumerateDomainTrusts.opnum() -> 40 (0x28) " },
   55439             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   55440             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   55441             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   55442             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   55443             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   55444             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   55445             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   55446             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   55447             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   55448             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   55449             :         { NULL, NULL, 0, NULL }
   55450             : };
   55451             : 
   55452             : 
   55453             : static PyTypeObject netr_DsrEnumerateDomainTrusts_Type = {
   55454             :         PyVarObject_HEAD_INIT(NULL, 0)
   55455             :         .tp_name = "netlogon.netr_DsrEnumerateDomainTrusts",
   55456             :         .tp_getset = py_netr_DsrEnumerateDomainTrusts_getsetters,
   55457             :         .tp_methods = py_netr_DsrEnumerateDomainTrusts_methods,
   55458             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   55459             :         .tp_new = py_netr_DsrEnumerateDomainTrusts_new,
   55460             : };
   55461             : 
   55462          19 : static bool pack_py_netr_DsrEnumerateDomainTrusts_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrEnumerateDomainTrusts *r)
   55463             : {
   55464           0 :         PyObject *py_server_name;
   55465           0 :         PyObject *py_trust_flags;
   55466          19 :         const char *kwnames[] = {
   55467             :                 "server_name", "trust_flags", NULL
   55468             :         };
   55469             : 
   55470          19 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsrEnumerateDomainTrusts", discard_const_p(char *, kwnames), &py_server_name, &py_trust_flags)) {
   55471           0 :                 return false;
   55472             :         }
   55473             : 
   55474          19 :         if (py_server_name == NULL) {
   55475           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   55476           0 :                 return false;
   55477             :         }
   55478          19 :         if (py_server_name == Py_None) {
   55479           0 :                 r->in.server_name = NULL;
   55480             :         } else {
   55481          19 :                 r->in.server_name = NULL;
   55482             :                 {
   55483           0 :                         const char *test_str;
   55484           0 :                         const char *talloc_str;
   55485          19 :                         PyObject *unicode = NULL;
   55486          19 :                         if (PyUnicode_Check(py_server_name)) {
   55487          19 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   55488          19 :                                 if (unicode == NULL) {
   55489           0 :                                         PyErr_NoMemory();
   55490           0 :                                         return false;
   55491             :                                 }
   55492          19 :                                 test_str = PyBytes_AS_STRING(unicode);
   55493           0 :                         } else if (PyBytes_Check(py_server_name)) {
   55494           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   55495             :                         } else {
   55496           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   55497           0 :                                 return false;
   55498             :                         }
   55499          19 :                         talloc_str = talloc_strdup(r, test_str);
   55500          19 :                         if (unicode != NULL) {
   55501          19 :                                 Py_DECREF(unicode);
   55502             :                         }
   55503          19 :                         if (talloc_str == NULL) {
   55504           0 :                                 PyErr_NoMemory();
   55505           0 :                                 return false;
   55506             :                         }
   55507          19 :                         r->in.server_name = talloc_str;
   55508             :                 }
   55509             :         }
   55510          19 :         if (py_trust_flags == NULL) {
   55511           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.trust_flags");
   55512           0 :                 return false;
   55513             :         }
   55514             :         {
   55515          19 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.trust_flags));
   55516          19 :                 if (PyLong_Check(py_trust_flags)) {
   55517           0 :                         unsigned long long test_var;
   55518          19 :                         test_var = PyLong_AsUnsignedLongLong(py_trust_flags);
   55519          19 :                         if (PyErr_Occurred() != NULL) {
   55520           0 :                                 return false;
   55521             :                         }
   55522          19 :                         if (test_var > uint_max) {
   55523           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55524             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55525           0 :                                 return false;
   55526             :                         }
   55527          19 :                         r->in.trust_flags = test_var;
   55528             :                 } else {
   55529           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   55530             :                           PyLong_Type.tp_name);
   55531           0 :                         return false;
   55532             :                 }
   55533             :         }
   55534          19 :         return true;
   55535             : }
   55536             : 
   55537          19 : static PyObject *unpack_py_netr_DsrEnumerateDomainTrusts_args_out(struct netr_DsrEnumerateDomainTrusts *r)
   55538             : {
   55539           0 :         PyObject *result;
   55540           0 :         PyObject *py_trusts;
   55541          19 :         py_trusts = pytalloc_reference_ex(&netr_DomainTrustList_Type, r->out.trusts, r->out.trusts);
   55542          19 :         result = py_trusts;
   55543          19 :         if (!W_ERROR_IS_OK(r->out.result)) {
   55544           0 :                 PyErr_SetWERROR(r->out.result);
   55545           0 :                 return NULL;
   55546             :         }
   55547             : 
   55548          19 :         return result;
   55549             : }
   55550             : 
   55551             : 
   55552           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_server_name(PyObject *obj, void *closure)
   55553             : {
   55554           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55555           0 :         PyObject *py_server_name;
   55556           0 :         if (object->in.server_name == NULL) {
   55557           0 :                 Py_RETURN_NONE;
   55558             :         }
   55559           0 :         if (object->in.server_name == NULL) {
   55560           0 :                 py_server_name = Py_None;
   55561           0 :                 Py_INCREF(py_server_name);
   55562             :         } else {
   55563           0 :                 if (object->in.server_name == NULL) {
   55564           0 :                         py_server_name = Py_None;
   55565           0 :                         Py_INCREF(py_server_name);
   55566             :                 } else {
   55567           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   55568             :                 }
   55569             :         }
   55570           0 :         return py_server_name;
   55571             : }
   55572             : 
   55573           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   55574             : {
   55575           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55576           0 :         if (value == NULL) {
   55577           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   55578           0 :                 return -1;
   55579             :         }
   55580           0 :         if (value == Py_None) {
   55581           0 :                 object->in.server_name = NULL;
   55582             :         } else {
   55583           0 :                 object->in.server_name = NULL;
   55584             :                 {
   55585           0 :                         const char *test_str;
   55586           0 :                         const char *talloc_str;
   55587           0 :                         PyObject *unicode = NULL;
   55588           0 :                         if (PyUnicode_Check(value)) {
   55589           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55590           0 :                                 if (unicode == NULL) {
   55591           0 :                                         PyErr_NoMemory();
   55592           0 :                                         return -1;
   55593             :                                 }
   55594           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55595           0 :                         } else if (PyBytes_Check(value)) {
   55596           0 :                                 test_str = PyBytes_AS_STRING(value);
   55597             :                         } else {
   55598           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55599           0 :                                 return -1;
   55600             :                         }
   55601           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55602           0 :                         if (unicode != NULL) {
   55603           0 :                                 Py_DECREF(unicode);
   55604             :                         }
   55605           0 :                         if (talloc_str == NULL) {
   55606           0 :                                 PyErr_NoMemory();
   55607           0 :                                 return -1;
   55608             :                         }
   55609           0 :                         object->in.server_name = talloc_str;
   55610             :                 }
   55611             :         }
   55612           0 :         return 0;
   55613             : }
   55614             : 
   55615           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_domain(PyObject *obj, void *closure)
   55616             : {
   55617           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55618           0 :         PyObject *py_domain;
   55619           0 :         if (object->in.domain == NULL) {
   55620           0 :                 Py_RETURN_NONE;
   55621             :         }
   55622           0 :         if (object->in.domain == NULL) {
   55623           0 :                 py_domain = Py_None;
   55624           0 :                 Py_INCREF(py_domain);
   55625             :         } else {
   55626           0 :                 if (object->in.domain == NULL) {
   55627           0 :                         py_domain = Py_None;
   55628           0 :                         Py_INCREF(py_domain);
   55629             :                 } else {
   55630           0 :                         py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
   55631             :                 }
   55632             :         }
   55633           0 :         return py_domain;
   55634             : }
   55635             : 
   55636           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   55637             : {
   55638           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55639           0 :         if (value == NULL) {
   55640           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain");
   55641           0 :                 return -1;
   55642             :         }
   55643           0 :         if (value == Py_None) {
   55644           0 :                 object->in.domain = NULL;
   55645             :         } else {
   55646           0 :                 object->in.domain = NULL;
   55647             :                 {
   55648           0 :                         const char *test_str;
   55649           0 :                         const char *talloc_str;
   55650           0 :                         PyObject *unicode = NULL;
   55651           0 :                         if (PyUnicode_Check(value)) {
   55652           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55653           0 :                                 if (unicode == NULL) {
   55654           0 :                                         PyErr_NoMemory();
   55655           0 :                                         return -1;
   55656             :                                 }
   55657           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55658           0 :                         } else if (PyBytes_Check(value)) {
   55659           0 :                                 test_str = PyBytes_AS_STRING(value);
   55660             :                         } else {
   55661           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55662           0 :                                 return -1;
   55663             :                         }
   55664           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55665           0 :                         if (unicode != NULL) {
   55666           0 :                                 Py_DECREF(unicode);
   55667             :                         }
   55668           0 :                         if (talloc_str == NULL) {
   55669           0 :                                 PyErr_NoMemory();
   55670           0 :                                 return -1;
   55671             :                         }
   55672           0 :                         object->in.domain = talloc_str;
   55673             :                 }
   55674             :         }
   55675           0 :         return 0;
   55676             : }
   55677             : 
   55678           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_domain_guid(PyObject *obj, void *closure)
   55679             : {
   55680           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55681           0 :         PyObject *py_domain_guid;
   55682           0 :         if (object->in.domain_guid == NULL) {
   55683           0 :                 Py_RETURN_NONE;
   55684             :         }
   55685           0 :         if (object->in.domain_guid == NULL) {
   55686           0 :                 py_domain_guid = Py_None;
   55687           0 :                 Py_INCREF(py_domain_guid);
   55688             :         } else {
   55689           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   55690             :         }
   55691           0 :         return py_domain_guid;
   55692             : }
   55693             : 
   55694           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   55695             : {
   55696           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55697           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   55698           0 :         if (value == NULL) {
   55699           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   55700           0 :                 return -1;
   55701             :         }
   55702           0 :         if (value == Py_None) {
   55703           0 :                 object->in.domain_guid = NULL;
   55704             :         } else {
   55705           0 :                 object->in.domain_guid = NULL;
   55706           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   55707           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   55708           0 :                         PyErr_NoMemory();
   55709           0 :                         return -1;
   55710             :                 }
   55711           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   55712             :         }
   55713           0 :         return 0;
   55714             : }
   55715             : 
   55716           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_dsa_guid(PyObject *obj, void *closure)
   55717             : {
   55718           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55719           0 :         PyObject *py_dsa_guid;
   55720           0 :         if (object->in.dsa_guid == NULL) {
   55721           0 :                 Py_RETURN_NONE;
   55722             :         }
   55723           0 :         if (object->in.dsa_guid == NULL) {
   55724           0 :                 py_dsa_guid = Py_None;
   55725           0 :                 Py_INCREF(py_dsa_guid);
   55726             :         } else {
   55727           0 :                 py_dsa_guid = pytalloc_reference_ex(GUID_Type, object->in.dsa_guid, object->in.dsa_guid);
   55728             :         }
   55729           0 :         return py_dsa_guid;
   55730             : }
   55731             : 
   55732           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
   55733             : {
   55734           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55735           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dsa_guid));
   55736           0 :         if (value == NULL) {
   55737           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dsa_guid");
   55738           0 :                 return -1;
   55739             :         }
   55740           0 :         if (value == Py_None) {
   55741           0 :                 object->in.dsa_guid = NULL;
   55742             :         } else {
   55743           0 :                 object->in.dsa_guid = NULL;
   55744           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   55745           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   55746           0 :                         PyErr_NoMemory();
   55747           0 :                         return -1;
   55748             :                 }
   55749           0 :                 object->in.dsa_guid = (struct GUID *)pytalloc_get_ptr(value);
   55750             :         }
   55751           0 :         return 0;
   55752             : }
   55753             : 
   55754           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_dns_host(PyObject *obj, void *closure)
   55755             : {
   55756           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55757           0 :         PyObject *py_dns_host;
   55758           0 :         if (object->in.dns_host == NULL) {
   55759           0 :                 Py_RETURN_NONE;
   55760             :         }
   55761           0 :         if (object->in.dns_host == NULL) {
   55762           0 :                 py_dns_host = Py_None;
   55763           0 :                 Py_INCREF(py_dns_host);
   55764             :         } else {
   55765           0 :                 py_dns_host = PyUnicode_Decode(object->in.dns_host, strlen(object->in.dns_host), "utf-8", "ignore");
   55766             :         }
   55767           0 :         return py_dns_host;
   55768             : }
   55769             : 
   55770           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_dns_host(PyObject *py_obj, PyObject *value, void *closure)
   55771             : {
   55772           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55773           0 :         if (value == NULL) {
   55774           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_host");
   55775           0 :                 return -1;
   55776             :         }
   55777           0 :         object->in.dns_host = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_host);
   55778           0 :         if (object->in.dns_host == NULL) {
   55779           0 :                 PyErr_NoMemory();
   55780           0 :                 return -1;
   55781             :         }
   55782             :         {
   55783           0 :                 const char *test_str;
   55784           0 :                 const char *talloc_str;
   55785           0 :                 PyObject *unicode = NULL;
   55786           0 :                 if (PyUnicode_Check(value)) {
   55787           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55788           0 :                         if (unicode == NULL) {
   55789           0 :                                 PyErr_NoMemory();
   55790           0 :                                 return -1;
   55791             :                         }
   55792           0 :                         test_str = PyBytes_AS_STRING(unicode);
   55793           0 :                 } else if (PyBytes_Check(value)) {
   55794           0 :                         test_str = PyBytes_AS_STRING(value);
   55795             :                 } else {
   55796           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55797           0 :                         return -1;
   55798             :                 }
   55799           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55800           0 :                 if (unicode != NULL) {
   55801           0 :                         Py_DECREF(unicode);
   55802             :                 }
   55803           0 :                 if (talloc_str == NULL) {
   55804           0 :                         PyErr_NoMemory();
   55805           0 :                         return -1;
   55806             :                 }
   55807           0 :                 object->in.dns_host = talloc_str;
   55808             :         }
   55809           0 :         return 0;
   55810             : }
   55811             : 
   55812           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_get_result(PyObject *obj, void *closure)
   55813             : {
   55814           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55815           0 :         PyObject *py_result;
   55816           0 :         py_result = PyErr_FromWERROR(object->out.result);
   55817           0 :         return py_result;
   55818             : }
   55819             : 
   55820           0 : static int py_netr_DsrDeregisterDNSHostRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
   55821             : {
   55822           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55823           0 :         if (value == NULL) {
   55824           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   55825           0 :                 return -1;
   55826             :         }
   55827           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   55828           0 :         return 0;
   55829             : }
   55830             : 
   55831             : static PyGetSetDef py_netr_DsrDeregisterDNSHostRecords_getsetters[] = {
   55832             :         {
   55833             :                 .name = discard_const_p(char, "in_server_name"),
   55834             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_server_name,
   55835             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_server_name,
   55836             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55837             :         },
   55838             :         {
   55839             :                 .name = discard_const_p(char, "in_domain"),
   55840             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_domain,
   55841             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_domain,
   55842             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55843             :         },
   55844             :         {
   55845             :                 .name = discard_const_p(char, "in_domain_guid"),
   55846             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_domain_guid,
   55847             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_domain_guid,
   55848             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   55849             :         },
   55850             :         {
   55851             :                 .name = discard_const_p(char, "in_dsa_guid"),
   55852             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_dsa_guid,
   55853             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_dsa_guid,
   55854             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   55855             :         },
   55856             :         {
   55857             :                 .name = discard_const_p(char, "in_dns_host"),
   55858             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_dns_host,
   55859             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_dns_host,
   55860             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55861             :         },
   55862             :         {
   55863             :                 .name = discard_const_p(char, "result"),
   55864             :                 .get = py_netr_DsrDeregisterDNSHostRecords_get_result,
   55865             :                 .set = py_netr_DsrDeregisterDNSHostRecords_set_result,
   55866             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   55867             :         },
   55868             :         { .name = NULL }
   55869             : };
   55870             : 
   55871           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   55872             : {
   55873           0 :         PyObject *self = pytalloc_new(struct netr_DsrDeregisterDNSHostRecords, type);
   55874           0 :         return self;
   55875             : }
   55876             : 
   55877           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   55878             : {
   55879             : 
   55880             : 
   55881           0 :         return PyLong_FromLong(41);
   55882             : }
   55883             : 
   55884           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   55885             : {
   55886           0 :         const struct ndr_interface_call *call = NULL;
   55887           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55888           0 :         PyObject *ret = NULL;
   55889           0 :         struct ndr_push *push = NULL;
   55890           0 :         DATA_BLOB blob;
   55891           0 :         enum ndr_err_code err;
   55892             : 
   55893           0 :         if (ndr_table_netlogon.num_calls < 42) {
   55894           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_pack");
   55895           0 :                 return NULL;
   55896             :         }
   55897           0 :         call = &ndr_table_netlogon.calls[41];
   55898             : 
   55899           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   55900           0 :         if (push == NULL) {
   55901           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55902           0 :                 return NULL;
   55903             :         }
   55904             : 
   55905           0 :         push->flags |= ndr_push_flags;
   55906             : 
   55907           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   55908           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55909           0 :                 TALLOC_FREE(push);
   55910           0 :                 PyErr_SetNdrError(err);
   55911           0 :                 return NULL;
   55912             :         }
   55913           0 :         blob = ndr_push_blob(push);
   55914           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   55915           0 :         TALLOC_FREE(push);
   55916           0 :         return ret;
   55917             : }
   55918             : 
   55919           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55920             : {
   55921           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55922           0 :         PyObject *bigendian_obj = NULL;
   55923           0 :         PyObject *ndr64_obj = NULL;
   55924           0 :         libndr_flags ndr_push_flags = 0;
   55925             : 
   55926           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   55927             :                 discard_const_p(char *, kwnames),
   55928             :                 &bigendian_obj,
   55929             :                 &ndr64_obj)) {
   55930           0 :                 return NULL;
   55931             :         }
   55932             : 
   55933           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55934           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55935             :         }
   55936           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55937           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55938             :         }
   55939             : 
   55940           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   55941             : }
   55942             : 
   55943           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55944             : {
   55945           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55946           0 :         PyObject *bigendian_obj = NULL;
   55947           0 :         PyObject *ndr64_obj = NULL;
   55948           0 :         libndr_flags ndr_push_flags = 0;
   55949             : 
   55950           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   55951             :                 discard_const_p(char *, kwnames),
   55952             :                 &bigendian_obj,
   55953             :                 &ndr64_obj)) {
   55954           0 :                 return NULL;
   55955             :         }
   55956             : 
   55957           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55958           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55959             :         }
   55960           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55961           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55962             :         }
   55963             : 
   55964           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   55965             : }
   55966             : 
   55967           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   55968             : {
   55969           0 :         const struct ndr_interface_call *call = NULL;
   55970           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55971           0 :         struct ndr_pull *pull = NULL;
   55972           0 :         enum ndr_err_code err;
   55973             : 
   55974           0 :         if (ndr_table_netlogon.num_calls < 42) {
   55975           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_unpack");
   55976           0 :                 return NULL;
   55977             :         }
   55978           0 :         call = &ndr_table_netlogon.calls[41];
   55979             : 
   55980           0 :         pull = ndr_pull_init_blob(blob, object);
   55981           0 :         if (pull == NULL) {
   55982           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55983           0 :                 return NULL;
   55984             :         }
   55985             : 
   55986           0 :         pull->flags |= ndr_pull_flags;
   55987             : 
   55988           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   55989           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55990           0 :                 TALLOC_FREE(pull);
   55991           0 :                 PyErr_SetNdrError(err);
   55992           0 :                 return NULL;
   55993             :         }
   55994           0 :         if (!allow_remaining) {
   55995           0 :                 uint32_t highest_ofs;
   55996             : 
   55997           0 :                 if (pull->offset > pull->relative_highest_offset) {
   55998           0 :                         highest_ofs = pull->offset;
   55999             :                 } else {
   56000           0 :                         highest_ofs = pull->relative_highest_offset;
   56001             :                 }
   56002           0 :                 if (highest_ofs < pull->data_size) {
   56003           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   56004             :                                 "not all bytes consumed ofs[%u] size[%u]",
   56005             :                                 highest_ofs, pull->data_size);
   56006           0 :                         TALLOC_FREE(pull);
   56007           0 :                         PyErr_SetNdrError(err);
   56008           0 :                         return NULL;
   56009             :                 }
   56010             :         }
   56011             : 
   56012           0 :         TALLOC_FREE(pull);
   56013           0 :         Py_RETURN_NONE;
   56014             : }
   56015             : 
   56016           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56017             : {
   56018           0 :         DATA_BLOB blob;
   56019           0 :         Py_ssize_t blob_length = 0;
   56020           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56021           0 :         PyObject *bigendian_obj = NULL;
   56022           0 :         PyObject *ndr64_obj = NULL;
   56023           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56024           0 :         PyObject *allow_remaining_obj = NULL;
   56025           0 :         bool allow_remaining = false;
   56026             : 
   56027           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   56028             :                 discard_const_p(char *, kwnames),
   56029             :                 &blob.data, &blob_length,
   56030             :                 &bigendian_obj,
   56031             :                 &ndr64_obj,
   56032             :                 &allow_remaining_obj)) {
   56033           0 :                 return NULL;
   56034             :         }
   56035           0 :         blob.length = blob_length;
   56036             : 
   56037           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56038           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56039             :         }
   56040           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56041           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56042             :         }
   56043             : 
   56044           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56045           0 :                 allow_remaining = true;
   56046             :         }
   56047             : 
   56048           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   56049             : }
   56050             : 
   56051           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56052             : {
   56053           0 :         DATA_BLOB blob;
   56054           0 :         Py_ssize_t blob_length = 0;
   56055           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56056           0 :         PyObject *bigendian_obj = NULL;
   56057           0 :         PyObject *ndr64_obj = NULL;
   56058           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56059           0 :         PyObject *allow_remaining_obj = NULL;
   56060           0 :         bool allow_remaining = false;
   56061             : 
   56062           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   56063             :                 discard_const_p(char *, kwnames),
   56064             :                 &blob.data, &blob_length,
   56065             :                 &bigendian_obj,
   56066             :                 &ndr64_obj,
   56067             :                 &allow_remaining_obj)) {
   56068           0 :                 return NULL;
   56069             :         }
   56070           0 :         blob.length = blob_length;
   56071             : 
   56072           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56073           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56074             :         }
   56075           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56076           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56077             :         }
   56078             : 
   56079           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56080           0 :                 allow_remaining = true;
   56081             :         }
   56082             : 
   56083           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   56084             : }
   56085             : 
   56086           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   56087             : {
   56088           0 :         const struct ndr_interface_call *call = NULL;
   56089           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   56090           0 :         PyObject *ret;
   56091           0 :         char *retstr;
   56092             : 
   56093           0 :         if (ndr_table_netlogon.num_calls < 42) {
   56094           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_print");
   56095           0 :                 return NULL;
   56096             :         }
   56097           0 :         call = &ndr_table_netlogon.calls[41];
   56098             : 
   56099           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   56100           0 :         ret = PyUnicode_FromString(retstr);
   56101           0 :         TALLOC_FREE(retstr);
   56102             : 
   56103           0 :         return ret;
   56104             : }
   56105             : 
   56106           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56107             : {
   56108           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_print(py_obj, "netr_DsrDeregisterDNSHostRecords_in", NDR_IN);
   56109             : }
   56110             : 
   56111           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56112             : {
   56113           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_print(py_obj, "netr_DsrDeregisterDNSHostRecords_out", NDR_OUT);
   56114             : }
   56115             : 
   56116             : static PyMethodDef py_netr_DsrDeregisterDNSHostRecords_methods[] = {
   56117             :         { "opnum", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
   56118             :                 "netlogon.netr_DsrDeregisterDNSHostRecords.opnum() -> 41 (0x29) " },
   56119             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   56120             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   56121             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   56122             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   56123             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   56124             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   56125             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   56126             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   56127             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   56128             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   56129             :         { NULL, NULL, 0, NULL }
   56130             : };
   56131             : 
   56132             : 
   56133             : static PyTypeObject netr_DsrDeregisterDNSHostRecords_Type = {
   56134             :         PyVarObject_HEAD_INIT(NULL, 0)
   56135             :         .tp_name = "netlogon.netr_DsrDeregisterDNSHostRecords",
   56136             :         .tp_getset = py_netr_DsrDeregisterDNSHostRecords_getsetters,
   56137             :         .tp_methods = py_netr_DsrDeregisterDNSHostRecords_methods,
   56138             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   56139             :         .tp_new = py_netr_DsrDeregisterDNSHostRecords_new,
   56140             : };
   56141             : 
   56142           0 : static bool pack_py_netr_DsrDeregisterDNSHostRecords_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrDeregisterDNSHostRecords *r)
   56143             : {
   56144           0 :         PyObject *py_server_name;
   56145           0 :         PyObject *py_domain;
   56146           0 :         PyObject *py_domain_guid;
   56147           0 :         PyObject *py_dsa_guid;
   56148           0 :         PyObject *py_dns_host;
   56149           0 :         const char *kwnames[] = {
   56150             :                 "server_name", "domain", "domain_guid", "dsa_guid", "dns_host", NULL
   56151             :         };
   56152             : 
   56153           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_DsrDeregisterDNSHostRecords", discard_const_p(char *, kwnames), &py_server_name, &py_domain, &py_domain_guid, &py_dsa_guid, &py_dns_host)) {
   56154           0 :                 return false;
   56155             :         }
   56156             : 
   56157           0 :         if (py_server_name == NULL) {
   56158           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   56159           0 :                 return false;
   56160             :         }
   56161           0 :         if (py_server_name == Py_None) {
   56162           0 :                 r->in.server_name = NULL;
   56163             :         } else {
   56164           0 :                 r->in.server_name = NULL;
   56165             :                 {
   56166           0 :                         const char *test_str;
   56167           0 :                         const char *talloc_str;
   56168           0 :                         PyObject *unicode = NULL;
   56169           0 :                         if (PyUnicode_Check(py_server_name)) {
   56170           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   56171           0 :                                 if (unicode == NULL) {
   56172           0 :                                         PyErr_NoMemory();
   56173           0 :                                         return false;
   56174             :                                 }
   56175           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56176           0 :                         } else if (PyBytes_Check(py_server_name)) {
   56177           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   56178             :                         } else {
   56179           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   56180           0 :                                 return false;
   56181             :                         }
   56182           0 :                         talloc_str = talloc_strdup(r, test_str);
   56183           0 :                         if (unicode != NULL) {
   56184           0 :                                 Py_DECREF(unicode);
   56185             :                         }
   56186           0 :                         if (talloc_str == NULL) {
   56187           0 :                                 PyErr_NoMemory();
   56188           0 :                                 return false;
   56189             :                         }
   56190           0 :                         r->in.server_name = talloc_str;
   56191             :                 }
   56192             :         }
   56193           0 :         if (py_domain == NULL) {
   56194           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain");
   56195           0 :                 return false;
   56196             :         }
   56197           0 :         if (py_domain == Py_None) {
   56198           0 :                 r->in.domain = NULL;
   56199             :         } else {
   56200           0 :                 r->in.domain = NULL;
   56201             :                 {
   56202           0 :                         const char *test_str;
   56203           0 :                         const char *talloc_str;
   56204           0 :                         PyObject *unicode = NULL;
   56205           0 :                         if (PyUnicode_Check(py_domain)) {
   56206           0 :                                 unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
   56207           0 :                                 if (unicode == NULL) {
   56208           0 :                                         PyErr_NoMemory();
   56209           0 :                                         return false;
   56210             :                                 }
   56211           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56212           0 :                         } else if (PyBytes_Check(py_domain)) {
   56213           0 :                                 test_str = PyBytes_AS_STRING(py_domain);
   56214             :                         } else {
   56215           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
   56216           0 :                                 return false;
   56217             :                         }
   56218           0 :                         talloc_str = talloc_strdup(r, test_str);
   56219           0 :                         if (unicode != NULL) {
   56220           0 :                                 Py_DECREF(unicode);
   56221             :                         }
   56222           0 :                         if (talloc_str == NULL) {
   56223           0 :                                 PyErr_NoMemory();
   56224           0 :                                 return false;
   56225             :                         }
   56226           0 :                         r->in.domain = talloc_str;
   56227             :                 }
   56228             :         }
   56229           0 :         if (py_domain_guid == NULL) {
   56230           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   56231           0 :                 return false;
   56232             :         }
   56233           0 :         if (py_domain_guid == Py_None) {
   56234           0 :                 r->in.domain_guid = NULL;
   56235             :         } else {
   56236           0 :                 r->in.domain_guid = NULL;
   56237           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   56238           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   56239           0 :                         PyErr_NoMemory();
   56240           0 :                         return false;
   56241             :                 }
   56242           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   56243             :         }
   56244           0 :         if (py_dsa_guid == NULL) {
   56245           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dsa_guid");
   56246           0 :                 return false;
   56247             :         }
   56248           0 :         if (py_dsa_guid == Py_None) {
   56249           0 :                 r->in.dsa_guid = NULL;
   56250             :         } else {
   56251           0 :                 r->in.dsa_guid = NULL;
   56252           0 :                 PY_CHECK_TYPE(GUID_Type, py_dsa_guid, return false;);
   56253           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_dsa_guid)) == NULL) {
   56254           0 :                         PyErr_NoMemory();
   56255           0 :                         return false;
   56256             :                 }
   56257           0 :                 r->in.dsa_guid = (struct GUID *)pytalloc_get_ptr(py_dsa_guid);
   56258             :         }
   56259           0 :         if (py_dns_host == NULL) {
   56260           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_host");
   56261           0 :                 return false;
   56262             :         }
   56263           0 :         r->in.dns_host = talloc_ptrtype(r, r->in.dns_host);
   56264           0 :         if (r->in.dns_host == NULL) {
   56265           0 :                 PyErr_NoMemory();
   56266           0 :                 return false;
   56267             :         }
   56268             :         {
   56269           0 :                 const char *test_str;
   56270           0 :                 const char *talloc_str;
   56271           0 :                 PyObject *unicode = NULL;
   56272           0 :                 if (PyUnicode_Check(py_dns_host)) {
   56273           0 :                         unicode = PyUnicode_AsEncodedString(py_dns_host, "utf-8", "ignore");
   56274           0 :                         if (unicode == NULL) {
   56275           0 :                                 PyErr_NoMemory();
   56276           0 :                                 return false;
   56277             :                         }
   56278           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56279           0 :                 } else if (PyBytes_Check(py_dns_host)) {
   56280           0 :                         test_str = PyBytes_AS_STRING(py_dns_host);
   56281             :                 } else {
   56282           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_host)->tp_name);
   56283           0 :                         return false;
   56284             :                 }
   56285           0 :                 talloc_str = talloc_strdup(r, test_str);
   56286           0 :                 if (unicode != NULL) {
   56287           0 :                         Py_DECREF(unicode);
   56288             :                 }
   56289           0 :                 if (talloc_str == NULL) {
   56290           0 :                         PyErr_NoMemory();
   56291           0 :                         return false;
   56292             :                 }
   56293           0 :                 r->in.dns_host = talloc_str;
   56294             :         }
   56295           0 :         return true;
   56296             : }
   56297             : 
   56298           0 : static PyObject *unpack_py_netr_DsrDeregisterDNSHostRecords_args_out(struct netr_DsrDeregisterDNSHostRecords *r)
   56299             : {
   56300           0 :         PyObject *result;
   56301           0 :         result = Py_None;
   56302           0 :         Py_INCREF(result);
   56303           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   56304           0 :                 PyErr_SetWERROR(r->out.result);
   56305           0 :                 return NULL;
   56306             :         }
   56307             : 
   56308           0 :         return result;
   56309             : }
   56310             : 
   56311             : 
   56312           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_server_name(PyObject *obj, void *closure)
   56313             : {
   56314           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56315           0 :         PyObject *py_server_name;
   56316           0 :         if (object->in.server_name == NULL) {
   56317           0 :                 Py_RETURN_NONE;
   56318             :         }
   56319           0 :         if (object->in.server_name == NULL) {
   56320           0 :                 py_server_name = Py_None;
   56321           0 :                 Py_INCREF(py_server_name);
   56322             :         } else {
   56323           0 :                 if (object->in.server_name == NULL) {
   56324           0 :                         py_server_name = Py_None;
   56325           0 :                         Py_INCREF(py_server_name);
   56326             :                 } else {
   56327           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   56328             :                 }
   56329             :         }
   56330           0 :         return py_server_name;
   56331             : }
   56332             : 
   56333           0 : static int py_netr_ServerTrustPasswordsGet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   56334             : {
   56335           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56336           0 :         if (value == NULL) {
   56337           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   56338           0 :                 return -1;
   56339             :         }
   56340           0 :         if (value == Py_None) {
   56341           0 :                 object->in.server_name = NULL;
   56342             :         } else {
   56343           0 :                 object->in.server_name = NULL;
   56344             :                 {
   56345           0 :                         const char *test_str;
   56346           0 :                         const char *talloc_str;
   56347           0 :                         PyObject *unicode = NULL;
   56348           0 :                         if (PyUnicode_Check(value)) {
   56349           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56350           0 :                                 if (unicode == NULL) {
   56351           0 :                                         PyErr_NoMemory();
   56352           0 :                                         return -1;
   56353             :                                 }
   56354           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56355           0 :                         } else if (PyBytes_Check(value)) {
   56356           0 :                                 test_str = PyBytes_AS_STRING(value);
   56357             :                         } else {
   56358           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56359           0 :                                 return -1;
   56360             :                         }
   56361           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56362           0 :                         if (unicode != NULL) {
   56363           0 :                                 Py_DECREF(unicode);
   56364             :                         }
   56365           0 :                         if (talloc_str == NULL) {
   56366           0 :                                 PyErr_NoMemory();
   56367           0 :                                 return -1;
   56368             :                         }
   56369           0 :                         object->in.server_name = talloc_str;
   56370             :                 }
   56371             :         }
   56372           0 :         return 0;
   56373             : }
   56374             : 
   56375           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_account_name(PyObject *obj, void *closure)
   56376             : {
   56377           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56378           0 :         PyObject *py_account_name;
   56379           0 :         if (object->in.account_name == NULL) {
   56380           0 :                 Py_RETURN_NONE;
   56381             :         }
   56382           0 :         if (object->in.account_name == NULL) {
   56383           0 :                 py_account_name = Py_None;
   56384           0 :                 Py_INCREF(py_account_name);
   56385             :         } else {
   56386           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   56387             :         }
   56388           0 :         return py_account_name;
   56389             : }
   56390             : 
   56391           0 : static int py_netr_ServerTrustPasswordsGet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   56392             : {
   56393           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56394           0 :         if (value == NULL) {
   56395           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   56396           0 :                 return -1;
   56397             :         }
   56398           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   56399           0 :         if (object->in.account_name == NULL) {
   56400           0 :                 PyErr_NoMemory();
   56401           0 :                 return -1;
   56402             :         }
   56403             :         {
   56404           0 :                 const char *test_str;
   56405           0 :                 const char *talloc_str;
   56406           0 :                 PyObject *unicode = NULL;
   56407           0 :                 if (PyUnicode_Check(value)) {
   56408           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56409           0 :                         if (unicode == NULL) {
   56410           0 :                                 PyErr_NoMemory();
   56411           0 :                                 return -1;
   56412             :                         }
   56413           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56414           0 :                 } else if (PyBytes_Check(value)) {
   56415           0 :                         test_str = PyBytes_AS_STRING(value);
   56416             :                 } else {
   56417           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56418           0 :                         return -1;
   56419             :                 }
   56420           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56421           0 :                 if (unicode != NULL) {
   56422           0 :                         Py_DECREF(unicode);
   56423             :                 }
   56424           0 :                 if (talloc_str == NULL) {
   56425           0 :                         PyErr_NoMemory();
   56426           0 :                         return -1;
   56427             :                 }
   56428           0 :                 object->in.account_name = talloc_str;
   56429             :         }
   56430           0 :         return 0;
   56431             : }
   56432             : 
   56433           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_secure_channel_type(PyObject *obj, void *closure)
   56434             : {
   56435           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56436           0 :         PyObject *py_secure_channel_type;
   56437           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   56438           0 :         return py_secure_channel_type;
   56439             : }
   56440             : 
   56441           0 : static int py_netr_ServerTrustPasswordsGet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   56442             : {
   56443           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56444           0 :         if (value == NULL) {
   56445           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   56446           0 :                 return -1;
   56447             :         }
   56448             :         {
   56449           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   56450           0 :                 if (PyLong_Check(value)) {
   56451           0 :                         unsigned long long test_var;
   56452           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   56453           0 :                         if (PyErr_Occurred() != NULL) {
   56454           0 :                                 return -1;
   56455             :                         }
   56456           0 :                         if (test_var > uint_max) {
   56457           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   56458             :                                   PyLong_Type.tp_name, uint_max, test_var);
   56459           0 :                                 return -1;
   56460             :                         }
   56461           0 :                         object->in.secure_channel_type = test_var;
   56462             :                 } else {
   56463           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   56464             :                           PyLong_Type.tp_name);
   56465           0 :                         return -1;
   56466             :                 }
   56467             :         }
   56468           0 :         return 0;
   56469             : }
   56470             : 
   56471           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_computer_name(PyObject *obj, void *closure)
   56472             : {
   56473           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56474           0 :         PyObject *py_computer_name;
   56475           0 :         if (object->in.computer_name == NULL) {
   56476           0 :                 Py_RETURN_NONE;
   56477             :         }
   56478           0 :         if (object->in.computer_name == NULL) {
   56479           0 :                 py_computer_name = Py_None;
   56480           0 :                 Py_INCREF(py_computer_name);
   56481             :         } else {
   56482           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   56483             :         }
   56484           0 :         return py_computer_name;
   56485             : }
   56486             : 
   56487           0 : static int py_netr_ServerTrustPasswordsGet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   56488             : {
   56489           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56490           0 :         if (value == NULL) {
   56491           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   56492           0 :                 return -1;
   56493             :         }
   56494           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   56495           0 :         if (object->in.computer_name == NULL) {
   56496           0 :                 PyErr_NoMemory();
   56497           0 :                 return -1;
   56498             :         }
   56499             :         {
   56500           0 :                 const char *test_str;
   56501           0 :                 const char *talloc_str;
   56502           0 :                 PyObject *unicode = NULL;
   56503           0 :                 if (PyUnicode_Check(value)) {
   56504           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56505           0 :                         if (unicode == NULL) {
   56506           0 :                                 PyErr_NoMemory();
   56507           0 :                                 return -1;
   56508             :                         }
   56509           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56510           0 :                 } else if (PyBytes_Check(value)) {
   56511           0 :                         test_str = PyBytes_AS_STRING(value);
   56512             :                 } else {
   56513           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56514           0 :                         return -1;
   56515             :                 }
   56516           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56517           0 :                 if (unicode != NULL) {
   56518           0 :                         Py_DECREF(unicode);
   56519             :                 }
   56520           0 :                 if (talloc_str == NULL) {
   56521           0 :                         PyErr_NoMemory();
   56522           0 :                         return -1;
   56523             :                 }
   56524           0 :                 object->in.computer_name = talloc_str;
   56525             :         }
   56526           0 :         return 0;
   56527             : }
   56528             : 
   56529           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_credential(PyObject *obj, void *closure)
   56530             : {
   56531           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56532           0 :         PyObject *py_credential;
   56533           0 :         if (object->in.credential == NULL) {
   56534           0 :                 Py_RETURN_NONE;
   56535             :         }
   56536           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   56537           0 :         return py_credential;
   56538             : }
   56539             : 
   56540           0 : static int py_netr_ServerTrustPasswordsGet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   56541             : {
   56542           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56543           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   56544           0 :         if (value == NULL) {
   56545           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   56546           0 :                 return -1;
   56547             :         }
   56548           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   56549           0 :         if (object->in.credential == NULL) {
   56550           0 :                 PyErr_NoMemory();
   56551           0 :                 return -1;
   56552             :         }
   56553           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   56554           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56555           0 :                 PyErr_NoMemory();
   56556           0 :                 return -1;
   56557             :         }
   56558           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   56559           0 :         return 0;
   56560             : }
   56561             : 
   56562           0 : static PyObject *py_netr_ServerTrustPasswordsGet_out_get_return_authenticator(PyObject *obj, void *closure)
   56563             : {
   56564           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56565           0 :         PyObject *py_return_authenticator;
   56566           0 :         if (object->out.return_authenticator == NULL) {
   56567           0 :                 Py_RETURN_NONE;
   56568             :         }
   56569           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   56570           0 :         return py_return_authenticator;
   56571             : }
   56572             : 
   56573           0 : static int py_netr_ServerTrustPasswordsGet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   56574             : {
   56575           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56576           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   56577           0 :         if (value == NULL) {
   56578           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   56579           0 :                 return -1;
   56580             :         }
   56581           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   56582           0 :         if (object->out.return_authenticator == NULL) {
   56583           0 :                 PyErr_NoMemory();
   56584           0 :                 return -1;
   56585             :         }
   56586           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   56587           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56588           0 :                 PyErr_NoMemory();
   56589           0 :                 return -1;
   56590             :         }
   56591           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   56592           0 :         return 0;
   56593             : }
   56594             : 
   56595           0 : static PyObject *py_netr_ServerTrustPasswordsGet_out_get_new_owf_password(PyObject *obj, void *closure)
   56596             : {
   56597           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56598           0 :         PyObject *py_new_owf_password;
   56599           0 :         if (object->out.new_owf_password == NULL) {
   56600           0 :                 Py_RETURN_NONE;
   56601             :         }
   56602           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.new_owf_password, object->out.new_owf_password);
   56603           0 :         return py_new_owf_password;
   56604             : }
   56605             : 
   56606           0 : static int py_netr_ServerTrustPasswordsGet_out_set_new_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   56607             : {
   56608           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56609           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.new_owf_password));
   56610           0 :         if (value == NULL) {
   56611           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.new_owf_password");
   56612           0 :                 return -1;
   56613             :         }
   56614           0 :         object->out.new_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.new_owf_password);
   56615           0 :         if (object->out.new_owf_password == NULL) {
   56616           0 :                 PyErr_NoMemory();
   56617           0 :                 return -1;
   56618             :         }
   56619           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   56620           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56621           0 :                 PyErr_NoMemory();
   56622           0 :                 return -1;
   56623             :         }
   56624           0 :         object->out.new_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   56625           0 :         return 0;
   56626             : }
   56627             : 
   56628           0 : static PyObject *py_netr_ServerTrustPasswordsGet_out_get_old_owf_password(PyObject *obj, void *closure)
   56629             : {
   56630           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56631           0 :         PyObject *py_old_owf_password;
   56632           0 :         if (object->out.old_owf_password == NULL) {
   56633           0 :                 Py_RETURN_NONE;
   56634             :         }
   56635           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.old_owf_password, object->out.old_owf_password);
   56636           0 :         return py_old_owf_password;
   56637             : }
   56638             : 
   56639           0 : static int py_netr_ServerTrustPasswordsGet_out_set_old_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   56640             : {
   56641           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56642           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.old_owf_password));
   56643           0 :         if (value == NULL) {
   56644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.old_owf_password");
   56645           0 :                 return -1;
   56646             :         }
   56647           0 :         object->out.old_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.old_owf_password);
   56648           0 :         if (object->out.old_owf_password == NULL) {
   56649           0 :                 PyErr_NoMemory();
   56650           0 :                 return -1;
   56651             :         }
   56652           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   56653           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56654           0 :                 PyErr_NoMemory();
   56655           0 :                 return -1;
   56656             :         }
   56657           0 :         object->out.old_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   56658           0 :         return 0;
   56659             : }
   56660             : 
   56661           0 : static PyObject *py_netr_ServerTrustPasswordsGet_get_result(PyObject *obj, void *closure)
   56662             : {
   56663           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56664           0 :         PyObject *py_result;
   56665           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   56666           0 :         return py_result;
   56667             : }
   56668             : 
   56669           0 : static int py_netr_ServerTrustPasswordsGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   56670             : {
   56671           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56672           0 :         if (value == NULL) {
   56673           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   56674           0 :                 return -1;
   56675             :         }
   56676           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   56677           0 :         return 0;
   56678             : }
   56679             : 
   56680             : static PyGetSetDef py_netr_ServerTrustPasswordsGet_getsetters[] = {
   56681             :         {
   56682             :                 .name = discard_const_p(char, "in_server_name"),
   56683             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_server_name,
   56684             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_server_name,
   56685             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56686             :         },
   56687             :         {
   56688             :                 .name = discard_const_p(char, "in_account_name"),
   56689             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_account_name,
   56690             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_account_name,
   56691             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56692             :         },
   56693             :         {
   56694             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   56695             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_secure_channel_type,
   56696             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_secure_channel_type,
   56697             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   56698             :         },
   56699             :         {
   56700             :                 .name = discard_const_p(char, "in_computer_name"),
   56701             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_computer_name,
   56702             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_computer_name,
   56703             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56704             :         },
   56705             :         {
   56706             :                 .name = discard_const_p(char, "in_credential"),
   56707             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_credential,
   56708             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_credential,
   56709             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   56710             :         },
   56711             :         {
   56712             :                 .name = discard_const_p(char, "out_return_authenticator"),
   56713             :                 .get = py_netr_ServerTrustPasswordsGet_out_get_return_authenticator,
   56714             :                 .set = py_netr_ServerTrustPasswordsGet_out_set_return_authenticator,
   56715             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   56716             :         },
   56717             :         {
   56718             :                 .name = discard_const_p(char, "out_new_owf_password"),
   56719             :                 .get = py_netr_ServerTrustPasswordsGet_out_get_new_owf_password,
   56720             :                 .set = py_netr_ServerTrustPasswordsGet_out_set_new_owf_password,
   56721             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   56722             :         },
   56723             :         {
   56724             :                 .name = discard_const_p(char, "out_old_owf_password"),
   56725             :                 .get = py_netr_ServerTrustPasswordsGet_out_get_old_owf_password,
   56726             :                 .set = py_netr_ServerTrustPasswordsGet_out_set_old_owf_password,
   56727             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   56728             :         },
   56729             :         {
   56730             :                 .name = discard_const_p(char, "result"),
   56731             :                 .get = py_netr_ServerTrustPasswordsGet_get_result,
   56732             :                 .set = py_netr_ServerTrustPasswordsGet_set_result,
   56733             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   56734             :         },
   56735             :         { .name = NULL }
   56736             : };
   56737             : 
   56738           0 : static PyObject *py_netr_ServerTrustPasswordsGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   56739             : {
   56740           0 :         PyObject *self = pytalloc_new(struct netr_ServerTrustPasswordsGet, type);
   56741           0 :         struct netr_ServerTrustPasswordsGet *_self = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(self);
   56742           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   56743           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   56744           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   56745           0 :         _self->out.new_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   56746           0 :         _self->out.old_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   56747           0 :         return self;
   56748             : }
   56749             : 
   56750           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   56751             : {
   56752             : 
   56753             : 
   56754           0 :         return PyLong_FromLong(42);
   56755             : }
   56756             : 
   56757           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   56758             : {
   56759           0 :         const struct ndr_interface_call *call = NULL;
   56760           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56761           0 :         PyObject *ret = NULL;
   56762           0 :         struct ndr_push *push = NULL;
   56763           0 :         DATA_BLOB blob;
   56764           0 :         enum ndr_err_code err;
   56765             : 
   56766           0 :         if (ndr_table_netlogon.num_calls < 43) {
   56767           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_pack");
   56768           0 :                 return NULL;
   56769             :         }
   56770           0 :         call = &ndr_table_netlogon.calls[42];
   56771             : 
   56772           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   56773           0 :         if (push == NULL) {
   56774           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56775           0 :                 return NULL;
   56776             :         }
   56777             : 
   56778           0 :         push->flags |= ndr_push_flags;
   56779             : 
   56780           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   56781           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56782           0 :                 TALLOC_FREE(push);
   56783           0 :                 PyErr_SetNdrError(err);
   56784           0 :                 return NULL;
   56785             :         }
   56786           0 :         blob = ndr_push_blob(push);
   56787           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   56788           0 :         TALLOC_FREE(push);
   56789           0 :         return ret;
   56790             : }
   56791             : 
   56792           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56793             : {
   56794           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56795           0 :         PyObject *bigendian_obj = NULL;
   56796           0 :         PyObject *ndr64_obj = NULL;
   56797           0 :         libndr_flags ndr_push_flags = 0;
   56798             : 
   56799           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   56800             :                 discard_const_p(char *, kwnames),
   56801             :                 &bigendian_obj,
   56802             :                 &ndr64_obj)) {
   56803           0 :                 return NULL;
   56804             :         }
   56805             : 
   56806           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56807           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56808             :         }
   56809           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56810           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56811             :         }
   56812             : 
   56813           0 :         return py_netr_ServerTrustPasswordsGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   56814             : }
   56815             : 
   56816           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56817             : {
   56818           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56819           0 :         PyObject *bigendian_obj = NULL;
   56820           0 :         PyObject *ndr64_obj = NULL;
   56821           0 :         libndr_flags ndr_push_flags = 0;
   56822             : 
   56823           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   56824             :                 discard_const_p(char *, kwnames),
   56825             :                 &bigendian_obj,
   56826             :                 &ndr64_obj)) {
   56827           0 :                 return NULL;
   56828             :         }
   56829             : 
   56830           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56831           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56832             :         }
   56833           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56834           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56835             :         }
   56836             : 
   56837           0 :         return py_netr_ServerTrustPasswordsGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   56838             : }
   56839             : 
   56840           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   56841             : {
   56842           0 :         const struct ndr_interface_call *call = NULL;
   56843           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56844           0 :         struct ndr_pull *pull = NULL;
   56845           0 :         enum ndr_err_code err;
   56846             : 
   56847           0 :         if (ndr_table_netlogon.num_calls < 43) {
   56848           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_unpack");
   56849           0 :                 return NULL;
   56850             :         }
   56851           0 :         call = &ndr_table_netlogon.calls[42];
   56852             : 
   56853           0 :         pull = ndr_pull_init_blob(blob, object);
   56854           0 :         if (pull == NULL) {
   56855           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56856           0 :                 return NULL;
   56857             :         }
   56858             : 
   56859           0 :         pull->flags |= ndr_pull_flags;
   56860             : 
   56861           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   56862           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56863           0 :                 TALLOC_FREE(pull);
   56864           0 :                 PyErr_SetNdrError(err);
   56865           0 :                 return NULL;
   56866             :         }
   56867           0 :         if (!allow_remaining) {
   56868           0 :                 uint32_t highest_ofs;
   56869             : 
   56870           0 :                 if (pull->offset > pull->relative_highest_offset) {
   56871           0 :                         highest_ofs = pull->offset;
   56872             :                 } else {
   56873           0 :                         highest_ofs = pull->relative_highest_offset;
   56874             :                 }
   56875           0 :                 if (highest_ofs < pull->data_size) {
   56876           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   56877             :                                 "not all bytes consumed ofs[%u] size[%u]",
   56878             :                                 highest_ofs, pull->data_size);
   56879           0 :                         TALLOC_FREE(pull);
   56880           0 :                         PyErr_SetNdrError(err);
   56881           0 :                         return NULL;
   56882             :                 }
   56883             :         }
   56884             : 
   56885           0 :         TALLOC_FREE(pull);
   56886           0 :         Py_RETURN_NONE;
   56887             : }
   56888             : 
   56889           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56890             : {
   56891           0 :         DATA_BLOB blob;
   56892           0 :         Py_ssize_t blob_length = 0;
   56893           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56894           0 :         PyObject *bigendian_obj = NULL;
   56895           0 :         PyObject *ndr64_obj = NULL;
   56896           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56897           0 :         PyObject *allow_remaining_obj = NULL;
   56898           0 :         bool allow_remaining = false;
   56899             : 
   56900           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   56901             :                 discard_const_p(char *, kwnames),
   56902             :                 &blob.data, &blob_length,
   56903             :                 &bigendian_obj,
   56904             :                 &ndr64_obj,
   56905             :                 &allow_remaining_obj)) {
   56906           0 :                 return NULL;
   56907             :         }
   56908           0 :         blob.length = blob_length;
   56909             : 
   56910           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56911           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56912             :         }
   56913           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56914           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56915             :         }
   56916             : 
   56917           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56918           0 :                 allow_remaining = true;
   56919             :         }
   56920             : 
   56921           0 :         return py_netr_ServerTrustPasswordsGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   56922             : }
   56923             : 
   56924           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56925             : {
   56926           0 :         DATA_BLOB blob;
   56927           0 :         Py_ssize_t blob_length = 0;
   56928           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56929           0 :         PyObject *bigendian_obj = NULL;
   56930           0 :         PyObject *ndr64_obj = NULL;
   56931           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56932           0 :         PyObject *allow_remaining_obj = NULL;
   56933           0 :         bool allow_remaining = false;
   56934             : 
   56935           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   56936             :                 discard_const_p(char *, kwnames),
   56937             :                 &blob.data, &blob_length,
   56938             :                 &bigendian_obj,
   56939             :                 &ndr64_obj,
   56940             :                 &allow_remaining_obj)) {
   56941           0 :                 return NULL;
   56942             :         }
   56943           0 :         blob.length = blob_length;
   56944             : 
   56945           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56946           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56947             :         }
   56948           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56949           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56950             :         }
   56951             : 
   56952           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56953           0 :                 allow_remaining = true;
   56954             :         }
   56955             : 
   56956           0 :         return py_netr_ServerTrustPasswordsGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   56957             : }
   56958             : 
   56959           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   56960             : {
   56961           0 :         const struct ndr_interface_call *call = NULL;
   56962           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56963           0 :         PyObject *ret;
   56964           0 :         char *retstr;
   56965             : 
   56966           0 :         if (ndr_table_netlogon.num_calls < 43) {
   56967           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_print");
   56968           0 :                 return NULL;
   56969             :         }
   56970           0 :         call = &ndr_table_netlogon.calls[42];
   56971             : 
   56972           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   56973           0 :         ret = PyUnicode_FromString(retstr);
   56974           0 :         TALLOC_FREE(retstr);
   56975             : 
   56976           0 :         return ret;
   56977             : }
   56978             : 
   56979           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56980             : {
   56981           0 :         return py_netr_ServerTrustPasswordsGet_ndr_print(py_obj, "netr_ServerTrustPasswordsGet_in", NDR_IN);
   56982             : }
   56983             : 
   56984           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56985             : {
   56986           0 :         return py_netr_ServerTrustPasswordsGet_ndr_print(py_obj, "netr_ServerTrustPasswordsGet_out", NDR_OUT);
   56987             : }
   56988             : 
   56989             : static PyMethodDef py_netr_ServerTrustPasswordsGet_methods[] = {
   56990             :         { "opnum", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_opnum, METH_NOARGS|METH_CLASS,
   56991             :                 "netlogon.netr_ServerTrustPasswordsGet.opnum() -> 42 (0x2a) " },
   56992             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   56993             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   56994             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   56995             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   56996             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   56997             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   56998             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   56999             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   57000             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   57001             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   57002             :         { NULL, NULL, 0, NULL }
   57003             : };
   57004             : 
   57005             : 
   57006             : static PyTypeObject netr_ServerTrustPasswordsGet_Type = {
   57007             :         PyVarObject_HEAD_INIT(NULL, 0)
   57008             :         .tp_name = "netlogon.netr_ServerTrustPasswordsGet",
   57009             :         .tp_getset = py_netr_ServerTrustPasswordsGet_getsetters,
   57010             :         .tp_methods = py_netr_ServerTrustPasswordsGet_methods,
   57011             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   57012             :         .tp_new = py_netr_ServerTrustPasswordsGet_new,
   57013             : };
   57014             : 
   57015           0 : static bool pack_py_netr_ServerTrustPasswordsGet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerTrustPasswordsGet *r)
   57016             : {
   57017           0 :         PyObject *py_server_name;
   57018           0 :         PyObject *py_account_name;
   57019           0 :         PyObject *py_secure_channel_type;
   57020           0 :         PyObject *py_computer_name;
   57021           0 :         PyObject *py_credential;
   57022           0 :         const char *kwnames[] = {
   57023             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
   57024             :         };
   57025             : 
   57026           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_ServerTrustPasswordsGet", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential)) {
   57027           0 :                 return false;
   57028             :         }
   57029             : 
   57030           0 :         if (py_server_name == NULL) {
   57031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   57032           0 :                 return false;
   57033             :         }
   57034           0 :         if (py_server_name == Py_None) {
   57035           0 :                 r->in.server_name = NULL;
   57036             :         } else {
   57037           0 :                 r->in.server_name = NULL;
   57038             :                 {
   57039           0 :                         const char *test_str;
   57040           0 :                         const char *talloc_str;
   57041           0 :                         PyObject *unicode = NULL;
   57042           0 :                         if (PyUnicode_Check(py_server_name)) {
   57043           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   57044           0 :                                 if (unicode == NULL) {
   57045           0 :                                         PyErr_NoMemory();
   57046           0 :                                         return false;
   57047             :                                 }
   57048           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57049           0 :                         } else if (PyBytes_Check(py_server_name)) {
   57050           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   57051             :                         } else {
   57052           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   57053           0 :                                 return false;
   57054             :                         }
   57055           0 :                         talloc_str = talloc_strdup(r, test_str);
   57056           0 :                         if (unicode != NULL) {
   57057           0 :                                 Py_DECREF(unicode);
   57058             :                         }
   57059           0 :                         if (talloc_str == NULL) {
   57060           0 :                                 PyErr_NoMemory();
   57061           0 :                                 return false;
   57062             :                         }
   57063           0 :                         r->in.server_name = talloc_str;
   57064             :                 }
   57065             :         }
   57066           0 :         if (py_account_name == NULL) {
   57067           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   57068           0 :                 return false;
   57069             :         }
   57070           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   57071           0 :         if (r->in.account_name == NULL) {
   57072           0 :                 PyErr_NoMemory();
   57073           0 :                 return false;
   57074             :         }
   57075             :         {
   57076           0 :                 const char *test_str;
   57077           0 :                 const char *talloc_str;
   57078           0 :                 PyObject *unicode = NULL;
   57079           0 :                 if (PyUnicode_Check(py_account_name)) {
   57080           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   57081           0 :                         if (unicode == NULL) {
   57082           0 :                                 PyErr_NoMemory();
   57083           0 :                                 return false;
   57084             :                         }
   57085           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57086           0 :                 } else if (PyBytes_Check(py_account_name)) {
   57087           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   57088             :                 } else {
   57089           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   57090           0 :                         return false;
   57091             :                 }
   57092           0 :                 talloc_str = talloc_strdup(r, test_str);
   57093           0 :                 if (unicode != NULL) {
   57094           0 :                         Py_DECREF(unicode);
   57095             :                 }
   57096           0 :                 if (talloc_str == NULL) {
   57097           0 :                         PyErr_NoMemory();
   57098           0 :                         return false;
   57099             :                 }
   57100           0 :                 r->in.account_name = talloc_str;
   57101             :         }
   57102           0 :         if (py_secure_channel_type == NULL) {
   57103           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   57104           0 :                 return false;
   57105             :         }
   57106             :         {
   57107           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   57108           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   57109           0 :                         unsigned long long test_var;
   57110           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   57111           0 :                         if (PyErr_Occurred() != NULL) {
   57112           0 :                                 return false;
   57113             :                         }
   57114           0 :                         if (test_var > uint_max) {
   57115           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57116             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57117           0 :                                 return false;
   57118             :                         }
   57119           0 :                         r->in.secure_channel_type = test_var;
   57120             :                 } else {
   57121           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57122             :                           PyLong_Type.tp_name);
   57123           0 :                         return false;
   57124             :                 }
   57125             :         }
   57126           0 :         if (py_computer_name == NULL) {
   57127           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   57128           0 :                 return false;
   57129             :         }
   57130           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   57131           0 :         if (r->in.computer_name == NULL) {
   57132           0 :                 PyErr_NoMemory();
   57133           0 :                 return false;
   57134             :         }
   57135             :         {
   57136           0 :                 const char *test_str;
   57137           0 :                 const char *talloc_str;
   57138           0 :                 PyObject *unicode = NULL;
   57139           0 :                 if (PyUnicode_Check(py_computer_name)) {
   57140           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   57141           0 :                         if (unicode == NULL) {
   57142           0 :                                 PyErr_NoMemory();
   57143           0 :                                 return false;
   57144             :                         }
   57145           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57146           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   57147           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   57148             :                 } else {
   57149           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   57150           0 :                         return false;
   57151             :                 }
   57152           0 :                 talloc_str = talloc_strdup(r, test_str);
   57153           0 :                 if (unicode != NULL) {
   57154           0 :                         Py_DECREF(unicode);
   57155             :                 }
   57156           0 :                 if (talloc_str == NULL) {
   57157           0 :                         PyErr_NoMemory();
   57158           0 :                         return false;
   57159             :                 }
   57160           0 :                 r->in.computer_name = talloc_str;
   57161             :         }
   57162           0 :         if (py_credential == NULL) {
   57163           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   57164           0 :                 return false;
   57165             :         }
   57166           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   57167           0 :         if (r->in.credential == NULL) {
   57168           0 :                 PyErr_NoMemory();
   57169           0 :                 return false;
   57170             :         }
   57171           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   57172           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   57173           0 :                 PyErr_NoMemory();
   57174           0 :                 return false;
   57175             :         }
   57176           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   57177           0 :         return true;
   57178             : }
   57179             : 
   57180           0 : static PyObject *unpack_py_netr_ServerTrustPasswordsGet_args_out(struct netr_ServerTrustPasswordsGet *r)
   57181             : {
   57182           0 :         PyObject *result;
   57183           0 :         PyObject *py_return_authenticator;
   57184           0 :         PyObject *py_new_owf_password;
   57185           0 :         PyObject *py_old_owf_password;
   57186           0 :         result = PyTuple_New(3);
   57187           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   57188           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   57189           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.new_owf_password, r->out.new_owf_password);
   57190           0 :         PyTuple_SetItem(result, 1, py_new_owf_password);
   57191           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.old_owf_password, r->out.old_owf_password);
   57192           0 :         PyTuple_SetItem(result, 2, py_old_owf_password);
   57193           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   57194           0 :                 PyErr_SetNTSTATUS(r->out.result);
   57195           0 :                 return NULL;
   57196             :         }
   57197             : 
   57198           0 :         return result;
   57199             : }
   57200             : 
   57201             : 
   57202           0 : static PyObject *py_netr_DsRGetForestTrustInformation_in_get_server_name(PyObject *obj, void *closure)
   57203             : {
   57204           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   57205           0 :         PyObject *py_server_name;
   57206           0 :         if (object->in.server_name == NULL) {
   57207           0 :                 Py_RETURN_NONE;
   57208             :         }
   57209           0 :         if (object->in.server_name == NULL) {
   57210           0 :                 py_server_name = Py_None;
   57211           0 :                 Py_INCREF(py_server_name);
   57212             :         } else {
   57213           0 :                 if (object->in.server_name == NULL) {
   57214           0 :                         py_server_name = Py_None;
   57215           0 :                         Py_INCREF(py_server_name);
   57216             :                 } else {
   57217           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   57218             :                 }
   57219             :         }
   57220           0 :         return py_server_name;
   57221             : }
   57222             : 
   57223           0 : static int py_netr_DsRGetForestTrustInformation_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   57224             : {
   57225           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57226           0 :         if (value == NULL) {
   57227           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   57228           0 :                 return -1;
   57229             :         }
   57230           0 :         if (value == Py_None) {
   57231           0 :                 object->in.server_name = NULL;
   57232             :         } else {
   57233           0 :                 object->in.server_name = NULL;
   57234             :                 {
   57235           0 :                         const char *test_str;
   57236           0 :                         const char *talloc_str;
   57237           0 :                         PyObject *unicode = NULL;
   57238           0 :                         if (PyUnicode_Check(value)) {
   57239           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57240           0 :                                 if (unicode == NULL) {
   57241           0 :                                         PyErr_NoMemory();
   57242           0 :                                         return -1;
   57243             :                                 }
   57244           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57245           0 :                         } else if (PyBytes_Check(value)) {
   57246           0 :                                 test_str = PyBytes_AS_STRING(value);
   57247             :                         } else {
   57248           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57249           0 :                                 return -1;
   57250             :                         }
   57251           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57252           0 :                         if (unicode != NULL) {
   57253           0 :                                 Py_DECREF(unicode);
   57254             :                         }
   57255           0 :                         if (talloc_str == NULL) {
   57256           0 :                                 PyErr_NoMemory();
   57257           0 :                                 return -1;
   57258             :                         }
   57259           0 :                         object->in.server_name = talloc_str;
   57260             :                 }
   57261             :         }
   57262           0 :         return 0;
   57263             : }
   57264             : 
   57265           0 : static PyObject *py_netr_DsRGetForestTrustInformation_in_get_trusted_domain_name(PyObject *obj, void *closure)
   57266             : {
   57267           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   57268           0 :         PyObject *py_trusted_domain_name;
   57269           0 :         if (object->in.trusted_domain_name == NULL) {
   57270           0 :                 Py_RETURN_NONE;
   57271             :         }
   57272           0 :         if (object->in.trusted_domain_name == NULL) {
   57273           0 :                 py_trusted_domain_name = Py_None;
   57274           0 :                 Py_INCREF(py_trusted_domain_name);
   57275             :         } else {
   57276           0 :                 if (object->in.trusted_domain_name == NULL) {
   57277           0 :                         py_trusted_domain_name = Py_None;
   57278           0 :                         Py_INCREF(py_trusted_domain_name);
   57279             :                 } else {
   57280           0 :                         py_trusted_domain_name = PyUnicode_Decode(object->in.trusted_domain_name, strlen(object->in.trusted_domain_name), "utf-8", "ignore");
   57281             :                 }
   57282             :         }
   57283           0 :         return py_trusted_domain_name;
   57284             : }
   57285             : 
   57286           0 : static int py_netr_DsRGetForestTrustInformation_in_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   57287             : {
   57288           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57289           0 :         if (value == NULL) {
   57290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.trusted_domain_name");
   57291           0 :                 return -1;
   57292             :         }
   57293           0 :         if (value == Py_None) {
   57294           0 :                 object->in.trusted_domain_name = NULL;
   57295             :         } else {
   57296           0 :                 object->in.trusted_domain_name = NULL;
   57297             :                 {
   57298           0 :                         const char *test_str;
   57299           0 :                         const char *talloc_str;
   57300           0 :                         PyObject *unicode = NULL;
   57301           0 :                         if (PyUnicode_Check(value)) {
   57302           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57303           0 :                                 if (unicode == NULL) {
   57304           0 :                                         PyErr_NoMemory();
   57305           0 :                                         return -1;
   57306             :                                 }
   57307           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57308           0 :                         } else if (PyBytes_Check(value)) {
   57309           0 :                                 test_str = PyBytes_AS_STRING(value);
   57310             :                         } else {
   57311           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57312           0 :                                 return -1;
   57313             :                         }
   57314           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57315           0 :                         if (unicode != NULL) {
   57316           0 :                                 Py_DECREF(unicode);
   57317             :                         }
   57318           0 :                         if (talloc_str == NULL) {
   57319           0 :                                 PyErr_NoMemory();
   57320           0 :                                 return -1;
   57321             :                         }
   57322           0 :                         object->in.trusted_domain_name = talloc_str;
   57323             :                 }
   57324             :         }
   57325           0 :         return 0;
   57326             : }
   57327             : 
   57328           0 : static PyObject *py_netr_DsRGetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
   57329             : {
   57330           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   57331           0 :         PyObject *py_flags;
   57332           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   57333           0 :         return py_flags;
   57334             : }
   57335             : 
   57336           0 : static int py_netr_DsRGetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   57337             : {
   57338           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57339           0 :         if (value == NULL) {
   57340           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   57341           0 :                 return -1;
   57342             :         }
   57343             :         {
   57344           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   57345           0 :                 if (PyLong_Check(value)) {
   57346           0 :                         unsigned long long test_var;
   57347           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   57348           0 :                         if (PyErr_Occurred() != NULL) {
   57349           0 :                                 return -1;
   57350             :                         }
   57351           0 :                         if (test_var > uint_max) {
   57352           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57353             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57354           0 :                                 return -1;
   57355             :                         }
   57356           0 :                         object->in.flags = test_var;
   57357             :                 } else {
   57358           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57359             :                           PyLong_Type.tp_name);
   57360           0 :                         return -1;
   57361             :                 }
   57362             :         }
   57363           0 :         return 0;
   57364             : }
   57365             : 
   57366           0 : static PyObject *py_netr_DsRGetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
   57367             : {
   57368           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   57369           0 :         PyObject *py_forest_trust_info;
   57370           0 :         if (object->out.forest_trust_info == NULL) {
   57371           0 :                 Py_RETURN_NONE;
   57372             :         }
   57373           0 :         if (*object->out.forest_trust_info == NULL) {
   57374           0 :                 py_forest_trust_info = Py_None;
   57375           0 :                 Py_INCREF(py_forest_trust_info);
   57376             :         } else {
   57377           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
   57378             :         }
   57379           0 :         return py_forest_trust_info;
   57380             : }
   57381             : 
   57382           0 : static int py_netr_DsRGetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   57383             : {
   57384           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57385           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
   57386           0 :         if (value == NULL) {
   57387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.forest_trust_info");
   57388           0 :                 return -1;
   57389             :         }
   57390           0 :         object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
   57391           0 :         if (object->out.forest_trust_info == NULL) {
   57392           0 :                 PyErr_NoMemory();
   57393           0 :                 return -1;
   57394             :         }
   57395           0 :         if (value == Py_None) {
   57396           0 :                 *object->out.forest_trust_info = NULL;
   57397             :         } else {
   57398           0 :                 *object->out.forest_trust_info = NULL;
   57399           0 :                 PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
   57400           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57401           0 :                         PyErr_NoMemory();
   57402           0 :                         return -1;
   57403             :                 }
   57404           0 :                 *object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
   57405             :         }
   57406           0 :         return 0;
   57407             : }
   57408             : 
   57409           0 : static PyObject *py_netr_DsRGetForestTrustInformation_get_result(PyObject *obj, void *closure)
   57410             : {
   57411           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   57412           0 :         PyObject *py_result;
   57413           0 :         py_result = PyErr_FromWERROR(object->out.result);
   57414           0 :         return py_result;
   57415             : }
   57416             : 
   57417           0 : static int py_netr_DsRGetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
   57418             : {
   57419           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57420           0 :         if (value == NULL) {
   57421           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   57422           0 :                 return -1;
   57423             :         }
   57424           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   57425           0 :         return 0;
   57426             : }
   57427             : 
   57428             : static PyGetSetDef py_netr_DsRGetForestTrustInformation_getsetters[] = {
   57429             :         {
   57430             :                 .name = discard_const_p(char, "in_server_name"),
   57431             :                 .get = py_netr_DsRGetForestTrustInformation_in_get_server_name,
   57432             :                 .set = py_netr_DsRGetForestTrustInformation_in_set_server_name,
   57433             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57434             :         },
   57435             :         {
   57436             :                 .name = discard_const_p(char, "in_trusted_domain_name"),
   57437             :                 .get = py_netr_DsRGetForestTrustInformation_in_get_trusted_domain_name,
   57438             :                 .set = py_netr_DsRGetForestTrustInformation_in_set_trusted_domain_name,
   57439             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57440             :         },
   57441             :         {
   57442             :                 .name = discard_const_p(char, "in_flags"),
   57443             :                 .get = py_netr_DsRGetForestTrustInformation_in_get_flags,
   57444             :                 .set = py_netr_DsRGetForestTrustInformation_in_set_flags,
   57445             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   57446             :         },
   57447             :         {
   57448             :                 .name = discard_const_p(char, "out_forest_trust_info"),
   57449             :                 .get = py_netr_DsRGetForestTrustInformation_out_get_forest_trust_info,
   57450             :                 .set = py_netr_DsRGetForestTrustInformation_out_set_forest_trust_info,
   57451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
   57452             :         },
   57453             :         {
   57454             :                 .name = discard_const_p(char, "result"),
   57455             :                 .get = py_netr_DsRGetForestTrustInformation_get_result,
   57456             :                 .set = py_netr_DsRGetForestTrustInformation_set_result,
   57457             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   57458             :         },
   57459             :         { .name = NULL }
   57460             : };
   57461             : 
   57462           0 : static PyObject *py_netr_DsRGetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   57463             : {
   57464           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetForestTrustInformation, type);
   57465           0 :         struct netr_DsRGetForestTrustInformation *_self = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(self);
   57466           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   57467             :         /* a pointer to a NULL pointer */
   57468           0 :         _self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
   57469           0 :         return self;
   57470             : }
   57471             : 
   57472           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   57473             : {
   57474             : 
   57475             : 
   57476           0 :         return PyLong_FromLong(43);
   57477             : }
   57478             : 
   57479           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   57480             : {
   57481           0 :         const struct ndr_interface_call *call = NULL;
   57482           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57483           0 :         PyObject *ret = NULL;
   57484           0 :         struct ndr_push *push = NULL;
   57485           0 :         DATA_BLOB blob;
   57486           0 :         enum ndr_err_code err;
   57487             : 
   57488           0 :         if (ndr_table_netlogon.num_calls < 44) {
   57489           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_pack");
   57490           0 :                 return NULL;
   57491             :         }
   57492           0 :         call = &ndr_table_netlogon.calls[43];
   57493             : 
   57494           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   57495           0 :         if (push == NULL) {
   57496           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57497           0 :                 return NULL;
   57498             :         }
   57499             : 
   57500           0 :         push->flags |= ndr_push_flags;
   57501             : 
   57502           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   57503           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57504           0 :                 TALLOC_FREE(push);
   57505           0 :                 PyErr_SetNdrError(err);
   57506           0 :                 return NULL;
   57507             :         }
   57508           0 :         blob = ndr_push_blob(push);
   57509           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   57510           0 :         TALLOC_FREE(push);
   57511           0 :         return ret;
   57512             : }
   57513             : 
   57514           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57515             : {
   57516           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57517           0 :         PyObject *bigendian_obj = NULL;
   57518           0 :         PyObject *ndr64_obj = NULL;
   57519           0 :         libndr_flags ndr_push_flags = 0;
   57520             : 
   57521           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   57522             :                 discard_const_p(char *, kwnames),
   57523             :                 &bigendian_obj,
   57524             :                 &ndr64_obj)) {
   57525           0 :                 return NULL;
   57526             :         }
   57527             : 
   57528           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57529           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57530             :         }
   57531           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57532           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57533             :         }
   57534             : 
   57535           0 :         return py_netr_DsRGetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   57536             : }
   57537             : 
   57538           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57539             : {
   57540           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57541           0 :         PyObject *bigendian_obj = NULL;
   57542           0 :         PyObject *ndr64_obj = NULL;
   57543           0 :         libndr_flags ndr_push_flags = 0;
   57544             : 
   57545           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   57546             :                 discard_const_p(char *, kwnames),
   57547             :                 &bigendian_obj,
   57548             :                 &ndr64_obj)) {
   57549           0 :                 return NULL;
   57550             :         }
   57551             : 
   57552           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57553           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57554             :         }
   57555           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57556           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57557             :         }
   57558             : 
   57559           0 :         return py_netr_DsRGetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   57560             : }
   57561             : 
   57562           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   57563             : {
   57564           0 :         const struct ndr_interface_call *call = NULL;
   57565           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57566           0 :         struct ndr_pull *pull = NULL;
   57567           0 :         enum ndr_err_code err;
   57568             : 
   57569           0 :         if (ndr_table_netlogon.num_calls < 44) {
   57570           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_unpack");
   57571           0 :                 return NULL;
   57572             :         }
   57573           0 :         call = &ndr_table_netlogon.calls[43];
   57574             : 
   57575           0 :         pull = ndr_pull_init_blob(blob, object);
   57576           0 :         if (pull == NULL) {
   57577           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57578           0 :                 return NULL;
   57579             :         }
   57580             : 
   57581           0 :         pull->flags |= ndr_pull_flags;
   57582             : 
   57583           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   57584           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57585           0 :                 TALLOC_FREE(pull);
   57586           0 :                 PyErr_SetNdrError(err);
   57587           0 :                 return NULL;
   57588             :         }
   57589           0 :         if (!allow_remaining) {
   57590           0 :                 uint32_t highest_ofs;
   57591             : 
   57592           0 :                 if (pull->offset > pull->relative_highest_offset) {
   57593           0 :                         highest_ofs = pull->offset;
   57594             :                 } else {
   57595           0 :                         highest_ofs = pull->relative_highest_offset;
   57596             :                 }
   57597           0 :                 if (highest_ofs < pull->data_size) {
   57598           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   57599             :                                 "not all bytes consumed ofs[%u] size[%u]",
   57600             :                                 highest_ofs, pull->data_size);
   57601           0 :                         TALLOC_FREE(pull);
   57602           0 :                         PyErr_SetNdrError(err);
   57603           0 :                         return NULL;
   57604             :                 }
   57605             :         }
   57606             : 
   57607           0 :         TALLOC_FREE(pull);
   57608           0 :         Py_RETURN_NONE;
   57609             : }
   57610             : 
   57611           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57612             : {
   57613           0 :         DATA_BLOB blob;
   57614           0 :         Py_ssize_t blob_length = 0;
   57615           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57616           0 :         PyObject *bigendian_obj = NULL;
   57617           0 :         PyObject *ndr64_obj = NULL;
   57618           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57619           0 :         PyObject *allow_remaining_obj = NULL;
   57620           0 :         bool allow_remaining = false;
   57621             : 
   57622           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   57623             :                 discard_const_p(char *, kwnames),
   57624             :                 &blob.data, &blob_length,
   57625             :                 &bigendian_obj,
   57626             :                 &ndr64_obj,
   57627             :                 &allow_remaining_obj)) {
   57628           0 :                 return NULL;
   57629             :         }
   57630           0 :         blob.length = blob_length;
   57631             : 
   57632           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57633           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57634             :         }
   57635           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57636           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57637             :         }
   57638             : 
   57639           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57640           0 :                 allow_remaining = true;
   57641             :         }
   57642             : 
   57643           0 :         return py_netr_DsRGetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   57644             : }
   57645             : 
   57646           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57647             : {
   57648           0 :         DATA_BLOB blob;
   57649           0 :         Py_ssize_t blob_length = 0;
   57650           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57651           0 :         PyObject *bigendian_obj = NULL;
   57652           0 :         PyObject *ndr64_obj = NULL;
   57653           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57654           0 :         PyObject *allow_remaining_obj = NULL;
   57655           0 :         bool allow_remaining = false;
   57656             : 
   57657           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   57658             :                 discard_const_p(char *, kwnames),
   57659             :                 &blob.data, &blob_length,
   57660             :                 &bigendian_obj,
   57661             :                 &ndr64_obj,
   57662             :                 &allow_remaining_obj)) {
   57663           0 :                 return NULL;
   57664             :         }
   57665           0 :         blob.length = blob_length;
   57666             : 
   57667           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57668           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57669             :         }
   57670           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57671           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57672             :         }
   57673             : 
   57674           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57675           0 :                 allow_remaining = true;
   57676             :         }
   57677             : 
   57678           0 :         return py_netr_DsRGetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   57679             : }
   57680             : 
   57681           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   57682             : {
   57683           0 :         const struct ndr_interface_call *call = NULL;
   57684           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57685           0 :         PyObject *ret;
   57686           0 :         char *retstr;
   57687             : 
   57688           0 :         if (ndr_table_netlogon.num_calls < 44) {
   57689           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_print");
   57690           0 :                 return NULL;
   57691             :         }
   57692           0 :         call = &ndr_table_netlogon.calls[43];
   57693             : 
   57694           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   57695           0 :         ret = PyUnicode_FromString(retstr);
   57696           0 :         TALLOC_FREE(retstr);
   57697             : 
   57698           0 :         return ret;
   57699             : }
   57700             : 
   57701           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57702             : {
   57703           0 :         return py_netr_DsRGetForestTrustInformation_ndr_print(py_obj, "netr_DsRGetForestTrustInformation_in", NDR_IN);
   57704             : }
   57705             : 
   57706           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57707             : {
   57708           0 :         return py_netr_DsRGetForestTrustInformation_ndr_print(py_obj, "netr_DsRGetForestTrustInformation_out", NDR_OUT);
   57709             : }
   57710             : 
   57711             : static PyMethodDef py_netr_DsRGetForestTrustInformation_methods[] = {
   57712             :         { "opnum", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
   57713             :                 "netlogon.netr_DsRGetForestTrustInformation.opnum() -> 43 (0x2b) " },
   57714             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   57715             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   57716             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   57717             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   57718             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   57719             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   57720             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   57721             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   57722             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   57723             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   57724             :         { NULL, NULL, 0, NULL }
   57725             : };
   57726             : 
   57727             : 
   57728             : static PyTypeObject netr_DsRGetForestTrustInformation_Type = {
   57729             :         PyVarObject_HEAD_INIT(NULL, 0)
   57730             :         .tp_name = "netlogon.netr_DsRGetForestTrustInformation",
   57731             :         .tp_getset = py_netr_DsRGetForestTrustInformation_getsetters,
   57732             :         .tp_methods = py_netr_DsRGetForestTrustInformation_methods,
   57733             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   57734             :         .tp_new = py_netr_DsRGetForestTrustInformation_new,
   57735             : };
   57736             : 
   57737         158 : static bool pack_py_netr_DsRGetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetForestTrustInformation *r)
   57738             : {
   57739           4 :         PyObject *py_server_name;
   57740           4 :         PyObject *py_trusted_domain_name;
   57741           4 :         PyObject *py_flags;
   57742         158 :         const char *kwnames[] = {
   57743             :                 "server_name", "trusted_domain_name", "flags", NULL
   57744             :         };
   57745             : 
   57746         158 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_DsRGetForestTrustInformation", discard_const_p(char *, kwnames), &py_server_name, &py_trusted_domain_name, &py_flags)) {
   57747           0 :                 return false;
   57748             :         }
   57749             : 
   57750         158 :         if (py_server_name == NULL) {
   57751           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   57752           0 :                 return false;
   57753             :         }
   57754         158 :         if (py_server_name == Py_None) {
   57755           0 :                 r->in.server_name = NULL;
   57756             :         } else {
   57757         158 :                 r->in.server_name = NULL;
   57758             :                 {
   57759           4 :                         const char *test_str;
   57760           4 :                         const char *talloc_str;
   57761         158 :                         PyObject *unicode = NULL;
   57762         158 :                         if (PyUnicode_Check(py_server_name)) {
   57763         158 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   57764         158 :                                 if (unicode == NULL) {
   57765           0 :                                         PyErr_NoMemory();
   57766           0 :                                         return false;
   57767             :                                 }
   57768         158 :                                 test_str = PyBytes_AS_STRING(unicode);
   57769           0 :                         } else if (PyBytes_Check(py_server_name)) {
   57770           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   57771             :                         } else {
   57772           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   57773           0 :                                 return false;
   57774             :                         }
   57775         158 :                         talloc_str = talloc_strdup(r, test_str);
   57776         158 :                         if (unicode != NULL) {
   57777         158 :                                 Py_DECREF(unicode);
   57778             :                         }
   57779         158 :                         if (talloc_str == NULL) {
   57780           0 :                                 PyErr_NoMemory();
   57781           0 :                                 return false;
   57782             :                         }
   57783         158 :                         r->in.server_name = talloc_str;
   57784             :                 }
   57785             :         }
   57786         158 :         if (py_trusted_domain_name == NULL) {
   57787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.trusted_domain_name");
   57788           0 :                 return false;
   57789             :         }
   57790         158 :         if (py_trusted_domain_name == Py_None) {
   57791         138 :                 r->in.trusted_domain_name = NULL;
   57792             :         } else {
   57793          20 :                 r->in.trusted_domain_name = NULL;
   57794             :                 {
   57795           0 :                         const char *test_str;
   57796           0 :                         const char *talloc_str;
   57797          20 :                         PyObject *unicode = NULL;
   57798          20 :                         if (PyUnicode_Check(py_trusted_domain_name)) {
   57799          20 :                                 unicode = PyUnicode_AsEncodedString(py_trusted_domain_name, "utf-8", "ignore");
   57800          20 :                                 if (unicode == NULL) {
   57801           0 :                                         PyErr_NoMemory();
   57802           0 :                                         return false;
   57803             :                                 }
   57804          20 :                                 test_str = PyBytes_AS_STRING(unicode);
   57805           0 :                         } else if (PyBytes_Check(py_trusted_domain_name)) {
   57806           0 :                                 test_str = PyBytes_AS_STRING(py_trusted_domain_name);
   57807             :                         } else {
   57808           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_trusted_domain_name)->tp_name);
   57809           0 :                                 return false;
   57810             :                         }
   57811          20 :                         talloc_str = talloc_strdup(r, test_str);
   57812          20 :                         if (unicode != NULL) {
   57813          20 :                                 Py_DECREF(unicode);
   57814             :                         }
   57815          20 :                         if (talloc_str == NULL) {
   57816           0 :                                 PyErr_NoMemory();
   57817           0 :                                 return false;
   57818             :                         }
   57819          20 :                         r->in.trusted_domain_name = talloc_str;
   57820             :                 }
   57821             :         }
   57822         158 :         if (py_flags == NULL) {
   57823           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   57824           0 :                 return false;
   57825             :         }
   57826             :         {
   57827         158 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   57828         158 :                 if (PyLong_Check(py_flags)) {
   57829           4 :                         unsigned long long test_var;
   57830         158 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   57831         158 :                         if (PyErr_Occurred() != NULL) {
   57832           0 :                                 return false;
   57833             :                         }
   57834         158 :                         if (test_var > uint_max) {
   57835           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57836             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57837           0 :                                 return false;
   57838             :                         }
   57839         158 :                         r->in.flags = test_var;
   57840             :                 } else {
   57841           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57842             :                           PyLong_Type.tp_name);
   57843           0 :                         return false;
   57844             :                 }
   57845             :         }
   57846         158 :         return true;
   57847             : }
   57848             : 
   57849         158 : static PyObject *unpack_py_netr_DsRGetForestTrustInformation_args_out(struct netr_DsRGetForestTrustInformation *r)
   57850             : {
   57851           4 :         PyObject *result;
   57852           4 :         PyObject *py_forest_trust_info;
   57853         158 :         if (*r->out.forest_trust_info == NULL) {
   57854           4 :                 py_forest_trust_info = Py_None;
   57855           4 :                 Py_INCREF(py_forest_trust_info);
   57856             :         } else {
   57857         154 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
   57858             :         }
   57859         158 :         result = py_forest_trust_info;
   57860         158 :         if (!W_ERROR_IS_OK(r->out.result)) {
   57861           4 :                 PyErr_SetWERROR(r->out.result);
   57862           4 :                 return NULL;
   57863             :         }
   57864             : 
   57865         150 :         return result;
   57866             : }
   57867             : 
   57868             : 
   57869           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_server_name(PyObject *obj, void *closure)
   57870             : {
   57871           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57872           0 :         PyObject *py_server_name;
   57873           0 :         if (object->in.server_name == NULL) {
   57874           0 :                 Py_RETURN_NONE;
   57875             :         }
   57876           0 :         if (object->in.server_name == NULL) {
   57877           0 :                 py_server_name = Py_None;
   57878           0 :                 Py_INCREF(py_server_name);
   57879             :         } else {
   57880           0 :                 if (object->in.server_name == NULL) {
   57881           0 :                         py_server_name = Py_None;
   57882           0 :                         Py_INCREF(py_server_name);
   57883             :                 } else {
   57884           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   57885             :                 }
   57886             :         }
   57887           0 :         return py_server_name;
   57888             : }
   57889             : 
   57890           0 : static int py_netr_GetForestTrustInformation_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   57891             : {
   57892           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57893           0 :         if (value == NULL) {
   57894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   57895           0 :                 return -1;
   57896             :         }
   57897           0 :         if (value == Py_None) {
   57898           0 :                 object->in.server_name = NULL;
   57899             :         } else {
   57900           0 :                 object->in.server_name = NULL;
   57901             :                 {
   57902           0 :                         const char *test_str;
   57903           0 :                         const char *talloc_str;
   57904           0 :                         PyObject *unicode = NULL;
   57905           0 :                         if (PyUnicode_Check(value)) {
   57906           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57907           0 :                                 if (unicode == NULL) {
   57908           0 :                                         PyErr_NoMemory();
   57909           0 :                                         return -1;
   57910             :                                 }
   57911           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57912           0 :                         } else if (PyBytes_Check(value)) {
   57913           0 :                                 test_str = PyBytes_AS_STRING(value);
   57914             :                         } else {
   57915           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57916           0 :                                 return -1;
   57917             :                         }
   57918           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57919           0 :                         if (unicode != NULL) {
   57920           0 :                                 Py_DECREF(unicode);
   57921             :                         }
   57922           0 :                         if (talloc_str == NULL) {
   57923           0 :                                 PyErr_NoMemory();
   57924           0 :                                 return -1;
   57925             :                         }
   57926           0 :                         object->in.server_name = talloc_str;
   57927             :                 }
   57928             :         }
   57929           0 :         return 0;
   57930             : }
   57931             : 
   57932           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_computer_name(PyObject *obj, void *closure)
   57933             : {
   57934           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57935           0 :         PyObject *py_computer_name;
   57936           0 :         if (object->in.computer_name == NULL) {
   57937           0 :                 Py_RETURN_NONE;
   57938             :         }
   57939           0 :         if (object->in.computer_name == NULL) {
   57940           0 :                 py_computer_name = Py_None;
   57941           0 :                 Py_INCREF(py_computer_name);
   57942             :         } else {
   57943           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   57944             :         }
   57945           0 :         return py_computer_name;
   57946             : }
   57947             : 
   57948           0 : static int py_netr_GetForestTrustInformation_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   57949             : {
   57950           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57951           0 :         if (value == NULL) {
   57952           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   57953           0 :                 return -1;
   57954             :         }
   57955           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   57956           0 :         if (object->in.computer_name == NULL) {
   57957           0 :                 PyErr_NoMemory();
   57958           0 :                 return -1;
   57959             :         }
   57960             :         {
   57961           0 :                 const char *test_str;
   57962           0 :                 const char *talloc_str;
   57963           0 :                 PyObject *unicode = NULL;
   57964           0 :                 if (PyUnicode_Check(value)) {
   57965           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57966           0 :                         if (unicode == NULL) {
   57967           0 :                                 PyErr_NoMemory();
   57968           0 :                                 return -1;
   57969             :                         }
   57970           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57971           0 :                 } else if (PyBytes_Check(value)) {
   57972           0 :                         test_str = PyBytes_AS_STRING(value);
   57973             :                 } else {
   57974           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57975           0 :                         return -1;
   57976             :                 }
   57977           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57978           0 :                 if (unicode != NULL) {
   57979           0 :                         Py_DECREF(unicode);
   57980             :                 }
   57981           0 :                 if (talloc_str == NULL) {
   57982           0 :                         PyErr_NoMemory();
   57983           0 :                         return -1;
   57984             :                 }
   57985           0 :                 object->in.computer_name = talloc_str;
   57986             :         }
   57987           0 :         return 0;
   57988             : }
   57989             : 
   57990           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_credential(PyObject *obj, void *closure)
   57991             : {
   57992           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57993           0 :         PyObject *py_credential;
   57994           0 :         if (object->in.credential == NULL) {
   57995           0 :                 Py_RETURN_NONE;
   57996             :         }
   57997           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   57998           0 :         return py_credential;
   57999             : }
   58000             : 
   58001           0 : static int py_netr_GetForestTrustInformation_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   58002             : {
   58003           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   58004           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   58005           0 :         if (value == NULL) {
   58006           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   58007           0 :                 return -1;
   58008             :         }
   58009           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   58010           0 :         if (object->in.credential == NULL) {
   58011           0 :                 PyErr_NoMemory();
   58012           0 :                 return -1;
   58013             :         }
   58014           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58015           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58016           0 :                 PyErr_NoMemory();
   58017           0 :                 return -1;
   58018             :         }
   58019           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58020           0 :         return 0;
   58021             : }
   58022             : 
   58023           0 : static PyObject *py_netr_GetForestTrustInformation_out_get_return_authenticator(PyObject *obj, void *closure)
   58024             : {
   58025           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   58026           0 :         PyObject *py_return_authenticator;
   58027           0 :         if (object->out.return_authenticator == NULL) {
   58028           0 :                 Py_RETURN_NONE;
   58029             :         }
   58030           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   58031           0 :         return py_return_authenticator;
   58032             : }
   58033             : 
   58034           0 : static int py_netr_GetForestTrustInformation_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   58035             : {
   58036           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   58037           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   58038           0 :         if (value == NULL) {
   58039           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   58040           0 :                 return -1;
   58041             :         }
   58042           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   58043           0 :         if (object->out.return_authenticator == NULL) {
   58044           0 :                 PyErr_NoMemory();
   58045           0 :                 return -1;
   58046             :         }
   58047           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58048           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58049           0 :                 PyErr_NoMemory();
   58050           0 :                 return -1;
   58051             :         }
   58052           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58053           0 :         return 0;
   58054             : }
   58055             : 
   58056           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
   58057             : {
   58058           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   58059           0 :         PyObject *py_flags;
   58060           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   58061           0 :         return py_flags;
   58062             : }
   58063             : 
   58064           0 : static int py_netr_GetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   58065             : {
   58066           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   58067           0 :         if (value == NULL) {
   58068           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   58069           0 :                 return -1;
   58070             :         }
   58071             :         {
   58072           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   58073           0 :                 if (PyLong_Check(value)) {
   58074           0 :                         unsigned long long test_var;
   58075           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58076           0 :                         if (PyErr_Occurred() != NULL) {
   58077           0 :                                 return -1;
   58078             :                         }
   58079           0 :                         if (test_var > uint_max) {
   58080           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58081             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58082           0 :                                 return -1;
   58083             :                         }
   58084           0 :                         object->in.flags = test_var;
   58085             :                 } else {
   58086           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58087             :                           PyLong_Type.tp_name);
   58088           0 :                         return -1;
   58089             :                 }
   58090             :         }
   58091           0 :         return 0;
   58092             : }
   58093             : 
   58094           0 : static PyObject *py_netr_GetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
   58095             : {
   58096           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   58097           0 :         PyObject *py_forest_trust_info;
   58098           0 :         if (object->out.forest_trust_info == NULL) {
   58099           0 :                 Py_RETURN_NONE;
   58100             :         }
   58101           0 :         if (*object->out.forest_trust_info == NULL) {
   58102           0 :                 py_forest_trust_info = Py_None;
   58103           0 :                 Py_INCREF(py_forest_trust_info);
   58104             :         } else {
   58105           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
   58106             :         }
   58107           0 :         return py_forest_trust_info;
   58108             : }
   58109             : 
   58110           0 : static int py_netr_GetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   58111             : {
   58112           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   58113           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
   58114           0 :         if (value == NULL) {
   58115           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.forest_trust_info");
   58116           0 :                 return -1;
   58117             :         }
   58118           0 :         object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
   58119           0 :         if (object->out.forest_trust_info == NULL) {
   58120           0 :                 PyErr_NoMemory();
   58121           0 :                 return -1;
   58122             :         }
   58123           0 :         if (value == Py_None) {
   58124           0 :                 *object->out.forest_trust_info = NULL;
   58125             :         } else {
   58126           0 :                 *object->out.forest_trust_info = NULL;
   58127           0 :                 PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
   58128           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58129           0 :                         PyErr_NoMemory();
   58130           0 :                         return -1;
   58131             :                 }
   58132           0 :                 *object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
   58133             :         }
   58134           0 :         return 0;
   58135             : }
   58136             : 
   58137           0 : static PyObject *py_netr_GetForestTrustInformation_get_result(PyObject *obj, void *closure)
   58138             : {
   58139           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   58140           0 :         PyObject *py_result;
   58141           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   58142           0 :         return py_result;
   58143             : }
   58144             : 
   58145           0 : static int py_netr_GetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
   58146             : {
   58147           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   58148           0 :         if (value == NULL) {
   58149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   58150           0 :                 return -1;
   58151             :         }
   58152           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   58153           0 :         return 0;
   58154             : }
   58155             : 
   58156             : static PyGetSetDef py_netr_GetForestTrustInformation_getsetters[] = {
   58157             :         {
   58158             :                 .name = discard_const_p(char, "in_server_name"),
   58159             :                 .get = py_netr_GetForestTrustInformation_in_get_server_name,
   58160             :                 .set = py_netr_GetForestTrustInformation_in_set_server_name,
   58161             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58162             :         },
   58163             :         {
   58164             :                 .name = discard_const_p(char, "in_computer_name"),
   58165             :                 .get = py_netr_GetForestTrustInformation_in_get_computer_name,
   58166             :                 .set = py_netr_GetForestTrustInformation_in_set_computer_name,
   58167             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58168             :         },
   58169             :         {
   58170             :                 .name = discard_const_p(char, "in_credential"),
   58171             :                 .get = py_netr_GetForestTrustInformation_in_get_credential,
   58172             :                 .set = py_netr_GetForestTrustInformation_in_set_credential,
   58173             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   58174             :         },
   58175             :         {
   58176             :                 .name = discard_const_p(char, "out_return_authenticator"),
   58177             :                 .get = py_netr_GetForestTrustInformation_out_get_return_authenticator,
   58178             :                 .set = py_netr_GetForestTrustInformation_out_set_return_authenticator,
   58179             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   58180             :         },
   58181             :         {
   58182             :                 .name = discard_const_p(char, "in_flags"),
   58183             :                 .get = py_netr_GetForestTrustInformation_in_get_flags,
   58184             :                 .set = py_netr_GetForestTrustInformation_in_set_flags,
   58185             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   58186             :         },
   58187             :         {
   58188             :                 .name = discard_const_p(char, "out_forest_trust_info"),
   58189             :                 .get = py_netr_GetForestTrustInformation_out_get_forest_trust_info,
   58190             :                 .set = py_netr_GetForestTrustInformation_out_set_forest_trust_info,
   58191             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
   58192             :         },
   58193             :         {
   58194             :                 .name = discard_const_p(char, "result"),
   58195             :                 .get = py_netr_GetForestTrustInformation_get_result,
   58196             :                 .set = py_netr_GetForestTrustInformation_set_result,
   58197             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   58198             :         },
   58199             :         { .name = NULL }
   58200             : };
   58201             : 
   58202           0 : static PyObject *py_netr_GetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   58203             : {
   58204           0 :         PyObject *self = pytalloc_new(struct netr_GetForestTrustInformation, type);
   58205           0 :         struct netr_GetForestTrustInformation *_self = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(self);
   58206           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   58207           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   58208           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   58209             :         /* a pointer to a NULL pointer */
   58210           0 :         _self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
   58211           0 :         return self;
   58212             : }
   58213             : 
   58214           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   58215             : {
   58216             : 
   58217             : 
   58218           0 :         return PyLong_FromLong(44);
   58219             : }
   58220             : 
   58221           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   58222             : {
   58223           0 :         const struct ndr_interface_call *call = NULL;
   58224           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   58225           0 :         PyObject *ret = NULL;
   58226           0 :         struct ndr_push *push = NULL;
   58227           0 :         DATA_BLOB blob;
   58228           0 :         enum ndr_err_code err;
   58229             : 
   58230           0 :         if (ndr_table_netlogon.num_calls < 45) {
   58231           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_pack");
   58232           0 :                 return NULL;
   58233             :         }
   58234           0 :         call = &ndr_table_netlogon.calls[44];
   58235             : 
   58236           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   58237           0 :         if (push == NULL) {
   58238           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58239           0 :                 return NULL;
   58240             :         }
   58241             : 
   58242           0 :         push->flags |= ndr_push_flags;
   58243             : 
   58244           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   58245           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   58246           0 :                 TALLOC_FREE(push);
   58247           0 :                 PyErr_SetNdrError(err);
   58248           0 :                 return NULL;
   58249             :         }
   58250           0 :         blob = ndr_push_blob(push);
   58251           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   58252           0 :         TALLOC_FREE(push);
   58253           0 :         return ret;
   58254             : }
   58255             : 
   58256           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58257             : {
   58258           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   58259           0 :         PyObject *bigendian_obj = NULL;
   58260           0 :         PyObject *ndr64_obj = NULL;
   58261           0 :         libndr_flags ndr_push_flags = 0;
   58262             : 
   58263           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   58264             :                 discard_const_p(char *, kwnames),
   58265             :                 &bigendian_obj,
   58266             :                 &ndr64_obj)) {
   58267           0 :                 return NULL;
   58268             :         }
   58269             : 
   58270           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58271           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   58272             :         }
   58273           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58274           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   58275             :         }
   58276             : 
   58277           0 :         return py_netr_GetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   58278             : }
   58279             : 
   58280           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58281             : {
   58282           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   58283           0 :         PyObject *bigendian_obj = NULL;
   58284           0 :         PyObject *ndr64_obj = NULL;
   58285           0 :         libndr_flags ndr_push_flags = 0;
   58286             : 
   58287           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   58288             :                 discard_const_p(char *, kwnames),
   58289             :                 &bigendian_obj,
   58290             :                 &ndr64_obj)) {
   58291           0 :                 return NULL;
   58292             :         }
   58293             : 
   58294           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58295           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   58296             :         }
   58297           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58298           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   58299             :         }
   58300             : 
   58301           0 :         return py_netr_GetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   58302             : }
   58303             : 
   58304           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   58305             : {
   58306           0 :         const struct ndr_interface_call *call = NULL;
   58307           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   58308           0 :         struct ndr_pull *pull = NULL;
   58309           0 :         enum ndr_err_code err;
   58310             : 
   58311           0 :         if (ndr_table_netlogon.num_calls < 45) {
   58312           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_unpack");
   58313           0 :                 return NULL;
   58314             :         }
   58315           0 :         call = &ndr_table_netlogon.calls[44];
   58316             : 
   58317           0 :         pull = ndr_pull_init_blob(blob, object);
   58318           0 :         if (pull == NULL) {
   58319           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58320           0 :                 return NULL;
   58321             :         }
   58322             : 
   58323           0 :         pull->flags |= ndr_pull_flags;
   58324             : 
   58325           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   58326           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   58327           0 :                 TALLOC_FREE(pull);
   58328           0 :                 PyErr_SetNdrError(err);
   58329           0 :                 return NULL;
   58330             :         }
   58331           0 :         if (!allow_remaining) {
   58332           0 :                 uint32_t highest_ofs;
   58333             : 
   58334           0 :                 if (pull->offset > pull->relative_highest_offset) {
   58335           0 :                         highest_ofs = pull->offset;
   58336             :                 } else {
   58337           0 :                         highest_ofs = pull->relative_highest_offset;
   58338             :                 }
   58339           0 :                 if (highest_ofs < pull->data_size) {
   58340           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   58341             :                                 "not all bytes consumed ofs[%u] size[%u]",
   58342             :                                 highest_ofs, pull->data_size);
   58343           0 :                         TALLOC_FREE(pull);
   58344           0 :                         PyErr_SetNdrError(err);
   58345           0 :                         return NULL;
   58346             :                 }
   58347             :         }
   58348             : 
   58349           0 :         TALLOC_FREE(pull);
   58350           0 :         Py_RETURN_NONE;
   58351             : }
   58352             : 
   58353           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58354             : {
   58355           0 :         DATA_BLOB blob;
   58356           0 :         Py_ssize_t blob_length = 0;
   58357           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58358           0 :         PyObject *bigendian_obj = NULL;
   58359           0 :         PyObject *ndr64_obj = NULL;
   58360           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58361           0 :         PyObject *allow_remaining_obj = NULL;
   58362           0 :         bool allow_remaining = false;
   58363             : 
   58364           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   58365             :                 discard_const_p(char *, kwnames),
   58366             :                 &blob.data, &blob_length,
   58367             :                 &bigendian_obj,
   58368             :                 &ndr64_obj,
   58369             :                 &allow_remaining_obj)) {
   58370           0 :                 return NULL;
   58371             :         }
   58372           0 :         blob.length = blob_length;
   58373             : 
   58374           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58375           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58376             :         }
   58377           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58378           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58379             :         }
   58380             : 
   58381           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58382           0 :                 allow_remaining = true;
   58383             :         }
   58384             : 
   58385           0 :         return py_netr_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   58386             : }
   58387             : 
   58388           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58389             : {
   58390           0 :         DATA_BLOB blob;
   58391           0 :         Py_ssize_t blob_length = 0;
   58392           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58393           0 :         PyObject *bigendian_obj = NULL;
   58394           0 :         PyObject *ndr64_obj = NULL;
   58395           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58396           0 :         PyObject *allow_remaining_obj = NULL;
   58397           0 :         bool allow_remaining = false;
   58398             : 
   58399           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   58400             :                 discard_const_p(char *, kwnames),
   58401             :                 &blob.data, &blob_length,
   58402             :                 &bigendian_obj,
   58403             :                 &ndr64_obj,
   58404             :                 &allow_remaining_obj)) {
   58405           0 :                 return NULL;
   58406             :         }
   58407           0 :         blob.length = blob_length;
   58408             : 
   58409           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58410           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58411             :         }
   58412           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58413           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58414             :         }
   58415             : 
   58416           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58417           0 :                 allow_remaining = true;
   58418             :         }
   58419             : 
   58420           0 :         return py_netr_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   58421             : }
   58422             : 
   58423           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   58424             : {
   58425           0 :         const struct ndr_interface_call *call = NULL;
   58426           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   58427           0 :         PyObject *ret;
   58428           0 :         char *retstr;
   58429             : 
   58430           0 :         if (ndr_table_netlogon.num_calls < 45) {
   58431           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_print");
   58432           0 :                 return NULL;
   58433             :         }
   58434           0 :         call = &ndr_table_netlogon.calls[44];
   58435             : 
   58436           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   58437           0 :         ret = PyUnicode_FromString(retstr);
   58438           0 :         TALLOC_FREE(retstr);
   58439             : 
   58440           0 :         return ret;
   58441             : }
   58442             : 
   58443           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58444             : {
   58445           0 :         return py_netr_GetForestTrustInformation_ndr_print(py_obj, "netr_GetForestTrustInformation_in", NDR_IN);
   58446             : }
   58447             : 
   58448           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58449             : {
   58450           0 :         return py_netr_GetForestTrustInformation_ndr_print(py_obj, "netr_GetForestTrustInformation_out", NDR_OUT);
   58451             : }
   58452             : 
   58453             : static PyMethodDef py_netr_GetForestTrustInformation_methods[] = {
   58454             :         { "opnum", (PyCFunction)py_netr_GetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
   58455             :                 "netlogon.netr_GetForestTrustInformation.opnum() -> 44 (0x2c) " },
   58456             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   58457             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   58458             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   58459             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   58460             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   58461             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   58462             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   58463             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   58464             :         { "__ndr_print_in__", (PyCFunction)py_netr_GetForestTrustInformation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   58465             :         { "__ndr_print_out__", (PyCFunction)py_netr_GetForestTrustInformation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   58466             :         { NULL, NULL, 0, NULL }
   58467             : };
   58468             : 
   58469             : 
   58470             : static PyTypeObject netr_GetForestTrustInformation_Type = {
   58471             :         PyVarObject_HEAD_INIT(NULL, 0)
   58472             :         .tp_name = "netlogon.netr_GetForestTrustInformation",
   58473             :         .tp_getset = py_netr_GetForestTrustInformation_getsetters,
   58474             :         .tp_methods = py_netr_GetForestTrustInformation_methods,
   58475             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   58476             :         .tp_new = py_netr_GetForestTrustInformation_new,
   58477             : };
   58478             : 
   58479           0 : static bool pack_py_netr_GetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct netr_GetForestTrustInformation *r)
   58480             : {
   58481           0 :         PyObject *py_server_name;
   58482           0 :         PyObject *py_computer_name;
   58483           0 :         PyObject *py_credential;
   58484           0 :         PyObject *py_flags;
   58485           0 :         const char *kwnames[] = {
   58486             :                 "server_name", "computer_name", "credential", "flags", NULL
   58487             :         };
   58488             : 
   58489           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_GetForestTrustInformation", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_flags)) {
   58490           0 :                 return false;
   58491             :         }
   58492             : 
   58493           0 :         if (py_server_name == NULL) {
   58494           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   58495           0 :                 return false;
   58496             :         }
   58497           0 :         if (py_server_name == Py_None) {
   58498           0 :                 r->in.server_name = NULL;
   58499             :         } else {
   58500           0 :                 r->in.server_name = NULL;
   58501             :                 {
   58502           0 :                         const char *test_str;
   58503           0 :                         const char *talloc_str;
   58504           0 :                         PyObject *unicode = NULL;
   58505           0 :                         if (PyUnicode_Check(py_server_name)) {
   58506           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   58507           0 :                                 if (unicode == NULL) {
   58508           0 :                                         PyErr_NoMemory();
   58509           0 :                                         return false;
   58510             :                                 }
   58511           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58512           0 :                         } else if (PyBytes_Check(py_server_name)) {
   58513           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   58514             :                         } else {
   58515           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   58516           0 :                                 return false;
   58517             :                         }
   58518           0 :                         talloc_str = talloc_strdup(r, test_str);
   58519           0 :                         if (unicode != NULL) {
   58520           0 :                                 Py_DECREF(unicode);
   58521             :                         }
   58522           0 :                         if (talloc_str == NULL) {
   58523           0 :                                 PyErr_NoMemory();
   58524           0 :                                 return false;
   58525             :                         }
   58526           0 :                         r->in.server_name = talloc_str;
   58527             :                 }
   58528             :         }
   58529           0 :         if (py_computer_name == NULL) {
   58530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   58531           0 :                 return false;
   58532             :         }
   58533           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   58534           0 :         if (r->in.computer_name == NULL) {
   58535           0 :                 PyErr_NoMemory();
   58536           0 :                 return false;
   58537             :         }
   58538             :         {
   58539           0 :                 const char *test_str;
   58540           0 :                 const char *talloc_str;
   58541           0 :                 PyObject *unicode = NULL;
   58542           0 :                 if (PyUnicode_Check(py_computer_name)) {
   58543           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   58544           0 :                         if (unicode == NULL) {
   58545           0 :                                 PyErr_NoMemory();
   58546           0 :                                 return false;
   58547             :                         }
   58548           0 :                         test_str = PyBytes_AS_STRING(unicode);
   58549           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   58550           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   58551             :                 } else {
   58552           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   58553           0 :                         return false;
   58554             :                 }
   58555           0 :                 talloc_str = talloc_strdup(r, test_str);
   58556           0 :                 if (unicode != NULL) {
   58557           0 :                         Py_DECREF(unicode);
   58558             :                 }
   58559           0 :                 if (talloc_str == NULL) {
   58560           0 :                         PyErr_NoMemory();
   58561           0 :                         return false;
   58562             :                 }
   58563           0 :                 r->in.computer_name = talloc_str;
   58564             :         }
   58565           0 :         if (py_credential == NULL) {
   58566           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   58567           0 :                 return false;
   58568             :         }
   58569           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   58570           0 :         if (r->in.credential == NULL) {
   58571           0 :                 PyErr_NoMemory();
   58572           0 :                 return false;
   58573             :         }
   58574           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   58575           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   58576           0 :                 PyErr_NoMemory();
   58577           0 :                 return false;
   58578             :         }
   58579           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   58580           0 :         if (py_flags == NULL) {
   58581           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   58582           0 :                 return false;
   58583             :         }
   58584             :         {
   58585           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   58586           0 :                 if (PyLong_Check(py_flags)) {
   58587           0 :                         unsigned long long test_var;
   58588           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   58589           0 :                         if (PyErr_Occurred() != NULL) {
   58590           0 :                                 return false;
   58591             :                         }
   58592           0 :                         if (test_var > uint_max) {
   58593           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58594             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58595           0 :                                 return false;
   58596             :                         }
   58597           0 :                         r->in.flags = test_var;
   58598             :                 } else {
   58599           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58600             :                           PyLong_Type.tp_name);
   58601           0 :                         return false;
   58602             :                 }
   58603             :         }
   58604           0 :         return true;
   58605             : }
   58606             : 
   58607           0 : static PyObject *unpack_py_netr_GetForestTrustInformation_args_out(struct netr_GetForestTrustInformation *r)
   58608             : {
   58609           0 :         PyObject *result;
   58610           0 :         PyObject *py_return_authenticator;
   58611           0 :         PyObject *py_forest_trust_info;
   58612           0 :         result = PyTuple_New(2);
   58613           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   58614           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   58615           0 :         if (*r->out.forest_trust_info == NULL) {
   58616           0 :                 py_forest_trust_info = Py_None;
   58617           0 :                 Py_INCREF(py_forest_trust_info);
   58618             :         } else {
   58619           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
   58620             :         }
   58621           0 :         PyTuple_SetItem(result, 1, py_forest_trust_info);
   58622           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   58623           0 :                 PyErr_SetNTSTATUS(r->out.result);
   58624           0 :                 return NULL;
   58625             :         }
   58626             : 
   58627           0 :         return result;
   58628             : }
   58629             : 
   58630             : 
   58631           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_server_name(PyObject *obj, void *closure)
   58632             : {
   58633           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58634           0 :         PyObject *py_server_name;
   58635           0 :         if (object->in.server_name == NULL) {
   58636           0 :                 Py_RETURN_NONE;
   58637             :         }
   58638           0 :         if (object->in.server_name == NULL) {
   58639           0 :                 py_server_name = Py_None;
   58640           0 :                 Py_INCREF(py_server_name);
   58641             :         } else {
   58642           0 :                 if (object->in.server_name == NULL) {
   58643           0 :                         py_server_name = Py_None;
   58644           0 :                         Py_INCREF(py_server_name);
   58645             :                 } else {
   58646           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   58647             :                 }
   58648             :         }
   58649           0 :         return py_server_name;
   58650             : }
   58651             : 
   58652           0 : static int py_netr_LogonSamLogonWithFlags_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   58653             : {
   58654           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58655           0 :         if (value == NULL) {
   58656           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   58657           0 :                 return -1;
   58658             :         }
   58659           0 :         if (value == Py_None) {
   58660           0 :                 object->in.server_name = NULL;
   58661             :         } else {
   58662           0 :                 object->in.server_name = NULL;
   58663             :                 {
   58664           0 :                         const char *test_str;
   58665           0 :                         const char *talloc_str;
   58666           0 :                         PyObject *unicode = NULL;
   58667           0 :                         if (PyUnicode_Check(value)) {
   58668           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58669           0 :                                 if (unicode == NULL) {
   58670           0 :                                         PyErr_NoMemory();
   58671           0 :                                         return -1;
   58672             :                                 }
   58673           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58674           0 :                         } else if (PyBytes_Check(value)) {
   58675           0 :                                 test_str = PyBytes_AS_STRING(value);
   58676             :                         } else {
   58677           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58678           0 :                                 return -1;
   58679             :                         }
   58680           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58681           0 :                         if (unicode != NULL) {
   58682           0 :                                 Py_DECREF(unicode);
   58683             :                         }
   58684           0 :                         if (talloc_str == NULL) {
   58685           0 :                                 PyErr_NoMemory();
   58686           0 :                                 return -1;
   58687             :                         }
   58688           0 :                         object->in.server_name = talloc_str;
   58689             :                 }
   58690             :         }
   58691           0 :         return 0;
   58692             : }
   58693             : 
   58694           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_computer_name(PyObject *obj, void *closure)
   58695             : {
   58696           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58697           0 :         PyObject *py_computer_name;
   58698           0 :         if (object->in.computer_name == NULL) {
   58699           0 :                 Py_RETURN_NONE;
   58700             :         }
   58701           0 :         if (object->in.computer_name == NULL) {
   58702           0 :                 py_computer_name = Py_None;
   58703           0 :                 Py_INCREF(py_computer_name);
   58704             :         } else {
   58705           0 :                 if (object->in.computer_name == NULL) {
   58706           0 :                         py_computer_name = Py_None;
   58707           0 :                         Py_INCREF(py_computer_name);
   58708             :                 } else {
   58709           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   58710             :                 }
   58711             :         }
   58712           0 :         return py_computer_name;
   58713             : }
   58714             : 
   58715           0 : static int py_netr_LogonSamLogonWithFlags_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   58716             : {
   58717           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58718           0 :         if (value == NULL) {
   58719           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   58720           0 :                 return -1;
   58721             :         }
   58722           0 :         if (value == Py_None) {
   58723           0 :                 object->in.computer_name = NULL;
   58724             :         } else {
   58725           0 :                 object->in.computer_name = NULL;
   58726             :                 {
   58727           0 :                         const char *test_str;
   58728           0 :                         const char *talloc_str;
   58729           0 :                         PyObject *unicode = NULL;
   58730           0 :                         if (PyUnicode_Check(value)) {
   58731           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58732           0 :                                 if (unicode == NULL) {
   58733           0 :                                         PyErr_NoMemory();
   58734           0 :                                         return -1;
   58735             :                                 }
   58736           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58737           0 :                         } else if (PyBytes_Check(value)) {
   58738           0 :                                 test_str = PyBytes_AS_STRING(value);
   58739             :                         } else {
   58740           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58741           0 :                                 return -1;
   58742             :                         }
   58743           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58744           0 :                         if (unicode != NULL) {
   58745           0 :                                 Py_DECREF(unicode);
   58746             :                         }
   58747           0 :                         if (talloc_str == NULL) {
   58748           0 :                                 PyErr_NoMemory();
   58749           0 :                                 return -1;
   58750             :                         }
   58751           0 :                         object->in.computer_name = talloc_str;
   58752             :                 }
   58753             :         }
   58754           0 :         return 0;
   58755             : }
   58756             : 
   58757           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_credential(PyObject *obj, void *closure)
   58758             : {
   58759           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58760           0 :         PyObject *py_credential;
   58761           0 :         if (object->in.credential == NULL) {
   58762           0 :                 Py_RETURN_NONE;
   58763             :         }
   58764           0 :         if (object->in.credential == NULL) {
   58765           0 :                 py_credential = Py_None;
   58766           0 :                 Py_INCREF(py_credential);
   58767             :         } else {
   58768           0 :                 py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   58769             :         }
   58770           0 :         return py_credential;
   58771             : }
   58772             : 
   58773           0 : static int py_netr_LogonSamLogonWithFlags_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   58774             : {
   58775           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58776           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   58777           0 :         if (value == NULL) {
   58778           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   58779           0 :                 return -1;
   58780             :         }
   58781           0 :         if (value == Py_None) {
   58782           0 :                 object->in.credential = NULL;
   58783             :         } else {
   58784           0 :                 object->in.credential = NULL;
   58785           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58786           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58787           0 :                         PyErr_NoMemory();
   58788           0 :                         return -1;
   58789             :                 }
   58790           0 :                 object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58791             :         }
   58792           0 :         return 0;
   58793             : }
   58794             : 
   58795           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_return_authenticator(PyObject *obj, void *closure)
   58796             : {
   58797           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58798           0 :         PyObject *py_return_authenticator;
   58799           0 :         if (object->in.return_authenticator == NULL) {
   58800           0 :                 Py_RETURN_NONE;
   58801             :         }
   58802           0 :         if (object->in.return_authenticator == NULL) {
   58803           0 :                 py_return_authenticator = Py_None;
   58804           0 :                 Py_INCREF(py_return_authenticator);
   58805             :         } else {
   58806           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   58807             :         }
   58808           0 :         return py_return_authenticator;
   58809             : }
   58810             : 
   58811           0 : static int py_netr_LogonSamLogonWithFlags_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   58812             : {
   58813           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58814           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   58815           0 :         if (value == NULL) {
   58816           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   58817           0 :                 return -1;
   58818             :         }
   58819           0 :         if (value == Py_None) {
   58820           0 :                 object->in.return_authenticator = NULL;
   58821             :         } else {
   58822           0 :                 object->in.return_authenticator = NULL;
   58823           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58824           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58825           0 :                         PyErr_NoMemory();
   58826           0 :                         return -1;
   58827             :                 }
   58828           0 :                 object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58829             :         }
   58830           0 :         return 0;
   58831             : }
   58832             : 
   58833           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_return_authenticator(PyObject *obj, void *closure)
   58834             : {
   58835           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58836           0 :         PyObject *py_return_authenticator;
   58837           0 :         if (object->out.return_authenticator == NULL) {
   58838           0 :                 Py_RETURN_NONE;
   58839             :         }
   58840           0 :         if (object->out.return_authenticator == NULL) {
   58841           0 :                 py_return_authenticator = Py_None;
   58842           0 :                 Py_INCREF(py_return_authenticator);
   58843             :         } else {
   58844           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   58845             :         }
   58846           0 :         return py_return_authenticator;
   58847             : }
   58848             : 
   58849           0 : static int py_netr_LogonSamLogonWithFlags_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   58850             : {
   58851           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58852           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   58853           0 :         if (value == NULL) {
   58854           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   58855           0 :                 return -1;
   58856             :         }
   58857           0 :         if (value == Py_None) {
   58858           0 :                 object->out.return_authenticator = NULL;
   58859             :         } else {
   58860           0 :                 object->out.return_authenticator = NULL;
   58861           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58862           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58863           0 :                         PyErr_NoMemory();
   58864           0 :                         return -1;
   58865             :                 }
   58866           0 :                 object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58867             :         }
   58868           0 :         return 0;
   58869             : }
   58870             : 
   58871           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_logon_level(PyObject *obj, void *closure)
   58872             : {
   58873           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58874           0 :         PyObject *py_logon_level;
   58875           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   58876           0 :         return py_logon_level;
   58877             : }
   58878             : 
   58879           0 : static int py_netr_LogonSamLogonWithFlags_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   58880             : {
   58881           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58882           0 :         if (value == NULL) {
   58883           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   58884           0 :                 return -1;
   58885             :         }
   58886             :         {
   58887           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   58888           0 :                 if (PyLong_Check(value)) {
   58889           0 :                         unsigned long long test_var;
   58890           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58891           0 :                         if (PyErr_Occurred() != NULL) {
   58892           0 :                                 return -1;
   58893             :                         }
   58894           0 :                         if (test_var > uint_max) {
   58895           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58896             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58897           0 :                                 return -1;
   58898             :                         }
   58899           0 :                         object->in.logon_level = test_var;
   58900             :                 } else {
   58901           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58902             :                           PyLong_Type.tp_name);
   58903           0 :                         return -1;
   58904             :                 }
   58905             :         }
   58906           0 :         return 0;
   58907             : }
   58908             : 
   58909           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_logon(PyObject *obj, void *closure)
   58910             : {
   58911           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58912           0 :         PyObject *py_logon;
   58913           0 :         if (object->in.logon == NULL) {
   58914           0 :                 Py_RETURN_NONE;
   58915             :         }
   58916           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
   58917           0 :         if (py_logon == NULL) {
   58918           0 :                 return NULL;
   58919             :         }
   58920           0 :         return py_logon;
   58921             : }
   58922             : 
   58923           0 : static int py_netr_LogonSamLogonWithFlags_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   58924             : {
   58925           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58926           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
   58927           0 :         if (value == NULL) {
   58928           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   58929           0 :                 return -1;
   58930             :         }
   58931           0 :         object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
   58932           0 :         if (object->in.logon == NULL) {
   58933           0 :                 PyErr_NoMemory();
   58934           0 :                 return -1;
   58935             :         }
   58936             :         {
   58937           0 :                 union netr_LogonLevel *logon_switch_1;
   58938           0 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(py_obj), object->in.logon_level, value, "union netr_LogonLevel");
   58939           0 :                 if (logon_switch_1 == NULL) {
   58940           0 :                         return -1;
   58941             :                 }
   58942           0 :                 object->in.logon = logon_switch_1;
   58943             :         }
   58944           0 :         return 0;
   58945             : }
   58946             : 
   58947           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_validation_level(PyObject *obj, void *closure)
   58948             : {
   58949           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58950           0 :         PyObject *py_validation_level;
   58951           0 :         py_validation_level = PyLong_FromLong((uint16_t)object->in.validation_level);
   58952           0 :         return py_validation_level;
   58953             : }
   58954             : 
   58955           0 : static int py_netr_LogonSamLogonWithFlags_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   58956             : {
   58957           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58958           0 :         if (value == NULL) {
   58959           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.validation_level");
   58960           0 :                 return -1;
   58961             :         }
   58962             :         {
   58963           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   58964           0 :                 if (PyLong_Check(value)) {
   58965           0 :                         unsigned long long test_var;
   58966           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58967           0 :                         if (PyErr_Occurred() != NULL) {
   58968           0 :                                 return -1;
   58969             :                         }
   58970           0 :                         if (test_var > uint_max) {
   58971           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58972             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58973           0 :                                 return -1;
   58974             :                         }
   58975           0 :                         object->in.validation_level = test_var;
   58976             :                 } else {
   58977           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58978             :                           PyLong_Type.tp_name);
   58979           0 :                         return -1;
   58980             :                 }
   58981             :         }
   58982           0 :         return 0;
   58983             : }
   58984             : 
   58985           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_validation(PyObject *obj, void *closure)
   58986             : {
   58987           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58988           0 :         PyObject *py_validation;
   58989           0 :         if (object->out.validation == NULL) {
   58990           0 :                 Py_RETURN_NONE;
   58991             :         }
   58992           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
   58993           0 :         if (py_validation == NULL) {
   58994           0 :                 return NULL;
   58995             :         }
   58996           0 :         return py_validation;
   58997             : }
   58998             : 
   58999           0 : static int py_netr_LogonSamLogonWithFlags_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   59000             : {
   59001           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59002           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   59003           0 :         if (value == NULL) {
   59004           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   59005           0 :                 return -1;
   59006             :         }
   59007           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   59008           0 :         if (object->out.validation == NULL) {
   59009           0 :                 PyErr_NoMemory();
   59010           0 :                 return -1;
   59011             :         }
   59012             :         {
   59013           0 :                 union netr_Validation *validation_switch_1;
   59014           0 :                 validation_switch_1 = (union netr_Validation *)pyrpc_export_union(&netr_Validation_Type, pytalloc_get_mem_ctx(py_obj), object->in.validation_level, value, "union netr_Validation");
   59015           0 :                 if (validation_switch_1 == NULL) {
   59016           0 :                         return -1;
   59017             :                 }
   59018           0 :                 object->out.validation = validation_switch_1;
   59019             :         }
   59020           0 :         return 0;
   59021             : }
   59022             : 
   59023           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_authoritative(PyObject *obj, void *closure)
   59024             : {
   59025           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   59026           0 :         PyObject *py_authoritative;
   59027           0 :         if (object->out.authoritative == NULL) {
   59028           0 :                 Py_RETURN_NONE;
   59029             :         }
   59030           0 :         py_authoritative = PyLong_FromLong((uint16_t)*object->out.authoritative);
   59031           0 :         return py_authoritative;
   59032             : }
   59033             : 
   59034           0 : static int py_netr_LogonSamLogonWithFlags_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   59035             : {
   59036           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59037           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   59038           0 :         if (value == NULL) {
   59039           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   59040           0 :                 return -1;
   59041             :         }
   59042           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   59043           0 :         if (object->out.authoritative == NULL) {
   59044           0 :                 PyErr_NoMemory();
   59045           0 :                 return -1;
   59046             :         }
   59047             :         {
   59048           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   59049           0 :                 if (PyLong_Check(value)) {
   59050           0 :                         unsigned long long test_var;
   59051           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   59052           0 :                         if (PyErr_Occurred() != NULL) {
   59053           0 :                                 return -1;
   59054             :                         }
   59055           0 :                         if (test_var > uint_max) {
   59056           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59057             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59058           0 :                                 return -1;
   59059             :                         }
   59060           0 :                         *object->out.authoritative = test_var;
   59061             :                 } else {
   59062           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59063             :                           PyLong_Type.tp_name);
   59064           0 :                         return -1;
   59065             :                 }
   59066             :         }
   59067           0 :         return 0;
   59068             : }
   59069             : 
   59070           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_flags(PyObject *obj, void *closure)
   59071             : {
   59072           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   59073           0 :         PyObject *py_flags;
   59074           0 :         if (object->in.flags == NULL) {
   59075           0 :                 Py_RETURN_NONE;
   59076             :         }
   59077           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->in.flags);
   59078           0 :         return py_flags;
   59079             : }
   59080             : 
   59081           0 : static int py_netr_LogonSamLogonWithFlags_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   59082             : {
   59083           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59084           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.flags));
   59085           0 :         if (value == NULL) {
   59086           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   59087           0 :                 return -1;
   59088             :         }
   59089           0 :         object->in.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.flags);
   59090           0 :         if (object->in.flags == NULL) {
   59091           0 :                 PyErr_NoMemory();
   59092           0 :                 return -1;
   59093             :         }
   59094             :         {
   59095           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.flags));
   59096           0 :                 if (PyLong_Check(value)) {
   59097           0 :                         unsigned long long test_var;
   59098           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   59099           0 :                         if (PyErr_Occurred() != NULL) {
   59100           0 :                                 return -1;
   59101             :                         }
   59102           0 :                         if (test_var > uint_max) {
   59103           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59104             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59105           0 :                                 return -1;
   59106             :                         }
   59107           0 :                         *object->in.flags = test_var;
   59108             :                 } else {
   59109           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59110             :                           PyLong_Type.tp_name);
   59111           0 :                         return -1;
   59112             :                 }
   59113             :         }
   59114           0 :         return 0;
   59115             : }
   59116             : 
   59117           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_flags(PyObject *obj, void *closure)
   59118             : {
   59119           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   59120           0 :         PyObject *py_flags;
   59121           0 :         if (object->out.flags == NULL) {
   59122           0 :                 Py_RETURN_NONE;
   59123             :         }
   59124           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->out.flags);
   59125           0 :         return py_flags;
   59126             : }
   59127             : 
   59128           0 : static int py_netr_LogonSamLogonWithFlags_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   59129             : {
   59130           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59131           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
   59132           0 :         if (value == NULL) {
   59133           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.flags");
   59134           0 :                 return -1;
   59135             :         }
   59136           0 :         object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
   59137           0 :         if (object->out.flags == NULL) {
   59138           0 :                 PyErr_NoMemory();
   59139           0 :                 return -1;
   59140             :         }
   59141             :         {
   59142           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
   59143           0 :                 if (PyLong_Check(value)) {
   59144           0 :                         unsigned long long test_var;
   59145           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   59146           0 :                         if (PyErr_Occurred() != NULL) {
   59147           0 :                                 return -1;
   59148             :                         }
   59149           0 :                         if (test_var > uint_max) {
   59150           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59151             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59152           0 :                                 return -1;
   59153             :                         }
   59154           0 :                         *object->out.flags = test_var;
   59155             :                 } else {
   59156           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59157             :                           PyLong_Type.tp_name);
   59158           0 :                         return -1;
   59159             :                 }
   59160             :         }
   59161           0 :         return 0;
   59162             : }
   59163             : 
   59164           0 : static PyObject *py_netr_LogonSamLogonWithFlags_get_result(PyObject *obj, void *closure)
   59165             : {
   59166           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   59167           0 :         PyObject *py_result;
   59168           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   59169           0 :         return py_result;
   59170             : }
   59171             : 
   59172           0 : static int py_netr_LogonSamLogonWithFlags_set_result(PyObject *py_obj, PyObject *value, void *closure)
   59173             : {
   59174           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59175           0 :         if (value == NULL) {
   59176           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   59177           0 :                 return -1;
   59178             :         }
   59179           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   59180           0 :         return 0;
   59181             : }
   59182             : 
   59183             : static PyGetSetDef py_netr_LogonSamLogonWithFlags_getsetters[] = {
   59184             :         {
   59185             :                 .name = discard_const_p(char, "in_server_name"),
   59186             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_server_name,
   59187             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_server_name,
   59188             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59189             :         },
   59190             :         {
   59191             :                 .name = discard_const_p(char, "in_computer_name"),
   59192             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_computer_name,
   59193             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_computer_name,
   59194             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59195             :         },
   59196             :         {
   59197             :                 .name = discard_const_p(char, "in_credential"),
   59198             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_credential,
   59199             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_credential,
   59200             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   59201             :         },
   59202             :         {
   59203             :                 .name = discard_const_p(char, "in_return_authenticator"),
   59204             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_return_authenticator,
   59205             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_return_authenticator,
   59206             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   59207             :         },
   59208             :         {
   59209             :                 .name = discard_const_p(char, "out_return_authenticator"),
   59210             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_return_authenticator,
   59211             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_return_authenticator,
   59212             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   59213             :         },
   59214             :         {
   59215             :                 .name = discard_const_p(char, "in_logon_level"),
   59216             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_logon_level,
   59217             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_logon_level,
   59218             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   59219             :         },
   59220             :         {
   59221             :                 .name = discard_const_p(char, "in_logon"),
   59222             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_logon,
   59223             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_logon,
   59224             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   59225             :         },
   59226             :         {
   59227             :                 .name = discard_const_p(char, "in_validation_level"),
   59228             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_validation_level,
   59229             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_validation_level,
   59230             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59231             :         },
   59232             :         {
   59233             :                 .name = discard_const_p(char, "out_validation"),
   59234             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_validation,
   59235             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_validation,
   59236             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   59237             :         },
   59238             :         {
   59239             :                 .name = discard_const_p(char, "out_authoritative"),
   59240             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_authoritative,
   59241             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_authoritative,
   59242             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   59243             :         },
   59244             :         {
   59245             :                 .name = discard_const_p(char, "in_flags"),
   59246             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_flags,
   59247             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_flags,
   59248             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   59249             :         },
   59250             :         {
   59251             :                 .name = discard_const_p(char, "out_flags"),
   59252             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_flags,
   59253             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_flags,
   59254             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   59255             :         },
   59256             :         {
   59257             :                 .name = discard_const_p(char, "result"),
   59258             :                 .get = py_netr_LogonSamLogonWithFlags_get_result,
   59259             :                 .set = py_netr_LogonSamLogonWithFlags_set_result,
   59260             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   59261             :         },
   59262             :         { .name = NULL }
   59263             : };
   59264             : 
   59265           0 : static PyObject *py_netr_LogonSamLogonWithFlags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   59266             : {
   59267           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogonWithFlags, type);
   59268           0 :         struct netr_LogonSamLogonWithFlags *_self = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(self);
   59269           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   59270           0 :         _self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
   59271           0 :         _self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
   59272           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   59273           0 :         _self->in.flags = talloc_zero(mem_ctx, uint32_t);
   59274           0 :         _self->out.flags = talloc_zero(mem_ctx, uint32_t);
   59275           0 :         return self;
   59276             : }
   59277             : 
   59278           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   59279             : {
   59280             : 
   59281             : 
   59282           0 :         return PyLong_FromLong(45);
   59283             : }
   59284             : 
   59285           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   59286             : {
   59287           0 :         const struct ndr_interface_call *call = NULL;
   59288           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59289           0 :         PyObject *ret = NULL;
   59290           0 :         struct ndr_push *push = NULL;
   59291           0 :         DATA_BLOB blob;
   59292           0 :         enum ndr_err_code err;
   59293             : 
   59294           0 :         if (ndr_table_netlogon.num_calls < 46) {
   59295           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_pack");
   59296           0 :                 return NULL;
   59297             :         }
   59298           0 :         call = &ndr_table_netlogon.calls[45];
   59299             : 
   59300           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   59301           0 :         if (push == NULL) {
   59302           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   59303           0 :                 return NULL;
   59304             :         }
   59305             : 
   59306           0 :         push->flags |= ndr_push_flags;
   59307             : 
   59308           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   59309           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59310           0 :                 TALLOC_FREE(push);
   59311           0 :                 PyErr_SetNdrError(err);
   59312           0 :                 return NULL;
   59313             :         }
   59314           0 :         blob = ndr_push_blob(push);
   59315           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   59316           0 :         TALLOC_FREE(push);
   59317           0 :         return ret;
   59318             : }
   59319             : 
   59320           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59321             : {
   59322           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59323           0 :         PyObject *bigendian_obj = NULL;
   59324           0 :         PyObject *ndr64_obj = NULL;
   59325           0 :         libndr_flags ndr_push_flags = 0;
   59326             : 
   59327           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   59328             :                 discard_const_p(char *, kwnames),
   59329             :                 &bigendian_obj,
   59330             :                 &ndr64_obj)) {
   59331           0 :                 return NULL;
   59332             :         }
   59333             : 
   59334           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59335           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59336             :         }
   59337           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59338           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59339             :         }
   59340             : 
   59341           0 :         return py_netr_LogonSamLogonWithFlags_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   59342             : }
   59343             : 
   59344           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59345             : {
   59346           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59347           0 :         PyObject *bigendian_obj = NULL;
   59348           0 :         PyObject *ndr64_obj = NULL;
   59349           0 :         libndr_flags ndr_push_flags = 0;
   59350             : 
   59351           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   59352             :                 discard_const_p(char *, kwnames),
   59353             :                 &bigendian_obj,
   59354             :                 &ndr64_obj)) {
   59355           0 :                 return NULL;
   59356             :         }
   59357             : 
   59358           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59359           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59360             :         }
   59361           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59362           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59363             :         }
   59364             : 
   59365           0 :         return py_netr_LogonSamLogonWithFlags_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   59366             : }
   59367             : 
   59368           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   59369             : {
   59370           0 :         const struct ndr_interface_call *call = NULL;
   59371           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59372           0 :         struct ndr_pull *pull = NULL;
   59373           0 :         enum ndr_err_code err;
   59374             : 
   59375           0 :         if (ndr_table_netlogon.num_calls < 46) {
   59376           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_unpack");
   59377           0 :                 return NULL;
   59378             :         }
   59379           0 :         call = &ndr_table_netlogon.calls[45];
   59380             : 
   59381           0 :         pull = ndr_pull_init_blob(blob, object);
   59382           0 :         if (pull == NULL) {
   59383           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   59384           0 :                 return NULL;
   59385             :         }
   59386             : 
   59387           0 :         pull->flags |= ndr_pull_flags;
   59388             : 
   59389           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   59390           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59391           0 :                 TALLOC_FREE(pull);
   59392           0 :                 PyErr_SetNdrError(err);
   59393           0 :                 return NULL;
   59394             :         }
   59395           0 :         if (!allow_remaining) {
   59396           0 :                 uint32_t highest_ofs;
   59397             : 
   59398           0 :                 if (pull->offset > pull->relative_highest_offset) {
   59399           0 :                         highest_ofs = pull->offset;
   59400             :                 } else {
   59401           0 :                         highest_ofs = pull->relative_highest_offset;
   59402             :                 }
   59403           0 :                 if (highest_ofs < pull->data_size) {
   59404           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   59405             :                                 "not all bytes consumed ofs[%u] size[%u]",
   59406             :                                 highest_ofs, pull->data_size);
   59407           0 :                         TALLOC_FREE(pull);
   59408           0 :                         PyErr_SetNdrError(err);
   59409           0 :                         return NULL;
   59410             :                 }
   59411             :         }
   59412             : 
   59413           0 :         TALLOC_FREE(pull);
   59414           0 :         Py_RETURN_NONE;
   59415             : }
   59416             : 
   59417           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59418             : {
   59419           0 :         DATA_BLOB blob;
   59420           0 :         Py_ssize_t blob_length = 0;
   59421           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59422           0 :         PyObject *bigendian_obj = NULL;
   59423           0 :         PyObject *ndr64_obj = NULL;
   59424           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59425           0 :         PyObject *allow_remaining_obj = NULL;
   59426           0 :         bool allow_remaining = false;
   59427             : 
   59428           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   59429             :                 discard_const_p(char *, kwnames),
   59430             :                 &blob.data, &blob_length,
   59431             :                 &bigendian_obj,
   59432             :                 &ndr64_obj,
   59433             :                 &allow_remaining_obj)) {
   59434           0 :                 return NULL;
   59435             :         }
   59436           0 :         blob.length = blob_length;
   59437             : 
   59438           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59439           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59440             :         }
   59441           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59442           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59443             :         }
   59444             : 
   59445           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59446           0 :                 allow_remaining = true;
   59447             :         }
   59448             : 
   59449           0 :         return py_netr_LogonSamLogonWithFlags_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   59450             : }
   59451             : 
   59452           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59453             : {
   59454           0 :         DATA_BLOB blob;
   59455           0 :         Py_ssize_t blob_length = 0;
   59456           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59457           0 :         PyObject *bigendian_obj = NULL;
   59458           0 :         PyObject *ndr64_obj = NULL;
   59459           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59460           0 :         PyObject *allow_remaining_obj = NULL;
   59461           0 :         bool allow_remaining = false;
   59462             : 
   59463           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   59464             :                 discard_const_p(char *, kwnames),
   59465             :                 &blob.data, &blob_length,
   59466             :                 &bigendian_obj,
   59467             :                 &ndr64_obj,
   59468             :                 &allow_remaining_obj)) {
   59469           0 :                 return NULL;
   59470             :         }
   59471           0 :         blob.length = blob_length;
   59472             : 
   59473           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59474           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59475             :         }
   59476           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59477           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59478             :         }
   59479             : 
   59480           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59481           0 :                 allow_remaining = true;
   59482             :         }
   59483             : 
   59484           0 :         return py_netr_LogonSamLogonWithFlags_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   59485             : }
   59486             : 
   59487           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   59488             : {
   59489           0 :         const struct ndr_interface_call *call = NULL;
   59490           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59491           0 :         PyObject *ret;
   59492           0 :         char *retstr;
   59493             : 
   59494           0 :         if (ndr_table_netlogon.num_calls < 46) {
   59495           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_print");
   59496           0 :                 return NULL;
   59497             :         }
   59498           0 :         call = &ndr_table_netlogon.calls[45];
   59499             : 
   59500           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   59501           0 :         ret = PyUnicode_FromString(retstr);
   59502           0 :         TALLOC_FREE(retstr);
   59503             : 
   59504           0 :         return ret;
   59505             : }
   59506             : 
   59507           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59508             : {
   59509           0 :         return py_netr_LogonSamLogonWithFlags_ndr_print(py_obj, "netr_LogonSamLogonWithFlags_in", NDR_IN);
   59510             : }
   59511             : 
   59512           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59513             : {
   59514           0 :         return py_netr_LogonSamLogonWithFlags_ndr_print(py_obj, "netr_LogonSamLogonWithFlags_out", NDR_OUT);
   59515             : }
   59516             : 
   59517             : static PyMethodDef py_netr_LogonSamLogonWithFlags_methods[] = {
   59518             :         { "opnum", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_opnum, METH_NOARGS|METH_CLASS,
   59519             :                 "netlogon.netr_LogonSamLogonWithFlags.opnum() -> 45 (0x2d) " },
   59520             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   59521             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   59522             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   59523             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   59524             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   59525             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   59526             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   59527             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   59528             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   59529             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   59530             :         { NULL, NULL, 0, NULL }
   59531             : };
   59532             : 
   59533             : 
   59534             : static PyTypeObject netr_LogonSamLogonWithFlags_Type = {
   59535             :         PyVarObject_HEAD_INIT(NULL, 0)
   59536             :         .tp_name = "netlogon.netr_LogonSamLogonWithFlags",
   59537             :         .tp_getset = py_netr_LogonSamLogonWithFlags_getsetters,
   59538             :         .tp_methods = py_netr_LogonSamLogonWithFlags_methods,
   59539             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   59540             :         .tp_new = py_netr_LogonSamLogonWithFlags_new,
   59541             : };
   59542             : 
   59543           4 : static bool pack_py_netr_LogonSamLogonWithFlags_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogonWithFlags *r)
   59544             : {
   59545           0 :         PyObject *py_server_name;
   59546           0 :         PyObject *py_computer_name;
   59547           0 :         PyObject *py_credential;
   59548           0 :         PyObject *py_return_authenticator;
   59549           0 :         PyObject *py_logon_level;
   59550           0 :         PyObject *py_logon;
   59551           0 :         PyObject *py_validation_level;
   59552           0 :         PyObject *py_flags;
   59553           4 :         const char *kwnames[] = {
   59554             :                 "server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", "validation_level", "flags", NULL
   59555             :         };
   59556             : 
   59557           4 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:netr_LogonSamLogonWithFlags", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_logon_level, &py_logon, &py_validation_level, &py_flags)) {
   59558           0 :                 return false;
   59559             :         }
   59560             : 
   59561           4 :         if (py_server_name == NULL) {
   59562           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   59563           0 :                 return false;
   59564             :         }
   59565           4 :         if (py_server_name == Py_None) {
   59566           0 :                 r->in.server_name = NULL;
   59567             :         } else {
   59568           4 :                 r->in.server_name = NULL;
   59569             :                 {
   59570           0 :                         const char *test_str;
   59571           0 :                         const char *talloc_str;
   59572           4 :                         PyObject *unicode = NULL;
   59573           4 :                         if (PyUnicode_Check(py_server_name)) {
   59574           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   59575           4 :                                 if (unicode == NULL) {
   59576           0 :                                         PyErr_NoMemory();
   59577           0 :                                         return false;
   59578             :                                 }
   59579           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   59580           0 :                         } else if (PyBytes_Check(py_server_name)) {
   59581           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   59582             :                         } else {
   59583           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   59584           0 :                                 return false;
   59585             :                         }
   59586           4 :                         talloc_str = talloc_strdup(r, test_str);
   59587           4 :                         if (unicode != NULL) {
   59588           4 :                                 Py_DECREF(unicode);
   59589             :                         }
   59590           4 :                         if (talloc_str == NULL) {
   59591           0 :                                 PyErr_NoMemory();
   59592           0 :                                 return false;
   59593             :                         }
   59594           4 :                         r->in.server_name = talloc_str;
   59595             :                 }
   59596             :         }
   59597           4 :         if (py_computer_name == NULL) {
   59598           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   59599           0 :                 return false;
   59600             :         }
   59601           4 :         if (py_computer_name == Py_None) {
   59602           0 :                 r->in.computer_name = NULL;
   59603             :         } else {
   59604           4 :                 r->in.computer_name = NULL;
   59605             :                 {
   59606           0 :                         const char *test_str;
   59607           0 :                         const char *talloc_str;
   59608           4 :                         PyObject *unicode = NULL;
   59609           4 :                         if (PyUnicode_Check(py_computer_name)) {
   59610           4 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   59611           4 :                                 if (unicode == NULL) {
   59612           0 :                                         PyErr_NoMemory();
   59613           0 :                                         return false;
   59614             :                                 }
   59615           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   59616           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   59617           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   59618             :                         } else {
   59619           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   59620           0 :                                 return false;
   59621             :                         }
   59622           4 :                         talloc_str = talloc_strdup(r, test_str);
   59623           4 :                         if (unicode != NULL) {
   59624           4 :                                 Py_DECREF(unicode);
   59625             :                         }
   59626           4 :                         if (talloc_str == NULL) {
   59627           0 :                                 PyErr_NoMemory();
   59628           0 :                                 return false;
   59629             :                         }
   59630           4 :                         r->in.computer_name = talloc_str;
   59631             :                 }
   59632             :         }
   59633           4 :         if (py_credential == NULL) {
   59634           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   59635           0 :                 return false;
   59636             :         }
   59637           4 :         if (py_credential == Py_None) {
   59638           0 :                 r->in.credential = NULL;
   59639             :         } else {
   59640           4 :                 r->in.credential = NULL;
   59641           4 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   59642           4 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   59643           0 :                         PyErr_NoMemory();
   59644           0 :                         return false;
   59645             :                 }
   59646           4 :                 r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   59647             :         }
   59648           4 :         if (py_return_authenticator == NULL) {
   59649           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   59650           0 :                 return false;
   59651             :         }
   59652           4 :         if (py_return_authenticator == Py_None) {
   59653           0 :                 r->in.return_authenticator = NULL;
   59654             :         } else {
   59655           4 :                 r->in.return_authenticator = NULL;
   59656           4 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   59657           4 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   59658           0 :                         PyErr_NoMemory();
   59659           0 :                         return false;
   59660             :                 }
   59661           4 :                 r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   59662             :         }
   59663           4 :         if (py_logon_level == NULL) {
   59664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   59665           0 :                 return false;
   59666             :         }
   59667             :         {
   59668           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   59669           4 :                 if (PyLong_Check(py_logon_level)) {
   59670           0 :                         unsigned long long test_var;
   59671           4 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   59672           4 :                         if (PyErr_Occurred() != NULL) {
   59673           0 :                                 return false;
   59674             :                         }
   59675           4 :                         if (test_var > uint_max) {
   59676           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59677             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59678           0 :                                 return false;
   59679             :                         }
   59680           4 :                         r->in.logon_level = test_var;
   59681             :                 } else {
   59682           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59683             :                           PyLong_Type.tp_name);
   59684           0 :                         return false;
   59685             :                 }
   59686             :         }
   59687           4 :         if (py_logon == NULL) {
   59688           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   59689           0 :                 return false;
   59690             :         }
   59691           4 :         r->in.logon = talloc_ptrtype(r, r->in.logon);
   59692           4 :         if (r->in.logon == NULL) {
   59693           0 :                 PyErr_NoMemory();
   59694           0 :                 return false;
   59695             :         }
   59696             :         {
   59697           0 :                 union netr_LogonLevel *logon_switch_1;
   59698           4 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   59699           4 :                 if (logon_switch_1 == NULL) {
   59700           0 :                         return false;
   59701             :                 }
   59702           4 :                 r->in.logon = logon_switch_1;
   59703             :         }
   59704           4 :         if (py_validation_level == NULL) {
   59705           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.validation_level");
   59706           0 :                 return false;
   59707             :         }
   59708             :         {
   59709           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   59710           4 :                 if (PyLong_Check(py_validation_level)) {
   59711           0 :                         unsigned long long test_var;
   59712           4 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   59713           4 :                         if (PyErr_Occurred() != NULL) {
   59714           0 :                                 return false;
   59715             :                         }
   59716           4 :                         if (test_var > uint_max) {
   59717           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59718             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59719           0 :                                 return false;
   59720             :                         }
   59721           4 :                         r->in.validation_level = test_var;
   59722             :                 } else {
   59723           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59724             :                           PyLong_Type.tp_name);
   59725           0 :                         return false;
   59726             :                 }
   59727             :         }
   59728           4 :         if (py_flags == NULL) {
   59729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   59730           0 :                 return false;
   59731             :         }
   59732           4 :         r->in.flags = talloc_ptrtype(r, r->in.flags);
   59733           4 :         if (r->in.flags == NULL) {
   59734           0 :                 PyErr_NoMemory();
   59735           0 :                 return false;
   59736             :         }
   59737             :         {
   59738           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.flags));
   59739           4 :                 if (PyLong_Check(py_flags)) {
   59740           0 :                         unsigned long long test_var;
   59741           4 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   59742           4 :                         if (PyErr_Occurred() != NULL) {
   59743           0 :                                 return false;
   59744             :                         }
   59745           4 :                         if (test_var > uint_max) {
   59746           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59747             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59748           0 :                                 return false;
   59749             :                         }
   59750           4 :                         *r->in.flags = test_var;
   59751             :                 } else {
   59752           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59753             :                           PyLong_Type.tp_name);
   59754           0 :                         return false;
   59755             :                 }
   59756             :         }
   59757           4 :         return true;
   59758             : }
   59759             : 
   59760           4 : static PyObject *unpack_py_netr_LogonSamLogonWithFlags_args_out(struct netr_LogonSamLogonWithFlags *r)
   59761             : {
   59762           0 :         PyObject *result;
   59763           0 :         PyObject *py_return_authenticator;
   59764           0 :         PyObject *py_validation;
   59765           0 :         PyObject *py_authoritative;
   59766           0 :         PyObject *py_flags;
   59767           4 :         result = PyTuple_New(4);
   59768           4 :         if (r->out.return_authenticator == NULL) {
   59769           0 :                 py_return_authenticator = Py_None;
   59770           0 :                 Py_INCREF(py_return_authenticator);
   59771             :         } else {
   59772           4 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   59773             :         }
   59774           4 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   59775           4 :         py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
   59776           4 :         if (py_validation == NULL) {
   59777           0 :                 return NULL;
   59778             :         }
   59779           4 :         PyTuple_SetItem(result, 1, py_validation);
   59780           4 :         py_authoritative = PyLong_FromLong((uint16_t)*r->out.authoritative);
   59781           4 :         PyTuple_SetItem(result, 2, py_authoritative);
   59782           4 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*r->out.flags);
   59783           4 :         PyTuple_SetItem(result, 3, py_flags);
   59784           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   59785           0 :                 PyErr_SetNTSTATUS(r->out.result);
   59786           0 :                 return NULL;
   59787             :         }
   59788             : 
   59789           4 :         return result;
   59790             : }
   59791             : 
   59792             : 
   59793           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_server_name(PyObject *obj, void *closure)
   59794             : {
   59795           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59796           0 :         PyObject *py_server_name;
   59797           0 :         if (object->in.server_name == NULL) {
   59798           0 :                 Py_RETURN_NONE;
   59799             :         }
   59800           0 :         if (object->in.server_name == NULL) {
   59801           0 :                 py_server_name = Py_None;
   59802           0 :                 Py_INCREF(py_server_name);
   59803             :         } else {
   59804           0 :                 if (object->in.server_name == NULL) {
   59805           0 :                         py_server_name = Py_None;
   59806           0 :                         Py_INCREF(py_server_name);
   59807             :                 } else {
   59808           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   59809             :                 }
   59810             :         }
   59811           0 :         return py_server_name;
   59812             : }
   59813             : 
   59814           0 : static int py_netr_ServerGetTrustInfo_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   59815             : {
   59816           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59817           0 :         if (value == NULL) {
   59818           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   59819           0 :                 return -1;
   59820             :         }
   59821           0 :         if (value == Py_None) {
   59822           0 :                 object->in.server_name = NULL;
   59823             :         } else {
   59824           0 :                 object->in.server_name = NULL;
   59825             :                 {
   59826           0 :                         const char *test_str;
   59827           0 :                         const char *talloc_str;
   59828           0 :                         PyObject *unicode = NULL;
   59829           0 :                         if (PyUnicode_Check(value)) {
   59830           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   59831           0 :                                 if (unicode == NULL) {
   59832           0 :                                         PyErr_NoMemory();
   59833           0 :                                         return -1;
   59834             :                                 }
   59835           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   59836           0 :                         } else if (PyBytes_Check(value)) {
   59837           0 :                                 test_str = PyBytes_AS_STRING(value);
   59838             :                         } else {
   59839           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   59840           0 :                                 return -1;
   59841             :                         }
   59842           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   59843           0 :                         if (unicode != NULL) {
   59844           0 :                                 Py_DECREF(unicode);
   59845             :                         }
   59846           0 :                         if (talloc_str == NULL) {
   59847           0 :                                 PyErr_NoMemory();
   59848           0 :                                 return -1;
   59849             :                         }
   59850           0 :                         object->in.server_name = talloc_str;
   59851             :                 }
   59852             :         }
   59853           0 :         return 0;
   59854             : }
   59855             : 
   59856           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_account_name(PyObject *obj, void *closure)
   59857             : {
   59858           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59859           0 :         PyObject *py_account_name;
   59860           0 :         if (object->in.account_name == NULL) {
   59861           0 :                 Py_RETURN_NONE;
   59862             :         }
   59863           0 :         if (object->in.account_name == NULL) {
   59864           0 :                 py_account_name = Py_None;
   59865           0 :                 Py_INCREF(py_account_name);
   59866             :         } else {
   59867           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   59868             :         }
   59869           0 :         return py_account_name;
   59870             : }
   59871             : 
   59872           0 : static int py_netr_ServerGetTrustInfo_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   59873             : {
   59874           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59875           0 :         if (value == NULL) {
   59876           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   59877           0 :                 return -1;
   59878             :         }
   59879           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   59880           0 :         if (object->in.account_name == NULL) {
   59881           0 :                 PyErr_NoMemory();
   59882           0 :                 return -1;
   59883             :         }
   59884             :         {
   59885           0 :                 const char *test_str;
   59886           0 :                 const char *talloc_str;
   59887           0 :                 PyObject *unicode = NULL;
   59888           0 :                 if (PyUnicode_Check(value)) {
   59889           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   59890           0 :                         if (unicode == NULL) {
   59891           0 :                                 PyErr_NoMemory();
   59892           0 :                                 return -1;
   59893             :                         }
   59894           0 :                         test_str = PyBytes_AS_STRING(unicode);
   59895           0 :                 } else if (PyBytes_Check(value)) {
   59896           0 :                         test_str = PyBytes_AS_STRING(value);
   59897             :                 } else {
   59898           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   59899           0 :                         return -1;
   59900             :                 }
   59901           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   59902           0 :                 if (unicode != NULL) {
   59903           0 :                         Py_DECREF(unicode);
   59904             :                 }
   59905           0 :                 if (talloc_str == NULL) {
   59906           0 :                         PyErr_NoMemory();
   59907           0 :                         return -1;
   59908             :                 }
   59909           0 :                 object->in.account_name = talloc_str;
   59910             :         }
   59911           0 :         return 0;
   59912             : }
   59913             : 
   59914           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_secure_channel_type(PyObject *obj, void *closure)
   59915             : {
   59916           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59917           0 :         PyObject *py_secure_channel_type;
   59918           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   59919           0 :         return py_secure_channel_type;
   59920             : }
   59921             : 
   59922           0 : static int py_netr_ServerGetTrustInfo_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   59923             : {
   59924           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59925           0 :         if (value == NULL) {
   59926           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   59927           0 :                 return -1;
   59928             :         }
   59929             :         {
   59930           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   59931           0 :                 if (PyLong_Check(value)) {
   59932           0 :                         unsigned long long test_var;
   59933           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   59934           0 :                         if (PyErr_Occurred() != NULL) {
   59935           0 :                                 return -1;
   59936             :                         }
   59937           0 :                         if (test_var > uint_max) {
   59938           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59939             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59940           0 :                                 return -1;
   59941             :                         }
   59942           0 :                         object->in.secure_channel_type = test_var;
   59943             :                 } else {
   59944           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59945             :                           PyLong_Type.tp_name);
   59946           0 :                         return -1;
   59947             :                 }
   59948             :         }
   59949           0 :         return 0;
   59950             : }
   59951             : 
   59952           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_computer_name(PyObject *obj, void *closure)
   59953             : {
   59954           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59955           0 :         PyObject *py_computer_name;
   59956           0 :         if (object->in.computer_name == NULL) {
   59957           0 :                 Py_RETURN_NONE;
   59958             :         }
   59959           0 :         if (object->in.computer_name == NULL) {
   59960           0 :                 py_computer_name = Py_None;
   59961           0 :                 Py_INCREF(py_computer_name);
   59962             :         } else {
   59963           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   59964             :         }
   59965           0 :         return py_computer_name;
   59966             : }
   59967             : 
   59968           0 : static int py_netr_ServerGetTrustInfo_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   59969             : {
   59970           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59971           0 :         if (value == NULL) {
   59972           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   59973           0 :                 return -1;
   59974             :         }
   59975           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   59976           0 :         if (object->in.computer_name == NULL) {
   59977           0 :                 PyErr_NoMemory();
   59978           0 :                 return -1;
   59979             :         }
   59980             :         {
   59981           0 :                 const char *test_str;
   59982           0 :                 const char *talloc_str;
   59983           0 :                 PyObject *unicode = NULL;
   59984           0 :                 if (PyUnicode_Check(value)) {
   59985           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   59986           0 :                         if (unicode == NULL) {
   59987           0 :                                 PyErr_NoMemory();
   59988           0 :                                 return -1;
   59989             :                         }
   59990           0 :                         test_str = PyBytes_AS_STRING(unicode);
   59991           0 :                 } else if (PyBytes_Check(value)) {
   59992           0 :                         test_str = PyBytes_AS_STRING(value);
   59993             :                 } else {
   59994           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   59995           0 :                         return -1;
   59996             :                 }
   59997           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   59998           0 :                 if (unicode != NULL) {
   59999           0 :                         Py_DECREF(unicode);
   60000             :                 }
   60001           0 :                 if (talloc_str == NULL) {
   60002           0 :                         PyErr_NoMemory();
   60003           0 :                         return -1;
   60004             :                 }
   60005           0 :                 object->in.computer_name = talloc_str;
   60006             :         }
   60007           0 :         return 0;
   60008             : }
   60009             : 
   60010           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_credential(PyObject *obj, void *closure)
   60011             : {
   60012           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   60013           0 :         PyObject *py_credential;
   60014           0 :         if (object->in.credential == NULL) {
   60015           0 :                 Py_RETURN_NONE;
   60016             :         }
   60017           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   60018           0 :         return py_credential;
   60019             : }
   60020             : 
   60021           0 : static int py_netr_ServerGetTrustInfo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   60022             : {
   60023           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60024           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   60025           0 :         if (value == NULL) {
   60026           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   60027           0 :                 return -1;
   60028             :         }
   60029           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   60030           0 :         if (object->in.credential == NULL) {
   60031           0 :                 PyErr_NoMemory();
   60032           0 :                 return -1;
   60033             :         }
   60034           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   60035           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   60036           0 :                 PyErr_NoMemory();
   60037           0 :                 return -1;
   60038             :         }
   60039           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   60040           0 :         return 0;
   60041             : }
   60042             : 
   60043           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_return_authenticator(PyObject *obj, void *closure)
   60044             : {
   60045           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   60046           0 :         PyObject *py_return_authenticator;
   60047           0 :         if (object->out.return_authenticator == NULL) {
   60048           0 :                 Py_RETURN_NONE;
   60049             :         }
   60050           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   60051           0 :         return py_return_authenticator;
   60052             : }
   60053             : 
   60054           0 : static int py_netr_ServerGetTrustInfo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   60055             : {
   60056           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60057           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   60058           0 :         if (value == NULL) {
   60059           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   60060           0 :                 return -1;
   60061             :         }
   60062           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   60063           0 :         if (object->out.return_authenticator == NULL) {
   60064           0 :                 PyErr_NoMemory();
   60065           0 :                 return -1;
   60066             :         }
   60067           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   60068           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   60069           0 :                 PyErr_NoMemory();
   60070           0 :                 return -1;
   60071             :         }
   60072           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   60073           0 :         return 0;
   60074             : }
   60075             : 
   60076           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_new_owf_password(PyObject *obj, void *closure)
   60077             : {
   60078           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   60079           0 :         PyObject *py_new_owf_password;
   60080           0 :         if (object->out.new_owf_password == NULL) {
   60081           0 :                 Py_RETURN_NONE;
   60082             :         }
   60083           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.new_owf_password, object->out.new_owf_password);
   60084           0 :         return py_new_owf_password;
   60085             : }
   60086             : 
   60087           0 : static int py_netr_ServerGetTrustInfo_out_set_new_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   60088             : {
   60089           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60090           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.new_owf_password));
   60091           0 :         if (value == NULL) {
   60092           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.new_owf_password");
   60093           0 :                 return -1;
   60094             :         }
   60095           0 :         object->out.new_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.new_owf_password);
   60096           0 :         if (object->out.new_owf_password == NULL) {
   60097           0 :                 PyErr_NoMemory();
   60098           0 :                 return -1;
   60099             :         }
   60100           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   60101           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   60102           0 :                 PyErr_NoMemory();
   60103           0 :                 return -1;
   60104             :         }
   60105           0 :         object->out.new_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   60106           0 :         return 0;
   60107             : }
   60108             : 
   60109           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_old_owf_password(PyObject *obj, void *closure)
   60110             : {
   60111           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   60112           0 :         PyObject *py_old_owf_password;
   60113           0 :         if (object->out.old_owf_password == NULL) {
   60114           0 :                 Py_RETURN_NONE;
   60115             :         }
   60116           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.old_owf_password, object->out.old_owf_password);
   60117           0 :         return py_old_owf_password;
   60118             : }
   60119             : 
   60120           0 : static int py_netr_ServerGetTrustInfo_out_set_old_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   60121             : {
   60122           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60123           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.old_owf_password));
   60124           0 :         if (value == NULL) {
   60125           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.old_owf_password");
   60126           0 :                 return -1;
   60127             :         }
   60128           0 :         object->out.old_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.old_owf_password);
   60129           0 :         if (object->out.old_owf_password == NULL) {
   60130           0 :                 PyErr_NoMemory();
   60131           0 :                 return -1;
   60132             :         }
   60133           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   60134           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   60135           0 :                 PyErr_NoMemory();
   60136           0 :                 return -1;
   60137             :         }
   60138           0 :         object->out.old_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   60139           0 :         return 0;
   60140             : }
   60141             : 
   60142           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_trust_info(PyObject *obj, void *closure)
   60143             : {
   60144           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   60145           0 :         PyObject *py_trust_info;
   60146           0 :         if (object->out.trust_info == NULL) {
   60147           0 :                 Py_RETURN_NONE;
   60148             :         }
   60149           0 :         if (*object->out.trust_info == NULL) {
   60150           0 :                 py_trust_info = Py_None;
   60151           0 :                 Py_INCREF(py_trust_info);
   60152             :         } else {
   60153           0 :                 py_trust_info = pytalloc_reference_ex(&netr_TrustInfo_Type, *object->out.trust_info, *object->out.trust_info);
   60154             :         }
   60155           0 :         return py_trust_info;
   60156             : }
   60157             : 
   60158           0 : static int py_netr_ServerGetTrustInfo_out_set_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   60159             : {
   60160           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60161           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trust_info));
   60162           0 :         if (value == NULL) {
   60163           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.trust_info");
   60164           0 :                 return -1;
   60165             :         }
   60166           0 :         object->out.trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trust_info);
   60167           0 :         if (object->out.trust_info == NULL) {
   60168           0 :                 PyErr_NoMemory();
   60169           0 :                 return -1;
   60170             :         }
   60171           0 :         if (value == Py_None) {
   60172           0 :                 *object->out.trust_info = NULL;
   60173             :         } else {
   60174           0 :                 *object->out.trust_info = NULL;
   60175           0 :                 PY_CHECK_TYPE(&netr_TrustInfo_Type, value, return -1;);
   60176           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   60177           0 :                         PyErr_NoMemory();
   60178           0 :                         return -1;
   60179             :                 }
   60180           0 :                 *object->out.trust_info = (struct netr_TrustInfo *)pytalloc_get_ptr(value);
   60181             :         }
   60182           0 :         return 0;
   60183             : }
   60184             : 
   60185           0 : static PyObject *py_netr_ServerGetTrustInfo_get_result(PyObject *obj, void *closure)
   60186             : {
   60187           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   60188           0 :         PyObject *py_result;
   60189           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   60190           0 :         return py_result;
   60191             : }
   60192             : 
   60193           0 : static int py_netr_ServerGetTrustInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   60194             : {
   60195           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60196           0 :         if (value == NULL) {
   60197           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   60198           0 :                 return -1;
   60199             :         }
   60200           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   60201           0 :         return 0;
   60202             : }
   60203             : 
   60204             : static PyGetSetDef py_netr_ServerGetTrustInfo_getsetters[] = {
   60205             :         {
   60206             :                 .name = discard_const_p(char, "in_server_name"),
   60207             :                 .get = py_netr_ServerGetTrustInfo_in_get_server_name,
   60208             :                 .set = py_netr_ServerGetTrustInfo_in_set_server_name,
   60209             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   60210             :         },
   60211             :         {
   60212             :                 .name = discard_const_p(char, "in_account_name"),
   60213             :                 .get = py_netr_ServerGetTrustInfo_in_get_account_name,
   60214             :                 .set = py_netr_ServerGetTrustInfo_in_set_account_name,
   60215             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   60216             :         },
   60217             :         {
   60218             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   60219             :                 .get = py_netr_ServerGetTrustInfo_in_get_secure_channel_type,
   60220             :                 .set = py_netr_ServerGetTrustInfo_in_set_secure_channel_type,
   60221             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   60222             :         },
   60223             :         {
   60224             :                 .name = discard_const_p(char, "in_computer_name"),
   60225             :                 .get = py_netr_ServerGetTrustInfo_in_get_computer_name,
   60226             :                 .set = py_netr_ServerGetTrustInfo_in_set_computer_name,
   60227             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   60228             :         },
   60229             :         {
   60230             :                 .name = discard_const_p(char, "in_credential"),
   60231             :                 .get = py_netr_ServerGetTrustInfo_in_get_credential,
   60232             :                 .set = py_netr_ServerGetTrustInfo_in_set_credential,
   60233             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   60234             :         },
   60235             :         {
   60236             :                 .name = discard_const_p(char, "out_return_authenticator"),
   60237             :                 .get = py_netr_ServerGetTrustInfo_out_get_return_authenticator,
   60238             :                 .set = py_netr_ServerGetTrustInfo_out_set_return_authenticator,
   60239             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   60240             :         },
   60241             :         {
   60242             :                 .name = discard_const_p(char, "out_new_owf_password"),
   60243             :                 .get = py_netr_ServerGetTrustInfo_out_get_new_owf_password,
   60244             :                 .set = py_netr_ServerGetTrustInfo_out_set_new_owf_password,
   60245             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   60246             :         },
   60247             :         {
   60248             :                 .name = discard_const_p(char, "out_old_owf_password"),
   60249             :                 .get = py_netr_ServerGetTrustInfo_out_get_old_owf_password,
   60250             :                 .set = py_netr_ServerGetTrustInfo_out_set_old_owf_password,
   60251             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   60252             :         },
   60253             :         {
   60254             :                 .name = discard_const_p(char, "out_trust_info"),
   60255             :                 .get = py_netr_ServerGetTrustInfo_out_get_trust_info,
   60256             :                 .set = py_netr_ServerGetTrustInfo_out_set_trust_info,
   60257             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustInfo")
   60258             :         },
   60259             :         {
   60260             :                 .name = discard_const_p(char, "result"),
   60261             :                 .get = py_netr_ServerGetTrustInfo_get_result,
   60262             :                 .set = py_netr_ServerGetTrustInfo_set_result,
   60263             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   60264             :         },
   60265             :         { .name = NULL }
   60266             : };
   60267             : 
   60268           0 : static PyObject *py_netr_ServerGetTrustInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   60269             : {
   60270           0 :         PyObject *self = pytalloc_new(struct netr_ServerGetTrustInfo, type);
   60271           0 :         struct netr_ServerGetTrustInfo *_self = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(self);
   60272           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   60273           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   60274           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   60275           0 :         _self->out.new_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   60276           0 :         _self->out.old_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   60277             :         /* a pointer to a NULL pointer */
   60278           0 :         _self->out.trust_info = talloc_zero(mem_ctx, struct netr_TrustInfo *);
   60279           0 :         return self;
   60280             : }
   60281             : 
   60282           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   60283             : {
   60284             : 
   60285             : 
   60286           0 :         return PyLong_FromLong(46);
   60287             : }
   60288             : 
   60289           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   60290             : {
   60291           0 :         const struct ndr_interface_call *call = NULL;
   60292           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60293           0 :         PyObject *ret = NULL;
   60294           0 :         struct ndr_push *push = NULL;
   60295           0 :         DATA_BLOB blob;
   60296           0 :         enum ndr_err_code err;
   60297             : 
   60298           0 :         if (ndr_table_netlogon.num_calls < 47) {
   60299           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_pack");
   60300           0 :                 return NULL;
   60301             :         }
   60302           0 :         call = &ndr_table_netlogon.calls[46];
   60303             : 
   60304           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   60305           0 :         if (push == NULL) {
   60306           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60307           0 :                 return NULL;
   60308             :         }
   60309             : 
   60310           0 :         push->flags |= ndr_push_flags;
   60311             : 
   60312           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   60313           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60314           0 :                 TALLOC_FREE(push);
   60315           0 :                 PyErr_SetNdrError(err);
   60316           0 :                 return NULL;
   60317             :         }
   60318           0 :         blob = ndr_push_blob(push);
   60319           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   60320           0 :         TALLOC_FREE(push);
   60321           0 :         return ret;
   60322             : }
   60323             : 
   60324           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60325             : {
   60326           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60327           0 :         PyObject *bigendian_obj = NULL;
   60328           0 :         PyObject *ndr64_obj = NULL;
   60329           0 :         libndr_flags ndr_push_flags = 0;
   60330             : 
   60331           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   60332             :                 discard_const_p(char *, kwnames),
   60333             :                 &bigendian_obj,
   60334             :                 &ndr64_obj)) {
   60335           0 :                 return NULL;
   60336             :         }
   60337             : 
   60338           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60339           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60340             :         }
   60341           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60342           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60343             :         }
   60344             : 
   60345           0 :         return py_netr_ServerGetTrustInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   60346             : }
   60347             : 
   60348           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60349             : {
   60350           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60351           0 :         PyObject *bigendian_obj = NULL;
   60352           0 :         PyObject *ndr64_obj = NULL;
   60353           0 :         libndr_flags ndr_push_flags = 0;
   60354             : 
   60355           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   60356             :                 discard_const_p(char *, kwnames),
   60357             :                 &bigendian_obj,
   60358             :                 &ndr64_obj)) {
   60359           0 :                 return NULL;
   60360             :         }
   60361             : 
   60362           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60363           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60364             :         }
   60365           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60366           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60367             :         }
   60368             : 
   60369           0 :         return py_netr_ServerGetTrustInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   60370             : }
   60371             : 
   60372           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   60373             : {
   60374           0 :         const struct ndr_interface_call *call = NULL;
   60375           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60376           0 :         struct ndr_pull *pull = NULL;
   60377           0 :         enum ndr_err_code err;
   60378             : 
   60379           0 :         if (ndr_table_netlogon.num_calls < 47) {
   60380           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_unpack");
   60381           0 :                 return NULL;
   60382             :         }
   60383           0 :         call = &ndr_table_netlogon.calls[46];
   60384             : 
   60385           0 :         pull = ndr_pull_init_blob(blob, object);
   60386           0 :         if (pull == NULL) {
   60387           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60388           0 :                 return NULL;
   60389             :         }
   60390             : 
   60391           0 :         pull->flags |= ndr_pull_flags;
   60392             : 
   60393           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   60394           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60395           0 :                 TALLOC_FREE(pull);
   60396           0 :                 PyErr_SetNdrError(err);
   60397           0 :                 return NULL;
   60398             :         }
   60399           0 :         if (!allow_remaining) {
   60400           0 :                 uint32_t highest_ofs;
   60401             : 
   60402           0 :                 if (pull->offset > pull->relative_highest_offset) {
   60403           0 :                         highest_ofs = pull->offset;
   60404             :                 } else {
   60405           0 :                         highest_ofs = pull->relative_highest_offset;
   60406             :                 }
   60407           0 :                 if (highest_ofs < pull->data_size) {
   60408           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   60409             :                                 "not all bytes consumed ofs[%u] size[%u]",
   60410             :                                 highest_ofs, pull->data_size);
   60411           0 :                         TALLOC_FREE(pull);
   60412           0 :                         PyErr_SetNdrError(err);
   60413           0 :                         return NULL;
   60414             :                 }
   60415             :         }
   60416             : 
   60417           0 :         TALLOC_FREE(pull);
   60418           0 :         Py_RETURN_NONE;
   60419             : }
   60420             : 
   60421           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60422             : {
   60423           0 :         DATA_BLOB blob;
   60424           0 :         Py_ssize_t blob_length = 0;
   60425           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60426           0 :         PyObject *bigendian_obj = NULL;
   60427           0 :         PyObject *ndr64_obj = NULL;
   60428           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60429           0 :         PyObject *allow_remaining_obj = NULL;
   60430           0 :         bool allow_remaining = false;
   60431             : 
   60432           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   60433             :                 discard_const_p(char *, kwnames),
   60434             :                 &blob.data, &blob_length,
   60435             :                 &bigendian_obj,
   60436             :                 &ndr64_obj,
   60437             :                 &allow_remaining_obj)) {
   60438           0 :                 return NULL;
   60439             :         }
   60440           0 :         blob.length = blob_length;
   60441             : 
   60442           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60443           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60444             :         }
   60445           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60446           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60447             :         }
   60448             : 
   60449           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60450           0 :                 allow_remaining = true;
   60451             :         }
   60452             : 
   60453           0 :         return py_netr_ServerGetTrustInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   60454             : }
   60455             : 
   60456           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60457             : {
   60458           0 :         DATA_BLOB blob;
   60459           0 :         Py_ssize_t blob_length = 0;
   60460           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60461           0 :         PyObject *bigendian_obj = NULL;
   60462           0 :         PyObject *ndr64_obj = NULL;
   60463           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60464           0 :         PyObject *allow_remaining_obj = NULL;
   60465           0 :         bool allow_remaining = false;
   60466             : 
   60467           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   60468             :                 discard_const_p(char *, kwnames),
   60469             :                 &blob.data, &blob_length,
   60470             :                 &bigendian_obj,
   60471             :                 &ndr64_obj,
   60472             :                 &allow_remaining_obj)) {
   60473           0 :                 return NULL;
   60474             :         }
   60475           0 :         blob.length = blob_length;
   60476             : 
   60477           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60478           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60479             :         }
   60480           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60481           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60482             :         }
   60483             : 
   60484           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60485           0 :                 allow_remaining = true;
   60486             :         }
   60487             : 
   60488           0 :         return py_netr_ServerGetTrustInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   60489             : }
   60490             : 
   60491           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   60492             : {
   60493           0 :         const struct ndr_interface_call *call = NULL;
   60494           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60495           0 :         PyObject *ret;
   60496           0 :         char *retstr;
   60497             : 
   60498           0 :         if (ndr_table_netlogon.num_calls < 47) {
   60499           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_print");
   60500           0 :                 return NULL;
   60501             :         }
   60502           0 :         call = &ndr_table_netlogon.calls[46];
   60503             : 
   60504           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   60505           0 :         ret = PyUnicode_FromString(retstr);
   60506           0 :         TALLOC_FREE(retstr);
   60507             : 
   60508           0 :         return ret;
   60509             : }
   60510             : 
   60511           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60512             : {
   60513           0 :         return py_netr_ServerGetTrustInfo_ndr_print(py_obj, "netr_ServerGetTrustInfo_in", NDR_IN);
   60514             : }
   60515             : 
   60516           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60517             : {
   60518           0 :         return py_netr_ServerGetTrustInfo_ndr_print(py_obj, "netr_ServerGetTrustInfo_out", NDR_OUT);
   60519             : }
   60520             : 
   60521             : static PyMethodDef py_netr_ServerGetTrustInfo_methods[] = {
   60522             :         { "opnum", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   60523             :                 "netlogon.netr_ServerGetTrustInfo.opnum() -> 46 (0x2e) " },
   60524             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   60525             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   60526             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   60527             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   60528             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   60529             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   60530             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   60531             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   60532             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   60533             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   60534             :         { NULL, NULL, 0, NULL }
   60535             : };
   60536             : 
   60537             : 
   60538             : static PyTypeObject netr_ServerGetTrustInfo_Type = {
   60539             :         PyVarObject_HEAD_INIT(NULL, 0)
   60540             :         .tp_name = "netlogon.netr_ServerGetTrustInfo",
   60541             :         .tp_getset = py_netr_ServerGetTrustInfo_getsetters,
   60542             :         .tp_methods = py_netr_ServerGetTrustInfo_methods,
   60543             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   60544             :         .tp_new = py_netr_ServerGetTrustInfo_new,
   60545             : };
   60546             : 
   60547           0 : static bool pack_py_netr_ServerGetTrustInfo_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerGetTrustInfo *r)
   60548             : {
   60549           0 :         PyObject *py_server_name;
   60550           0 :         PyObject *py_account_name;
   60551           0 :         PyObject *py_secure_channel_type;
   60552           0 :         PyObject *py_computer_name;
   60553           0 :         PyObject *py_credential;
   60554           0 :         const char *kwnames[] = {
   60555             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
   60556             :         };
   60557             : 
   60558           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_ServerGetTrustInfo", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential)) {
   60559           0 :                 return false;
   60560             :         }
   60561             : 
   60562           0 :         if (py_server_name == NULL) {
   60563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   60564           0 :                 return false;
   60565             :         }
   60566           0 :         if (py_server_name == Py_None) {
   60567           0 :                 r->in.server_name = NULL;
   60568             :         } else {
   60569           0 :                 r->in.server_name = NULL;
   60570             :                 {
   60571           0 :                         const char *test_str;
   60572           0 :                         const char *talloc_str;
   60573           0 :                         PyObject *unicode = NULL;
   60574           0 :                         if (PyUnicode_Check(py_server_name)) {
   60575           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   60576           0 :                                 if (unicode == NULL) {
   60577           0 :                                         PyErr_NoMemory();
   60578           0 :                                         return false;
   60579             :                                 }
   60580           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   60581           0 :                         } else if (PyBytes_Check(py_server_name)) {
   60582           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   60583             :                         } else {
   60584           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   60585           0 :                                 return false;
   60586             :                         }
   60587           0 :                         talloc_str = talloc_strdup(r, test_str);
   60588           0 :                         if (unicode != NULL) {
   60589           0 :                                 Py_DECREF(unicode);
   60590             :                         }
   60591           0 :                         if (talloc_str == NULL) {
   60592           0 :                                 PyErr_NoMemory();
   60593           0 :                                 return false;
   60594             :                         }
   60595           0 :                         r->in.server_name = talloc_str;
   60596             :                 }
   60597             :         }
   60598           0 :         if (py_account_name == NULL) {
   60599           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   60600           0 :                 return false;
   60601             :         }
   60602           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   60603           0 :         if (r->in.account_name == NULL) {
   60604           0 :                 PyErr_NoMemory();
   60605           0 :                 return false;
   60606             :         }
   60607             :         {
   60608           0 :                 const char *test_str;
   60609           0 :                 const char *talloc_str;
   60610           0 :                 PyObject *unicode = NULL;
   60611           0 :                 if (PyUnicode_Check(py_account_name)) {
   60612           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   60613           0 :                         if (unicode == NULL) {
   60614           0 :                                 PyErr_NoMemory();
   60615           0 :                                 return false;
   60616             :                         }
   60617           0 :                         test_str = PyBytes_AS_STRING(unicode);
   60618           0 :                 } else if (PyBytes_Check(py_account_name)) {
   60619           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   60620             :                 } else {
   60621           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   60622           0 :                         return false;
   60623             :                 }
   60624           0 :                 talloc_str = talloc_strdup(r, test_str);
   60625           0 :                 if (unicode != NULL) {
   60626           0 :                         Py_DECREF(unicode);
   60627             :                 }
   60628           0 :                 if (talloc_str == NULL) {
   60629           0 :                         PyErr_NoMemory();
   60630           0 :                         return false;
   60631             :                 }
   60632           0 :                 r->in.account_name = talloc_str;
   60633             :         }
   60634           0 :         if (py_secure_channel_type == NULL) {
   60635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   60636           0 :                 return false;
   60637             :         }
   60638             :         {
   60639           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   60640           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   60641           0 :                         unsigned long long test_var;
   60642           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   60643           0 :                         if (PyErr_Occurred() != NULL) {
   60644           0 :                                 return false;
   60645             :                         }
   60646           0 :                         if (test_var > uint_max) {
   60647           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   60648             :                                   PyLong_Type.tp_name, uint_max, test_var);
   60649           0 :                                 return false;
   60650             :                         }
   60651           0 :                         r->in.secure_channel_type = test_var;
   60652             :                 } else {
   60653           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   60654             :                           PyLong_Type.tp_name);
   60655           0 :                         return false;
   60656             :                 }
   60657             :         }
   60658           0 :         if (py_computer_name == NULL) {
   60659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   60660           0 :                 return false;
   60661             :         }
   60662           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   60663           0 :         if (r->in.computer_name == NULL) {
   60664           0 :                 PyErr_NoMemory();
   60665           0 :                 return false;
   60666             :         }
   60667             :         {
   60668           0 :                 const char *test_str;
   60669           0 :                 const char *talloc_str;
   60670           0 :                 PyObject *unicode = NULL;
   60671           0 :                 if (PyUnicode_Check(py_computer_name)) {
   60672           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   60673           0 :                         if (unicode == NULL) {
   60674           0 :                                 PyErr_NoMemory();
   60675           0 :                                 return false;
   60676             :                         }
   60677           0 :                         test_str = PyBytes_AS_STRING(unicode);
   60678           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   60679           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   60680             :                 } else {
   60681           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   60682           0 :                         return false;
   60683             :                 }
   60684           0 :                 talloc_str = talloc_strdup(r, test_str);
   60685           0 :                 if (unicode != NULL) {
   60686           0 :                         Py_DECREF(unicode);
   60687             :                 }
   60688           0 :                 if (talloc_str == NULL) {
   60689           0 :                         PyErr_NoMemory();
   60690           0 :                         return false;
   60691             :                 }
   60692           0 :                 r->in.computer_name = talloc_str;
   60693             :         }
   60694           0 :         if (py_credential == NULL) {
   60695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   60696           0 :                 return false;
   60697             :         }
   60698           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   60699           0 :         if (r->in.credential == NULL) {
   60700           0 :                 PyErr_NoMemory();
   60701           0 :                 return false;
   60702             :         }
   60703           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   60704           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   60705           0 :                 PyErr_NoMemory();
   60706           0 :                 return false;
   60707             :         }
   60708           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   60709           0 :         return true;
   60710             : }
   60711             : 
   60712           0 : static PyObject *unpack_py_netr_ServerGetTrustInfo_args_out(struct netr_ServerGetTrustInfo *r)
   60713             : {
   60714           0 :         PyObject *result;
   60715           0 :         PyObject *py_return_authenticator;
   60716           0 :         PyObject *py_new_owf_password;
   60717           0 :         PyObject *py_old_owf_password;
   60718           0 :         PyObject *py_trust_info;
   60719           0 :         result = PyTuple_New(4);
   60720           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   60721           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   60722           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.new_owf_password, r->out.new_owf_password);
   60723           0 :         PyTuple_SetItem(result, 1, py_new_owf_password);
   60724           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.old_owf_password, r->out.old_owf_password);
   60725           0 :         PyTuple_SetItem(result, 2, py_old_owf_password);
   60726           0 :         if (*r->out.trust_info == NULL) {
   60727           0 :                 py_trust_info = Py_None;
   60728           0 :                 Py_INCREF(py_trust_info);
   60729             :         } else {
   60730           0 :                 py_trust_info = pytalloc_reference_ex(&netr_TrustInfo_Type, *r->out.trust_info, *r->out.trust_info);
   60731             :         }
   60732           0 :         PyTuple_SetItem(result, 3, py_trust_info);
   60733           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   60734           0 :                 PyErr_SetNTSTATUS(r->out.result);
   60735           0 :                 return NULL;
   60736             :         }
   60737             : 
   60738           0 :         return result;
   60739             : }
   60740             : 
   60741             : 
   60742           0 : static PyObject *py_netr_Unused47_get_result(PyObject *obj, void *closure)
   60743             : {
   60744           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(obj);
   60745           0 :         PyObject *py_result;
   60746           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   60747           0 :         return py_result;
   60748             : }
   60749             : 
   60750           0 : static int py_netr_Unused47_set_result(PyObject *py_obj, PyObject *value, void *closure)
   60751             : {
   60752           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(py_obj);
   60753           0 :         if (value == NULL) {
   60754           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   60755           0 :                 return -1;
   60756             :         }
   60757           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   60758           0 :         return 0;
   60759             : }
   60760             : 
   60761             : static PyGetSetDef py_netr_Unused47_getsetters[] = {
   60762             :         {
   60763             :                 .name = discard_const_p(char, "result"),
   60764             :                 .get = py_netr_Unused47_get_result,
   60765             :                 .set = py_netr_Unused47_set_result,
   60766             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   60767             :         },
   60768             :         { .name = NULL }
   60769             : };
   60770             : 
   60771           0 : static PyObject *py_netr_Unused47_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   60772             : {
   60773           0 :         PyObject *self = pytalloc_new(struct netr_Unused47, type);
   60774           0 :         return self;
   60775             : }
   60776             : 
   60777           0 : static PyObject *py_netr_Unused47_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   60778             : {
   60779             : 
   60780             : 
   60781           0 :         return PyLong_FromLong(47);
   60782             : }
   60783             : 
   60784           0 : static PyObject *py_netr_Unused47_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   60785             : {
   60786           0 :         const struct ndr_interface_call *call = NULL;
   60787           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(py_obj);
   60788           0 :         PyObject *ret = NULL;
   60789           0 :         struct ndr_push *push = NULL;
   60790           0 :         DATA_BLOB blob;
   60791           0 :         enum ndr_err_code err;
   60792             : 
   60793           0 :         if (ndr_table_netlogon.num_calls < 48) {
   60794           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_pack");
   60795           0 :                 return NULL;
   60796             :         }
   60797           0 :         call = &ndr_table_netlogon.calls[47];
   60798             : 
   60799           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   60800           0 :         if (push == NULL) {
   60801           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60802           0 :                 return NULL;
   60803             :         }
   60804             : 
   60805           0 :         push->flags |= ndr_push_flags;
   60806             : 
   60807           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   60808           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60809           0 :                 TALLOC_FREE(push);
   60810           0 :                 PyErr_SetNdrError(err);
   60811           0 :                 return NULL;
   60812             :         }
   60813           0 :         blob = ndr_push_blob(push);
   60814           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   60815           0 :         TALLOC_FREE(push);
   60816           0 :         return ret;
   60817             : }
   60818             : 
   60819           0 : static PyObject *py_netr_Unused47_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60820             : {
   60821           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60822           0 :         PyObject *bigendian_obj = NULL;
   60823           0 :         PyObject *ndr64_obj = NULL;
   60824           0 :         libndr_flags ndr_push_flags = 0;
   60825             : 
   60826           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   60827             :                 discard_const_p(char *, kwnames),
   60828             :                 &bigendian_obj,
   60829             :                 &ndr64_obj)) {
   60830           0 :                 return NULL;
   60831             :         }
   60832             : 
   60833           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60834           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60835             :         }
   60836           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60837           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60838             :         }
   60839             : 
   60840           0 :         return py_netr_Unused47_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   60841             : }
   60842             : 
   60843           0 : static PyObject *py_netr_Unused47_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60844             : {
   60845           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60846           0 :         PyObject *bigendian_obj = NULL;
   60847           0 :         PyObject *ndr64_obj = NULL;
   60848           0 :         libndr_flags ndr_push_flags = 0;
   60849             : 
   60850           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   60851             :                 discard_const_p(char *, kwnames),
   60852             :                 &bigendian_obj,
   60853             :                 &ndr64_obj)) {
   60854           0 :                 return NULL;
   60855             :         }
   60856             : 
   60857           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60858           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60859             :         }
   60860           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60861           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60862             :         }
   60863             : 
   60864           0 :         return py_netr_Unused47_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   60865             : }
   60866             : 
   60867           0 : static PyObject *py_netr_Unused47_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   60868             : {
   60869           0 :         const struct ndr_interface_call *call = NULL;
   60870           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(py_obj);
   60871           0 :         struct ndr_pull *pull = NULL;
   60872           0 :         enum ndr_err_code err;
   60873             : 
   60874           0 :         if (ndr_table_netlogon.num_calls < 48) {
   60875           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_unpack");
   60876           0 :                 return NULL;
   60877             :         }
   60878           0 :         call = &ndr_table_netlogon.calls[47];
   60879             : 
   60880           0 :         pull = ndr_pull_init_blob(blob, object);
   60881           0 :         if (pull == NULL) {
   60882           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60883           0 :                 return NULL;
   60884             :         }
   60885             : 
   60886           0 :         pull->flags |= ndr_pull_flags;
   60887             : 
   60888           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   60889           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60890           0 :                 TALLOC_FREE(pull);
   60891           0 :                 PyErr_SetNdrError(err);
   60892           0 :                 return NULL;
   60893             :         }
   60894           0 :         if (!allow_remaining) {
   60895           0 :                 uint32_t highest_ofs;
   60896             : 
   60897           0 :                 if (pull->offset > pull->relative_highest_offset) {
   60898           0 :                         highest_ofs = pull->offset;
   60899             :                 } else {
   60900           0 :                         highest_ofs = pull->relative_highest_offset;
   60901             :                 }
   60902           0 :                 if (highest_ofs < pull->data_size) {
   60903           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   60904             :                                 "not all bytes consumed ofs[%u] size[%u]",
   60905             :                                 highest_ofs, pull->data_size);
   60906           0 :                         TALLOC_FREE(pull);
   60907           0 :                         PyErr_SetNdrError(err);
   60908           0 :                         return NULL;
   60909             :                 }
   60910             :         }
   60911             : 
   60912           0 :         TALLOC_FREE(pull);
   60913           0 :         Py_RETURN_NONE;
   60914             : }
   60915             : 
   60916           0 : static PyObject *py_netr_Unused47_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60917             : {
   60918           0 :         DATA_BLOB blob;
   60919           0 :         Py_ssize_t blob_length = 0;
   60920           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60921           0 :         PyObject *bigendian_obj = NULL;
   60922           0 :         PyObject *ndr64_obj = NULL;
   60923           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60924           0 :         PyObject *allow_remaining_obj = NULL;
   60925           0 :         bool allow_remaining = false;
   60926             : 
   60927           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   60928             :                 discard_const_p(char *, kwnames),
   60929             :                 &blob.data, &blob_length,
   60930             :                 &bigendian_obj,
   60931             :                 &ndr64_obj,
   60932             :                 &allow_remaining_obj)) {
   60933           0 :                 return NULL;
   60934             :         }
   60935           0 :         blob.length = blob_length;
   60936             : 
   60937           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60938           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60939             :         }
   60940           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60941           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60942             :         }
   60943             : 
   60944           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60945           0 :                 allow_remaining = true;
   60946             :         }
   60947             : 
   60948           0 :         return py_netr_Unused47_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   60949             : }
   60950             : 
   60951           0 : static PyObject *py_netr_Unused47_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60952             : {
   60953           0 :         DATA_BLOB blob;
   60954           0 :         Py_ssize_t blob_length = 0;
   60955           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60956           0 :         PyObject *bigendian_obj = NULL;
   60957           0 :         PyObject *ndr64_obj = NULL;
   60958           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60959           0 :         PyObject *allow_remaining_obj = NULL;
   60960           0 :         bool allow_remaining = false;
   60961             : 
   60962           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   60963             :                 discard_const_p(char *, kwnames),
   60964             :                 &blob.data, &blob_length,
   60965             :                 &bigendian_obj,
   60966             :                 &ndr64_obj,
   60967             :                 &allow_remaining_obj)) {
   60968           0 :                 return NULL;
   60969             :         }
   60970           0 :         blob.length = blob_length;
   60971             : 
   60972           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60973           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60974             :         }
   60975           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60976           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60977             :         }
   60978             : 
   60979           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60980           0 :                 allow_remaining = true;
   60981             :         }
   60982             : 
   60983           0 :         return py_netr_Unused47_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   60984             : }
   60985             : 
   60986           0 : static PyObject *py_netr_Unused47_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   60987             : {
   60988           0 :         const struct ndr_interface_call *call = NULL;
   60989           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(py_obj);
   60990           0 :         PyObject *ret;
   60991           0 :         char *retstr;
   60992             : 
   60993           0 :         if (ndr_table_netlogon.num_calls < 48) {
   60994           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_print");
   60995           0 :                 return NULL;
   60996             :         }
   60997           0 :         call = &ndr_table_netlogon.calls[47];
   60998             : 
   60999           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   61000           0 :         ret = PyUnicode_FromString(retstr);
   61001           0 :         TALLOC_FREE(retstr);
   61002             : 
   61003           0 :         return ret;
   61004             : }
   61005             : 
   61006           0 : static PyObject *py_netr_Unused47_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   61007             : {
   61008           0 :         return py_netr_Unused47_ndr_print(py_obj, "netr_Unused47_in", NDR_IN);
   61009             : }
   61010             : 
   61011           0 : static PyObject *py_netr_Unused47_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   61012             : {
   61013           0 :         return py_netr_Unused47_ndr_print(py_obj, "netr_Unused47_out", NDR_OUT);
   61014             : }
   61015             : 
   61016             : static PyMethodDef py_netr_Unused47_methods[] = {
   61017             :         { "opnum", (PyCFunction)py_netr_Unused47_ndr_opnum, METH_NOARGS|METH_CLASS,
   61018             :                 "netlogon.netr_Unused47.opnum() -> 47 (0x2f) " },
   61019             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   61020             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   61021             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   61022             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   61023             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   61024             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   61025             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   61026             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   61027             :         { "__ndr_print_in__", (PyCFunction)py_netr_Unused47_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   61028             :         { "__ndr_print_out__", (PyCFunction)py_netr_Unused47_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   61029             :         { NULL, NULL, 0, NULL }
   61030             : };
   61031             : 
   61032             : 
   61033             : static PyTypeObject netr_Unused47_Type = {
   61034             :         PyVarObject_HEAD_INIT(NULL, 0)
   61035             :         .tp_name = "netlogon.netr_Unused47",
   61036             :         .tp_getset = py_netr_Unused47_getsetters,
   61037             :         .tp_methods = py_netr_Unused47_methods,
   61038             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   61039             :         .tp_new = py_netr_Unused47_new,
   61040             : };
   61041             : 
   61042           0 : static bool pack_py_netr_Unused47_args_in(PyObject *args, PyObject *kwargs, struct netr_Unused47 *r)
   61043             : {
   61044           0 :         const char *kwnames[] = {
   61045             :                 NULL
   61046             :         };
   61047             : 
   61048           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":netr_Unused47", discard_const_p(char *, kwnames))) {
   61049           0 :                 return false;
   61050             :         }
   61051             : 
   61052           0 :         return true;
   61053             : }
   61054             : 
   61055           0 : static PyObject *unpack_py_netr_Unused47_args_out(struct netr_Unused47 *r)
   61056             : {
   61057           0 :         PyObject *result;
   61058           0 :         result = Py_None;
   61059           0 :         Py_INCREF(result);
   61060           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   61061           0 :                 PyErr_SetNTSTATUS(r->out.result);
   61062           0 :                 return NULL;
   61063             :         }
   61064             : 
   61065           0 :         return result;
   61066             : }
   61067             : 
   61068             : 
   61069           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_server_name(PyObject *obj, void *closure)
   61070             : {
   61071           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61072           0 :         PyObject *py_server_name;
   61073           0 :         if (object->in.server_name == NULL) {
   61074           0 :                 Py_RETURN_NONE;
   61075             :         }
   61076           0 :         if (object->in.server_name == NULL) {
   61077           0 :                 py_server_name = Py_None;
   61078           0 :                 Py_INCREF(py_server_name);
   61079             :         } else {
   61080           0 :                 if (object->in.server_name == NULL) {
   61081           0 :                         py_server_name = Py_None;
   61082           0 :                         Py_INCREF(py_server_name);
   61083             :                 } else {
   61084           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   61085             :                 }
   61086             :         }
   61087           0 :         return py_server_name;
   61088             : }
   61089             : 
   61090           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   61091             : {
   61092           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61093           0 :         if (value == NULL) {
   61094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   61095           0 :                 return -1;
   61096             :         }
   61097           0 :         if (value == Py_None) {
   61098           0 :                 object->in.server_name = NULL;
   61099             :         } else {
   61100           0 :                 object->in.server_name = NULL;
   61101             :                 {
   61102           0 :                         const char *test_str;
   61103           0 :                         const char *talloc_str;
   61104           0 :                         PyObject *unicode = NULL;
   61105           0 :                         if (PyUnicode_Check(value)) {
   61106           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   61107           0 :                                 if (unicode == NULL) {
   61108           0 :                                         PyErr_NoMemory();
   61109           0 :                                         return -1;
   61110             :                                 }
   61111           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   61112           0 :                         } else if (PyBytes_Check(value)) {
   61113           0 :                                 test_str = PyBytes_AS_STRING(value);
   61114             :                         } else {
   61115           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   61116           0 :                                 return -1;
   61117             :                         }
   61118           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   61119           0 :                         if (unicode != NULL) {
   61120           0 :                                 Py_DECREF(unicode);
   61121             :                         }
   61122           0 :                         if (talloc_str == NULL) {
   61123           0 :                                 PyErr_NoMemory();
   61124           0 :                                 return -1;
   61125             :                         }
   61126           0 :                         object->in.server_name = talloc_str;
   61127             :                 }
   61128             :         }
   61129           0 :         return 0;
   61130             : }
   61131             : 
   61132           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_computer_name(PyObject *obj, void *closure)
   61133             : {
   61134           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61135           0 :         PyObject *py_computer_name;
   61136           0 :         if (object->in.computer_name == NULL) {
   61137           0 :                 Py_RETURN_NONE;
   61138             :         }
   61139           0 :         if (object->in.computer_name == NULL) {
   61140           0 :                 py_computer_name = Py_None;
   61141           0 :                 Py_INCREF(py_computer_name);
   61142             :         } else {
   61143           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   61144             :         }
   61145           0 :         return py_computer_name;
   61146             : }
   61147             : 
   61148           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   61149             : {
   61150           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61151           0 :         if (value == NULL) {
   61152           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   61153           0 :                 return -1;
   61154             :         }
   61155           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   61156           0 :         if (object->in.computer_name == NULL) {
   61157           0 :                 PyErr_NoMemory();
   61158           0 :                 return -1;
   61159             :         }
   61160             :         {
   61161           0 :                 const char *test_str;
   61162           0 :                 const char *talloc_str;
   61163           0 :                 PyObject *unicode = NULL;
   61164           0 :                 if (PyUnicode_Check(value)) {
   61165           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   61166           0 :                         if (unicode == NULL) {
   61167           0 :                                 PyErr_NoMemory();
   61168           0 :                                 return -1;
   61169             :                         }
   61170           0 :                         test_str = PyBytes_AS_STRING(unicode);
   61171           0 :                 } else if (PyBytes_Check(value)) {
   61172           0 :                         test_str = PyBytes_AS_STRING(value);
   61173             :                 } else {
   61174           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   61175           0 :                         return -1;
   61176             :                 }
   61177           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   61178           0 :                 if (unicode != NULL) {
   61179           0 :                         Py_DECREF(unicode);
   61180             :                 }
   61181           0 :                 if (talloc_str == NULL) {
   61182           0 :                         PyErr_NoMemory();
   61183           0 :                         return -1;
   61184             :                 }
   61185           0 :                 object->in.computer_name = talloc_str;
   61186             :         }
   61187           0 :         return 0;
   61188             : }
   61189             : 
   61190           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_credential(PyObject *obj, void *closure)
   61191             : {
   61192           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61193           0 :         PyObject *py_credential;
   61194           0 :         if (object->in.credential == NULL) {
   61195           0 :                 Py_RETURN_NONE;
   61196             :         }
   61197           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   61198           0 :         return py_credential;
   61199             : }
   61200             : 
   61201           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   61202             : {
   61203           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61204           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   61205           0 :         if (value == NULL) {
   61206           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   61207           0 :                 return -1;
   61208             :         }
   61209           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   61210           0 :         if (object->in.credential == NULL) {
   61211           0 :                 PyErr_NoMemory();
   61212           0 :                 return -1;
   61213             :         }
   61214           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   61215           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   61216           0 :                 PyErr_NoMemory();
   61217           0 :                 return -1;
   61218             :         }
   61219           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   61220           0 :         return 0;
   61221             : }
   61222             : 
   61223           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_return_authenticator(PyObject *obj, void *closure)
   61224             : {
   61225           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61226           0 :         PyObject *py_return_authenticator;
   61227           0 :         if (object->out.return_authenticator == NULL) {
   61228           0 :                 Py_RETURN_NONE;
   61229             :         }
   61230           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   61231           0 :         return py_return_authenticator;
   61232             : }
   61233             : 
   61234           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   61235             : {
   61236           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61237           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   61238           0 :         if (value == NULL) {
   61239           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   61240           0 :                 return -1;
   61241             :         }
   61242           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   61243           0 :         if (object->out.return_authenticator == NULL) {
   61244           0 :                 PyErr_NoMemory();
   61245           0 :                 return -1;
   61246             :         }
   61247           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   61248           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   61249           0 :                 PyErr_NoMemory();
   61250           0 :                 return -1;
   61251             :         }
   61252           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   61253           0 :         return 0;
   61254             : }
   61255             : 
   61256           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name(PyObject *obj, void *closure)
   61257             : {
   61258           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61259           0 :         PyObject *py_site_name;
   61260           0 :         if (object->in.site_name == NULL) {
   61261           0 :                 Py_RETURN_NONE;
   61262             :         }
   61263           0 :         if (object->in.site_name == NULL) {
   61264           0 :                 py_site_name = Py_None;
   61265           0 :                 Py_INCREF(py_site_name);
   61266             :         } else {
   61267           0 :                 if (object->in.site_name == NULL) {
   61268           0 :                         py_site_name = Py_None;
   61269           0 :                         Py_INCREF(py_site_name);
   61270             :                 } else {
   61271           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   61272             :                 }
   61273             :         }
   61274           0 :         return py_site_name;
   61275             : }
   61276             : 
   61277           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   61278             : {
   61279           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61280           0 :         if (value == NULL) {
   61281           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   61282           0 :                 return -1;
   61283             :         }
   61284           0 :         if (value == Py_None) {
   61285           0 :                 object->in.site_name = NULL;
   61286             :         } else {
   61287           0 :                 object->in.site_name = NULL;
   61288             :                 {
   61289           0 :                         const char *test_str;
   61290           0 :                         const char *talloc_str;
   61291           0 :                         PyObject *unicode = NULL;
   61292           0 :                         if (PyUnicode_Check(value)) {
   61293           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   61294           0 :                                 if (unicode == NULL) {
   61295           0 :                                         PyErr_NoMemory();
   61296           0 :                                         return -1;
   61297             :                                 }
   61298           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   61299           0 :                         } else if (PyBytes_Check(value)) {
   61300           0 :                                 test_str = PyBytes_AS_STRING(value);
   61301             :                         } else {
   61302           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   61303           0 :                                 return -1;
   61304             :                         }
   61305           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   61306           0 :                         if (unicode != NULL) {
   61307           0 :                                 Py_DECREF(unicode);
   61308             :                         }
   61309           0 :                         if (talloc_str == NULL) {
   61310           0 :                                 PyErr_NoMemory();
   61311           0 :                                 return -1;
   61312             :                         }
   61313           0 :                         object->in.site_name = talloc_str;
   61314             :                 }
   61315             :         }
   61316           0 :         return 0;
   61317             : }
   61318             : 
   61319           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl(PyObject *obj, void *closure)
   61320             : {
   61321           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61322           0 :         PyObject *py_dns_ttl;
   61323           0 :         py_dns_ttl = PyLong_FromUnsignedLongLong((uint32_t)object->in.dns_ttl);
   61324           0 :         return py_dns_ttl;
   61325             : }
   61326             : 
   61327           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl(PyObject *py_obj, PyObject *value, void *closure)
   61328             : {
   61329           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61330           0 :         if (value == NULL) {
   61331           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_ttl");
   61332           0 :                 return -1;
   61333             :         }
   61334             :         {
   61335           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dns_ttl));
   61336           0 :                 if (PyLong_Check(value)) {
   61337           0 :                         unsigned long long test_var;
   61338           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   61339           0 :                         if (PyErr_Occurred() != NULL) {
   61340           0 :                                 return -1;
   61341             :                         }
   61342           0 :                         if (test_var > uint_max) {
   61343           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   61344             :                                   PyLong_Type.tp_name, uint_max, test_var);
   61345           0 :                                 return -1;
   61346             :                         }
   61347           0 :                         object->in.dns_ttl = test_var;
   61348             :                 } else {
   61349           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   61350             :                           PyLong_Type.tp_name);
   61351           0 :                         return -1;
   61352             :                 }
   61353             :         }
   61354           0 :         return 0;
   61355             : }
   61356             : 
   61357           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names(PyObject *obj, void *closure)
   61358             : {
   61359           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61360           0 :         PyObject *py_dns_names;
   61361           0 :         if (object->in.dns_names == NULL) {
   61362           0 :                 Py_RETURN_NONE;
   61363             :         }
   61364           0 :         py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, object->in.dns_names, object->in.dns_names);
   61365           0 :         return py_dns_names;
   61366             : }
   61367             : 
   61368           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   61369             : {
   61370           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61371           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dns_names));
   61372           0 :         if (value == NULL) {
   61373           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_names");
   61374           0 :                 return -1;
   61375             :         }
   61376           0 :         object->in.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_names);
   61377           0 :         if (object->in.dns_names == NULL) {
   61378           0 :                 PyErr_NoMemory();
   61379           0 :                 return -1;
   61380             :         }
   61381           0 :         PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   61382           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   61383           0 :                 PyErr_NoMemory();
   61384           0 :                 return -1;
   61385             :         }
   61386           0 :         object->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   61387           0 :         return 0;
   61388             : }
   61389             : 
   61390           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names(PyObject *obj, void *closure)
   61391             : {
   61392           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61393           0 :         PyObject *py_dns_names;
   61394           0 :         if (object->out.dns_names == NULL) {
   61395           0 :                 Py_RETURN_NONE;
   61396             :         }
   61397           0 :         py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, object->out.dns_names, object->out.dns_names);
   61398           0 :         return py_dns_names;
   61399             : }
   61400             : 
   61401           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   61402             : {
   61403           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61404           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dns_names));
   61405           0 :         if (value == NULL) {
   61406           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dns_names");
   61407           0 :                 return -1;
   61408             :         }
   61409           0 :         object->out.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dns_names);
   61410           0 :         if (object->out.dns_names == NULL) {
   61411           0 :                 PyErr_NoMemory();
   61412           0 :                 return -1;
   61413             :         }
   61414           0 :         PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   61415           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   61416           0 :                 PyErr_NoMemory();
   61417           0 :                 return -1;
   61418             :         }
   61419           0 :         object->out.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   61420           0 :         return 0;
   61421             : }
   61422             : 
   61423           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_get_result(PyObject *obj, void *closure)
   61424             : {
   61425           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61426           0 :         PyObject *py_result;
   61427           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   61428           0 :         return py_result;
   61429             : }
   61430             : 
   61431           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
   61432             : {
   61433           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61434           0 :         if (value == NULL) {
   61435           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   61436           0 :                 return -1;
   61437             :         }
   61438           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   61439           0 :         return 0;
   61440             : }
   61441             : 
   61442             : static PyGetSetDef py_netr_DsrUpdateReadOnlyServerDnsRecords_getsetters[] = {
   61443             :         {
   61444             :                 .name = discard_const_p(char, "in_server_name"),
   61445             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_server_name,
   61446             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_server_name,
   61447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   61448             :         },
   61449             :         {
   61450             :                 .name = discard_const_p(char, "in_computer_name"),
   61451             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_computer_name,
   61452             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_computer_name,
   61453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   61454             :         },
   61455             :         {
   61456             :                 .name = discard_const_p(char, "in_credential"),
   61457             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_credential,
   61458             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_credential,
   61459             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   61460             :         },
   61461             :         {
   61462             :                 .name = discard_const_p(char, "out_return_authenticator"),
   61463             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_return_authenticator,
   61464             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_return_authenticator,
   61465             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   61466             :         },
   61467             :         {
   61468             :                 .name = discard_const_p(char, "in_site_name"),
   61469             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name,
   61470             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name,
   61471             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   61472             :         },
   61473             :         {
   61474             :                 .name = discard_const_p(char, "in_dns_ttl"),
   61475             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl,
   61476             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl,
   61477             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   61478             :         },
   61479             :         {
   61480             :                 .name = discard_const_p(char, "in_dns_names"),
   61481             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names,
   61482             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names,
   61483             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   61484             :         },
   61485             :         {
   61486             :                 .name = discard_const_p(char, "out_dns_names"),
   61487             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names,
   61488             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names,
   61489             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   61490             :         },
   61491             :         {
   61492             :                 .name = discard_const_p(char, "result"),
   61493             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_get_result,
   61494             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_set_result,
   61495             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   61496             :         },
   61497             :         { .name = NULL }
   61498             : };
   61499             : 
   61500           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   61501             : {
   61502           0 :         PyObject *self = pytalloc_new(struct netr_DsrUpdateReadOnlyServerDnsRecords, type);
   61503           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *_self = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(self);
   61504           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   61505           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   61506           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   61507           0 :         _self->in.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   61508           0 :         _self->out.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   61509           0 :         return self;
   61510             : }
   61511             : 
   61512           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   61513             : {
   61514             : 
   61515             : 
   61516           0 :         return PyLong_FromLong(48);
   61517             : }
   61518             : 
   61519           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   61520             : {
   61521           0 :         const struct ndr_interface_call *call = NULL;
   61522           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61523           0 :         PyObject *ret = NULL;
   61524           0 :         struct ndr_push *push = NULL;
   61525           0 :         DATA_BLOB blob;
   61526           0 :         enum ndr_err_code err;
   61527             : 
   61528           0 :         if (ndr_table_netlogon.num_calls < 49) {
   61529           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack");
   61530           0 :                 return NULL;
   61531             :         }
   61532           0 :         call = &ndr_table_netlogon.calls[48];
   61533             : 
   61534           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   61535           0 :         if (push == NULL) {
   61536           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   61537           0 :                 return NULL;
   61538             :         }
   61539             : 
   61540           0 :         push->flags |= ndr_push_flags;
   61541             : 
   61542           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   61543           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   61544           0 :                 TALLOC_FREE(push);
   61545           0 :                 PyErr_SetNdrError(err);
   61546           0 :                 return NULL;
   61547             :         }
   61548           0 :         blob = ndr_push_blob(push);
   61549           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   61550           0 :         TALLOC_FREE(push);
   61551           0 :         return ret;
   61552             : }
   61553             : 
   61554           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61555             : {
   61556           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   61557           0 :         PyObject *bigendian_obj = NULL;
   61558           0 :         PyObject *ndr64_obj = NULL;
   61559           0 :         libndr_flags ndr_push_flags = 0;
   61560             : 
   61561           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   61562             :                 discard_const_p(char *, kwnames),
   61563             :                 &bigendian_obj,
   61564             :                 &ndr64_obj)) {
   61565           0 :                 return NULL;
   61566             :         }
   61567             : 
   61568           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61569           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   61570             :         }
   61571           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61572           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   61573             :         }
   61574             : 
   61575           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   61576             : }
   61577             : 
   61578           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61579             : {
   61580           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   61581           0 :         PyObject *bigendian_obj = NULL;
   61582           0 :         PyObject *ndr64_obj = NULL;
   61583           0 :         libndr_flags ndr_push_flags = 0;
   61584             : 
   61585           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   61586             :                 discard_const_p(char *, kwnames),
   61587             :                 &bigendian_obj,
   61588             :                 &ndr64_obj)) {
   61589           0 :                 return NULL;
   61590             :         }
   61591             : 
   61592           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61593           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   61594             :         }
   61595           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61596           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   61597             :         }
   61598             : 
   61599           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   61600             : }
   61601             : 
   61602           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   61603             : {
   61604           0 :         const struct ndr_interface_call *call = NULL;
   61605           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61606           0 :         struct ndr_pull *pull = NULL;
   61607           0 :         enum ndr_err_code err;
   61608             : 
   61609           0 :         if (ndr_table_netlogon.num_calls < 49) {
   61610           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack");
   61611           0 :                 return NULL;
   61612             :         }
   61613           0 :         call = &ndr_table_netlogon.calls[48];
   61614             : 
   61615           0 :         pull = ndr_pull_init_blob(blob, object);
   61616           0 :         if (pull == NULL) {
   61617           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   61618           0 :                 return NULL;
   61619             :         }
   61620             : 
   61621           0 :         pull->flags |= ndr_pull_flags;
   61622             : 
   61623           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   61624           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   61625           0 :                 TALLOC_FREE(pull);
   61626           0 :                 PyErr_SetNdrError(err);
   61627           0 :                 return NULL;
   61628             :         }
   61629           0 :         if (!allow_remaining) {
   61630           0 :                 uint32_t highest_ofs;
   61631             : 
   61632           0 :                 if (pull->offset > pull->relative_highest_offset) {
   61633           0 :                         highest_ofs = pull->offset;
   61634             :                 } else {
   61635           0 :                         highest_ofs = pull->relative_highest_offset;
   61636             :                 }
   61637           0 :                 if (highest_ofs < pull->data_size) {
   61638           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   61639             :                                 "not all bytes consumed ofs[%u] size[%u]",
   61640             :                                 highest_ofs, pull->data_size);
   61641           0 :                         TALLOC_FREE(pull);
   61642           0 :                         PyErr_SetNdrError(err);
   61643           0 :                         return NULL;
   61644             :                 }
   61645             :         }
   61646             : 
   61647           0 :         TALLOC_FREE(pull);
   61648           0 :         Py_RETURN_NONE;
   61649             : }
   61650             : 
   61651           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61652             : {
   61653           0 :         DATA_BLOB blob;
   61654           0 :         Py_ssize_t blob_length = 0;
   61655           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   61656           0 :         PyObject *bigendian_obj = NULL;
   61657           0 :         PyObject *ndr64_obj = NULL;
   61658           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   61659           0 :         PyObject *allow_remaining_obj = NULL;
   61660           0 :         bool allow_remaining = false;
   61661             : 
   61662           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   61663             :                 discard_const_p(char *, kwnames),
   61664             :                 &blob.data, &blob_length,
   61665             :                 &bigendian_obj,
   61666             :                 &ndr64_obj,
   61667             :                 &allow_remaining_obj)) {
   61668           0 :                 return NULL;
   61669             :         }
   61670           0 :         blob.length = blob_length;
   61671             : 
   61672           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61673           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   61674             :         }
   61675           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61676           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   61677             :         }
   61678             : 
   61679           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   61680           0 :                 allow_remaining = true;
   61681             :         }
   61682             : 
   61683           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   61684             : }
   61685             : 
   61686           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61687             : {
   61688           0 :         DATA_BLOB blob;
   61689           0 :         Py_ssize_t blob_length = 0;
   61690           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   61691           0 :         PyObject *bigendian_obj = NULL;
   61692           0 :         PyObject *ndr64_obj = NULL;
   61693           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   61694           0 :         PyObject *allow_remaining_obj = NULL;
   61695           0 :         bool allow_remaining = false;
   61696             : 
   61697           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   61698             :                 discard_const_p(char *, kwnames),
   61699             :                 &blob.data, &blob_length,
   61700             :                 &bigendian_obj,
   61701             :                 &ndr64_obj,
   61702             :                 &allow_remaining_obj)) {
   61703           0 :                 return NULL;
   61704             :         }
   61705           0 :         blob.length = blob_length;
   61706             : 
   61707           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61708           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   61709             :         }
   61710           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61711           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   61712             :         }
   61713             : 
   61714           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   61715           0 :                 allow_remaining = true;
   61716             :         }
   61717             : 
   61718           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   61719             : }
   61720             : 
   61721           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   61722             : {
   61723           0 :         const struct ndr_interface_call *call = NULL;
   61724           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61725           0 :         PyObject *ret;
   61726           0 :         char *retstr;
   61727             : 
   61728           0 :         if (ndr_table_netlogon.num_calls < 49) {
   61729           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print");
   61730           0 :                 return NULL;
   61731             :         }
   61732           0 :         call = &ndr_table_netlogon.calls[48];
   61733             : 
   61734           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   61735           0 :         ret = PyUnicode_FromString(retstr);
   61736           0 :         TALLOC_FREE(retstr);
   61737             : 
   61738           0 :         return ret;
   61739             : }
   61740             : 
   61741           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   61742             : {
   61743           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "netr_DsrUpdateReadOnlyServerDnsRecords_in", NDR_IN);
   61744             : }
   61745             : 
   61746           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   61747             : {
   61748           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "netr_DsrUpdateReadOnlyServerDnsRecords_out", NDR_OUT);
   61749             : }
   61750             : 
   61751             : static PyMethodDef py_netr_DsrUpdateReadOnlyServerDnsRecords_methods[] = {
   61752             :         { "opnum", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
   61753             :                 "netlogon.netr_DsrUpdateReadOnlyServerDnsRecords.opnum() -> 48 (0x30) " },
   61754             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   61755             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   61756             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   61757             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   61758             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   61759             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   61760             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   61761             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   61762             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   61763             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   61764             :         { NULL, NULL, 0, NULL }
   61765             : };
   61766             : 
   61767             : 
   61768             : static PyTypeObject netr_DsrUpdateReadOnlyServerDnsRecords_Type = {
   61769             :         PyVarObject_HEAD_INIT(NULL, 0)
   61770             :         .tp_name = "netlogon.netr_DsrUpdateReadOnlyServerDnsRecords",
   61771             :         .tp_getset = py_netr_DsrUpdateReadOnlyServerDnsRecords_getsetters,
   61772             :         .tp_methods = py_netr_DsrUpdateReadOnlyServerDnsRecords_methods,
   61773             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   61774             :         .tp_new = py_netr_DsrUpdateReadOnlyServerDnsRecords_new,
   61775             : };
   61776             : 
   61777           0 : static bool pack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
   61778             : {
   61779           0 :         PyObject *py_server_name;
   61780           0 :         PyObject *py_computer_name;
   61781           0 :         PyObject *py_credential;
   61782           0 :         PyObject *py_site_name;
   61783           0 :         PyObject *py_dns_ttl;
   61784           0 :         PyObject *py_dns_names;
   61785           0 :         const char *kwnames[] = {
   61786             :                 "server_name", "computer_name", "credential", "site_name", "dns_ttl", "dns_names", NULL
   61787             :         };
   61788             : 
   61789           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_DsrUpdateReadOnlyServerDnsRecords", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_site_name, &py_dns_ttl, &py_dns_names)) {
   61790           0 :                 return false;
   61791             :         }
   61792             : 
   61793           0 :         if (py_server_name == NULL) {
   61794           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   61795           0 :                 return false;
   61796             :         }
   61797           0 :         if (py_server_name == Py_None) {
   61798           0 :                 r->in.server_name = NULL;
   61799             :         } else {
   61800           0 :                 r->in.server_name = NULL;
   61801             :                 {
   61802           0 :                         const char *test_str;
   61803           0 :                         const char *talloc_str;
   61804           0 :                         PyObject *unicode = NULL;
   61805           0 :                         if (PyUnicode_Check(py_server_name)) {
   61806           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   61807           0 :                                 if (unicode == NULL) {
   61808           0 :                                         PyErr_NoMemory();
   61809           0 :                                         return false;
   61810             :                                 }
   61811           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   61812           0 :                         } else if (PyBytes_Check(py_server_name)) {
   61813           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   61814             :                         } else {
   61815           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   61816           0 :                                 return false;
   61817             :                         }
   61818           0 :                         talloc_str = talloc_strdup(r, test_str);
   61819           0 :                         if (unicode != NULL) {
   61820           0 :                                 Py_DECREF(unicode);
   61821             :                         }
   61822           0 :                         if (talloc_str == NULL) {
   61823           0 :                                 PyErr_NoMemory();
   61824           0 :                                 return false;
   61825             :                         }
   61826           0 :                         r->in.server_name = talloc_str;
   61827             :                 }
   61828             :         }
   61829           0 :         if (py_computer_name == NULL) {
   61830           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   61831           0 :                 return false;
   61832             :         }
   61833           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   61834           0 :         if (r->in.computer_name == NULL) {
   61835           0 :                 PyErr_NoMemory();
   61836           0 :                 return false;
   61837             :         }
   61838             :         {
   61839           0 :                 const char *test_str;
   61840           0 :                 const char *talloc_str;
   61841           0 :                 PyObject *unicode = NULL;
   61842           0 :                 if (PyUnicode_Check(py_computer_name)) {
   61843           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   61844           0 :                         if (unicode == NULL) {
   61845           0 :                                 PyErr_NoMemory();
   61846           0 :                                 return false;
   61847             :                         }
   61848           0 :                         test_str = PyBytes_AS_STRING(unicode);
   61849           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   61850           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   61851             :                 } else {
   61852           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   61853           0 :                         return false;
   61854             :                 }
   61855           0 :                 talloc_str = talloc_strdup(r, test_str);
   61856           0 :                 if (unicode != NULL) {
   61857           0 :                         Py_DECREF(unicode);
   61858             :                 }
   61859           0 :                 if (talloc_str == NULL) {
   61860           0 :                         PyErr_NoMemory();
   61861           0 :                         return false;
   61862             :                 }
   61863           0 :                 r->in.computer_name = talloc_str;
   61864             :         }
   61865           0 :         if (py_credential == NULL) {
   61866           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   61867           0 :                 return false;
   61868             :         }
   61869           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   61870           0 :         if (r->in.credential == NULL) {
   61871           0 :                 PyErr_NoMemory();
   61872           0 :                 return false;
   61873             :         }
   61874           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   61875           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   61876           0 :                 PyErr_NoMemory();
   61877           0 :                 return false;
   61878             :         }
   61879           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   61880           0 :         if (py_site_name == NULL) {
   61881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   61882           0 :                 return false;
   61883             :         }
   61884           0 :         if (py_site_name == Py_None) {
   61885           0 :                 r->in.site_name = NULL;
   61886             :         } else {
   61887           0 :                 r->in.site_name = NULL;
   61888             :                 {
   61889           0 :                         const char *test_str;
   61890           0 :                         const char *talloc_str;
   61891           0 :                         PyObject *unicode = NULL;
   61892           0 :                         if (PyUnicode_Check(py_site_name)) {
   61893           0 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   61894           0 :                                 if (unicode == NULL) {
   61895           0 :                                         PyErr_NoMemory();
   61896           0 :                                         return false;
   61897             :                                 }
   61898           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   61899           0 :                         } else if (PyBytes_Check(py_site_name)) {
   61900           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   61901             :                         } else {
   61902           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   61903           0 :                                 return false;
   61904             :                         }
   61905           0 :                         talloc_str = talloc_strdup(r, test_str);
   61906           0 :                         if (unicode != NULL) {
   61907           0 :                                 Py_DECREF(unicode);
   61908             :                         }
   61909           0 :                         if (talloc_str == NULL) {
   61910           0 :                                 PyErr_NoMemory();
   61911           0 :                                 return false;
   61912             :                         }
   61913           0 :                         r->in.site_name = talloc_str;
   61914             :                 }
   61915             :         }
   61916           0 :         if (py_dns_ttl == NULL) {
   61917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_ttl");
   61918           0 :                 return false;
   61919             :         }
   61920             :         {
   61921           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dns_ttl));
   61922           0 :                 if (PyLong_Check(py_dns_ttl)) {
   61923           0 :                         unsigned long long test_var;
   61924           0 :                         test_var = PyLong_AsUnsignedLongLong(py_dns_ttl);
   61925           0 :                         if (PyErr_Occurred() != NULL) {
   61926           0 :                                 return false;
   61927             :                         }
   61928           0 :                         if (test_var > uint_max) {
   61929           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   61930             :                                   PyLong_Type.tp_name, uint_max, test_var);
   61931           0 :                                 return false;
   61932             :                         }
   61933           0 :                         r->in.dns_ttl = test_var;
   61934             :                 } else {
   61935           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   61936             :                           PyLong_Type.tp_name);
   61937           0 :                         return false;
   61938             :                 }
   61939             :         }
   61940           0 :         if (py_dns_names == NULL) {
   61941           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_names");
   61942           0 :                 return false;
   61943             :         }
   61944           0 :         r->in.dns_names = talloc_ptrtype(r, r->in.dns_names);
   61945           0 :         if (r->in.dns_names == NULL) {
   61946           0 :                 PyErr_NoMemory();
   61947           0 :                 return false;
   61948             :         }
   61949           0 :         PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, py_dns_names, return false;);
   61950           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_dns_names)) == NULL) {
   61951           0 :                 PyErr_NoMemory();
   61952           0 :                 return false;
   61953             :         }
   61954           0 :         r->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_dns_names);
   61955           0 :         return true;
   61956             : }
   61957             : 
   61958           0 : static PyObject *unpack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_out(struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
   61959             : {
   61960           0 :         PyObject *result;
   61961           0 :         PyObject *py_return_authenticator;
   61962           0 :         PyObject *py_dns_names;
   61963           0 :         result = PyTuple_New(2);
   61964           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   61965           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   61966           0 :         py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, r->out.dns_names, r->out.dns_names);
   61967           0 :         PyTuple_SetItem(result, 1, py_dns_names);
   61968           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   61969           0 :                 PyErr_SetNTSTATUS(r->out.result);
   61970           0 :                 return NULL;
   61971             :         }
   61972             : 
   61973           0 :         return result;
   61974             : }
   61975             : 
   61976             : const struct PyNdrRpcMethodDef py_ndr_netlogon_methods[] = {
   61977             :         { "netr_LogonUasLogon", "S.netr_LogonUasLogon(server_name, account_name, workstation) -> info", (py_dcerpc_call_fn)dcerpc_netr_LogonUasLogon_r, (py_data_pack_fn)pack_py_netr_LogonUasLogon_args_in, (py_data_unpack_fn)unpack_py_netr_LogonUasLogon_args_out, 0, &ndr_table_netlogon },
   61978             :         { "netr_LogonUasLogoff", "S.netr_LogonUasLogoff(server_name, account_name, workstation) -> info", (py_dcerpc_call_fn)dcerpc_netr_LogonUasLogoff_r, (py_data_pack_fn)pack_py_netr_LogonUasLogoff_args_in, (py_data_unpack_fn)unpack_py_netr_LogonUasLogoff_args_out, 1, &ndr_table_netlogon },
   61979             :         { "netr_LogonSamLogon", "S.netr_LogonSamLogon(server_name, computer_name, credential, return_authenticator, logon_level, logon, validation_level) -> (return_authenticator, validation, authoritative)", (py_dcerpc_call_fn)dcerpc_netr_LogonSamLogon_r, (py_data_pack_fn)pack_py_netr_LogonSamLogon_args_in, (py_data_unpack_fn)unpack_py_netr_LogonSamLogon_args_out, 2, &ndr_table_netlogon },
   61980             :         { "netr_LogonSamLogoff", "S.netr_LogonSamLogoff(server_name, computer_name, credential, return_authenticator, logon_level, logon) -> return_authenticator", (py_dcerpc_call_fn)dcerpc_netr_LogonSamLogoff_r, (py_data_pack_fn)pack_py_netr_LogonSamLogoff_args_in, (py_data_unpack_fn)unpack_py_netr_LogonSamLogoff_args_out, 3, &ndr_table_netlogon },
   61981             :         { "netr_ServerReqChallenge", "S.netr_ServerReqChallenge(server_name, computer_name, credentials) -> return_credentials", (py_dcerpc_call_fn)dcerpc_netr_ServerReqChallenge_r, (py_data_pack_fn)pack_py_netr_ServerReqChallenge_args_in, (py_data_unpack_fn)unpack_py_netr_ServerReqChallenge_args_out, 4, &ndr_table_netlogon },
   61982             :         { "netr_ServerAuthenticate", "S.netr_ServerAuthenticate(server_name, account_name, secure_channel_type, computer_name, credentials) -> return_credentials", (py_dcerpc_call_fn)dcerpc_netr_ServerAuthenticate_r, (py_data_pack_fn)pack_py_netr_ServerAuthenticate_args_in, (py_data_unpack_fn)unpack_py_netr_ServerAuthenticate_args_out, 5, &ndr_table_netlogon },
   61983             :         { "netr_ServerPasswordSet", "S.netr_ServerPasswordSet(server_name, account_name, secure_channel_type, computer_name, credential, new_password) -> return_authenticator", (py_dcerpc_call_fn)dcerpc_netr_ServerPasswordSet_r, (py_data_pack_fn)pack_py_netr_ServerPasswordSet_args_in, (py_data_unpack_fn)unpack_py_netr_ServerPasswordSet_args_out, 6, &ndr_table_netlogon },
   61984             :         { "netr_DatabaseDeltas", "S.netr_DatabaseDeltas(logon_server, computername, credential, return_authenticator, database_id, sequence_num, preferredmaximumlength) -> (return_authenticator, sequence_num, delta_enum_array)", (py_dcerpc_call_fn)dcerpc_netr_DatabaseDeltas_r, (py_data_pack_fn)pack_py_netr_DatabaseDeltas_args_in, (py_data_unpack_fn)unpack_py_netr_DatabaseDeltas_args_out, 7, &ndr_table_netlogon },
   61985             :         { "netr_DatabaseSync", "S.netr_DatabaseSync(logon_server, computername, credential, return_authenticator, database_id, sync_context, preferredmaximumlength) -> (return_authenticator, sync_context, delta_enum_array)", (py_dcerpc_call_fn)dcerpc_netr_DatabaseSync_r, (py_data_pack_fn)pack_py_netr_DatabaseSync_args_in, (py_data_unpack_fn)unpack_py_netr_DatabaseSync_args_out, 8, &ndr_table_netlogon },
   61986             :         { "netr_AccountDeltas", "S.netr_AccountDeltas(logon_server, computername, credential, return_authenticator, uas, count, level, buffersize) -> (return_authenticator, buffer, count_returned, total_entries, recordid)", (py_dcerpc_call_fn)dcerpc_netr_AccountDeltas_r, (py_data_pack_fn)pack_py_netr_AccountDeltas_args_in, (py_data_unpack_fn)unpack_py_netr_AccountDeltas_args_out, 9, &ndr_table_netlogon },
   61987             :         { "netr_AccountSync", "S.netr_AccountSync(logon_server, computername, credential, return_authenticator, reference, level, buffersize, recordid) -> (return_authenticator, buffer, count_returned, total_entries, next_reference, recordid)", (py_dcerpc_call_fn)dcerpc_netr_AccountSync_r, (py_data_pack_fn)pack_py_netr_AccountSync_args_in, (py_data_unpack_fn)unpack_py_netr_AccountSync_args_out, 10, &ndr_table_netlogon },
   61988             :         { "netr_GetDcName", "S.netr_GetDcName(logon_server, domainname) -> dcname", (py_dcerpc_call_fn)dcerpc_netr_GetDcName_r, (py_data_pack_fn)pack_py_netr_GetDcName_args_in, (py_data_unpack_fn)unpack_py_netr_GetDcName_args_out, 11, &ndr_table_netlogon },
   61989             :         { "netr_LogonControl", "S.netr_LogonControl(logon_server, function_code, level) -> query", (py_dcerpc_call_fn)dcerpc_netr_LogonControl_r, (py_data_pack_fn)pack_py_netr_LogonControl_args_in, (py_data_unpack_fn)unpack_py_netr_LogonControl_args_out, 12, &ndr_table_netlogon },
   61990             :         { "netr_GetAnyDCName", "S.netr_GetAnyDCName(logon_server, domainname) -> dcname", (py_dcerpc_call_fn)dcerpc_netr_GetAnyDCName_r, (py_data_pack_fn)pack_py_netr_GetAnyDCName_args_in, (py_data_unpack_fn)unpack_py_netr_GetAnyDCName_args_out, 13, &ndr_table_netlogon },
   61991             :         { "netr_LogonControl2", "S.netr_LogonControl2(logon_server, function_code, level, data) -> query", (py_dcerpc_call_fn)dcerpc_netr_LogonControl2_r, (py_data_pack_fn)pack_py_netr_LogonControl2_args_in, (py_data_unpack_fn)unpack_py_netr_LogonControl2_args_out, 14, &ndr_table_netlogon },
   61992             :         { "netr_ServerAuthenticate2", "S.netr_ServerAuthenticate2(server_name, account_name, secure_channel_type, computer_name, credentials, negotiate_flags) -> (return_credentials, negotiate_flags)", (py_dcerpc_call_fn)dcerpc_netr_ServerAuthenticate2_r, (py_data_pack_fn)pack_py_netr_ServerAuthenticate2_args_in, (py_data_unpack_fn)unpack_py_netr_ServerAuthenticate2_args_out, 15, &ndr_table_netlogon },
   61993             :         { "netr_DatabaseSync2", "S.netr_DatabaseSync2(logon_server, computername, credential, return_authenticator, database_id, restart_state, sync_context, preferredmaximumlength) -> (return_authenticator, sync_context, delta_enum_array)", (py_dcerpc_call_fn)dcerpc_netr_DatabaseSync2_r, (py_data_pack_fn)pack_py_netr_DatabaseSync2_args_in, (py_data_unpack_fn)unpack_py_netr_DatabaseSync2_args_out, 16, &ndr_table_netlogon },
   61994             :         { "netr_DatabaseRedo", "S.netr_DatabaseRedo(logon_server, computername, credential, return_authenticator, change_log_entry, change_log_entry_size) -> (return_authenticator, delta_enum_array)", (py_dcerpc_call_fn)dcerpc_netr_DatabaseRedo_r, (py_data_pack_fn)pack_py_netr_DatabaseRedo_args_in, (py_data_unpack_fn)unpack_py_netr_DatabaseRedo_args_out, 17, &ndr_table_netlogon },
   61995             :         { "netr_LogonControl2Ex", "S.netr_LogonControl2Ex(logon_server, function_code, level, data) -> query", (py_dcerpc_call_fn)dcerpc_netr_LogonControl2Ex_r, (py_data_pack_fn)pack_py_netr_LogonControl2Ex_args_in, (py_data_unpack_fn)unpack_py_netr_LogonControl2Ex_args_out, 18, &ndr_table_netlogon },
   61996             :         { "netr_NetrEnumerateTrustedDomains", "S.netr_NetrEnumerateTrustedDomains(server_name) -> trusted_domains_blob", (py_dcerpc_call_fn)dcerpc_netr_NetrEnumerateTrustedDomains_r, (py_data_pack_fn)pack_py_netr_NetrEnumerateTrustedDomains_args_in, (py_data_unpack_fn)unpack_py_netr_NetrEnumerateTrustedDomains_args_out, 19, &ndr_table_netlogon },
   61997             :         { "netr_DsRGetDCName", "S.netr_DsRGetDCName(server_unc, domain_name, domain_guid, site_guid, flags) -> info", (py_dcerpc_call_fn)dcerpc_netr_DsRGetDCName_r, (py_data_pack_fn)pack_py_netr_DsRGetDCName_args_in, (py_data_unpack_fn)unpack_py_netr_DsRGetDCName_args_out, 20, &ndr_table_netlogon },
   61998             :         { "netr_LogonGetCapabilities", "S.netr_LogonGetCapabilities(server_name, computer_name, credential, return_authenticator, query_level) -> (return_authenticator, capabilities)", (py_dcerpc_call_fn)dcerpc_netr_LogonGetCapabilities_r, (py_data_pack_fn)pack_py_netr_LogonGetCapabilities_args_in, (py_data_unpack_fn)unpack_py_netr_LogonGetCapabilities_args_out, 21, &ndr_table_netlogon },
   61999             :         { "netr_LogonGetTrustRid", "S.netr_LogonGetTrustRid(server_name, domain_name) -> rid", (py_dcerpc_call_fn)dcerpc_netr_LogonGetTrustRid_r, (py_data_pack_fn)pack_py_netr_LogonGetTrustRid_args_in, (py_data_unpack_fn)unpack_py_netr_LogonGetTrustRid_args_out, 23, &ndr_table_netlogon },
   62000             :         { "netr_ServerAuthenticate3", "S.netr_ServerAuthenticate3(server_name, account_name, secure_channel_type, computer_name, credentials, negotiate_flags) -> (return_credentials, negotiate_flags, rid)", (py_dcerpc_call_fn)dcerpc_netr_ServerAuthenticate3_r, (py_data_pack_fn)pack_py_netr_ServerAuthenticate3_args_in, (py_data_unpack_fn)unpack_py_netr_ServerAuthenticate3_args_out, 26, &ndr_table_netlogon },
   62001             :         { "netr_DsRGetDCNameEx", "S.netr_DsRGetDCNameEx(server_unc, domain_name, domain_guid, site_name, flags) -> info", (py_dcerpc_call_fn)dcerpc_netr_DsRGetDCNameEx_r, (py_data_pack_fn)pack_py_netr_DsRGetDCNameEx_args_in, (py_data_unpack_fn)unpack_py_netr_DsRGetDCNameEx_args_out, 27, &ndr_table_netlogon },
   62002             :         { "netr_DsRGetSiteName", "S.netr_DsRGetSiteName(computer_name) -> site", (py_dcerpc_call_fn)dcerpc_netr_DsRGetSiteName_r, (py_data_pack_fn)pack_py_netr_DsRGetSiteName_args_in, (py_data_unpack_fn)unpack_py_netr_DsRGetSiteName_args_out, 28, &ndr_table_netlogon },
   62003             :         { "netr_LogonGetDomainInfo", "S.netr_LogonGetDomainInfo(server_name, computer_name, credential, return_authenticator, level, query) -> (return_authenticator, info)", (py_dcerpc_call_fn)dcerpc_netr_LogonGetDomainInfo_r, (py_data_pack_fn)pack_py_netr_LogonGetDomainInfo_args_in, (py_data_unpack_fn)unpack_py_netr_LogonGetDomainInfo_args_out, 29, &ndr_table_netlogon },
   62004             :         { "netr_ServerPasswordSet2", "S.netr_ServerPasswordSet2(server_name, account_name, secure_channel_type, computer_name, credential, new_password) -> return_authenticator", (py_dcerpc_call_fn)dcerpc_netr_ServerPasswordSet2_r, (py_data_pack_fn)pack_py_netr_ServerPasswordSet2_args_in, (py_data_unpack_fn)unpack_py_netr_ServerPasswordSet2_args_out, 30, &ndr_table_netlogon },
   62005             :         { "netr_ServerPasswordGet", "S.netr_ServerPasswordGet(server_name, account_name, secure_channel_type, computer_name, credential) -> (return_authenticator, password)", (py_dcerpc_call_fn)dcerpc_netr_ServerPasswordGet_r, (py_data_pack_fn)pack_py_netr_ServerPasswordGet_args_in, (py_data_unpack_fn)unpack_py_netr_ServerPasswordGet_args_out, 31, &ndr_table_netlogon },
   62006             :         { "netr_NetrLogonSendToSam", "S.netr_NetrLogonSendToSam(server_name, computer_name, credential, opaque_buffer) -> return_authenticator", (py_dcerpc_call_fn)dcerpc_netr_NetrLogonSendToSam_r, (py_data_pack_fn)pack_py_netr_NetrLogonSendToSam_args_in, (py_data_unpack_fn)unpack_py_netr_NetrLogonSendToSam_args_out, 32, &ndr_table_netlogon },
   62007             :         { "netr_DsRAddressToSitenamesW", "S.netr_DsRAddressToSitenamesW(server_name, addresses) -> ctr", (py_dcerpc_call_fn)dcerpc_netr_DsRAddressToSitenamesW_r, (py_data_pack_fn)pack_py_netr_DsRAddressToSitenamesW_args_in, (py_data_unpack_fn)unpack_py_netr_DsRAddressToSitenamesW_args_out, 33, &ndr_table_netlogon },
   62008             :         { "netr_DsRGetDCNameEx2", "S.netr_DsRGetDCNameEx2(server_unc, client_account, mask, domain_name, domain_guid, site_name, flags) -> info", (py_dcerpc_call_fn)dcerpc_netr_DsRGetDCNameEx2_r, (py_data_pack_fn)pack_py_netr_DsRGetDCNameEx2_args_in, (py_data_unpack_fn)unpack_py_netr_DsRGetDCNameEx2_args_out, 34, &ndr_table_netlogon },
   62009             :         { "netr_NetrEnumerateTrustedDomainsEx", "S.netr_NetrEnumerateTrustedDomainsEx(server_name) -> dom_trust_list", (py_dcerpc_call_fn)dcerpc_netr_NetrEnumerateTrustedDomainsEx_r, (py_data_pack_fn)pack_py_netr_NetrEnumerateTrustedDomainsEx_args_in, (py_data_unpack_fn)unpack_py_netr_NetrEnumerateTrustedDomainsEx_args_out, 36, &ndr_table_netlogon },
   62010             :         { "netr_DsRAddressToSitenamesExW", "S.netr_DsRAddressToSitenamesExW(server_name, addresses) -> ctr", (py_dcerpc_call_fn)dcerpc_netr_DsRAddressToSitenamesExW_r, (py_data_pack_fn)pack_py_netr_DsRAddressToSitenamesExW_args_in, (py_data_unpack_fn)unpack_py_netr_DsRAddressToSitenamesExW_args_out, 37, &ndr_table_netlogon },
   62011             :         { "netr_DsrGetDcSiteCoverageW", "S.netr_DsrGetDcSiteCoverageW(server_name) -> ctr", (py_dcerpc_call_fn)dcerpc_netr_DsrGetDcSiteCoverageW_r, (py_data_pack_fn)pack_py_netr_DsrGetDcSiteCoverageW_args_in, (py_data_unpack_fn)unpack_py_netr_DsrGetDcSiteCoverageW_args_out, 38, &ndr_table_netlogon },
   62012             :         { "netr_LogonSamLogonEx", "S.netr_LogonSamLogonEx(server_name, computer_name, logon_level, logon, validation_level, flags) -> (validation, authoritative, flags)", (py_dcerpc_call_fn)dcerpc_netr_LogonSamLogonEx_r, (py_data_pack_fn)pack_py_netr_LogonSamLogonEx_args_in, (py_data_unpack_fn)unpack_py_netr_LogonSamLogonEx_args_out, 39, &ndr_table_netlogon },
   62013             :         { "netr_DsrEnumerateDomainTrusts", "S.netr_DsrEnumerateDomainTrusts(server_name, trust_flags) -> trusts", (py_dcerpc_call_fn)dcerpc_netr_DsrEnumerateDomainTrusts_r, (py_data_pack_fn)pack_py_netr_DsrEnumerateDomainTrusts_args_in, (py_data_unpack_fn)unpack_py_netr_DsrEnumerateDomainTrusts_args_out, 40, &ndr_table_netlogon },
   62014             :         { "netr_DsrDeregisterDNSHostRecords", "S.netr_DsrDeregisterDNSHostRecords(server_name, domain, domain_guid, dsa_guid, dns_host) -> None", (py_dcerpc_call_fn)dcerpc_netr_DsrDeregisterDNSHostRecords_r, (py_data_pack_fn)pack_py_netr_DsrDeregisterDNSHostRecords_args_in, (py_data_unpack_fn)unpack_py_netr_DsrDeregisterDNSHostRecords_args_out, 41, &ndr_table_netlogon },
   62015             :         { "netr_ServerTrustPasswordsGet", "S.netr_ServerTrustPasswordsGet(server_name, account_name, secure_channel_type, computer_name, credential) -> (return_authenticator, new_owf_password, old_owf_password)", (py_dcerpc_call_fn)dcerpc_netr_ServerTrustPasswordsGet_r, (py_data_pack_fn)pack_py_netr_ServerTrustPasswordsGet_args_in, (py_data_unpack_fn)unpack_py_netr_ServerTrustPasswordsGet_args_out, 42, &ndr_table_netlogon },
   62016             :         { "netr_DsRGetForestTrustInformation", "S.netr_DsRGetForestTrustInformation(server_name, trusted_domain_name, flags) -> forest_trust_info", (py_dcerpc_call_fn)dcerpc_netr_DsRGetForestTrustInformation_r, (py_data_pack_fn)pack_py_netr_DsRGetForestTrustInformation_args_in, (py_data_unpack_fn)unpack_py_netr_DsRGetForestTrustInformation_args_out, 43, &ndr_table_netlogon },
   62017             :         { "netr_GetForestTrustInformation", "S.netr_GetForestTrustInformation(server_name, computer_name, credential, flags) -> (return_authenticator, forest_trust_info)", (py_dcerpc_call_fn)dcerpc_netr_GetForestTrustInformation_r, (py_data_pack_fn)pack_py_netr_GetForestTrustInformation_args_in, (py_data_unpack_fn)unpack_py_netr_GetForestTrustInformation_args_out, 44, &ndr_table_netlogon },
   62018             :         { "netr_LogonSamLogonWithFlags", "S.netr_LogonSamLogonWithFlags(server_name, computer_name, credential, return_authenticator, logon_level, logon, validation_level, flags) -> (return_authenticator, validation, authoritative, flags)", (py_dcerpc_call_fn)dcerpc_netr_LogonSamLogonWithFlags_r, (py_data_pack_fn)pack_py_netr_LogonSamLogonWithFlags_args_in, (py_data_unpack_fn)unpack_py_netr_LogonSamLogonWithFlags_args_out, 45, &ndr_table_netlogon },
   62019             :         { "netr_ServerGetTrustInfo", "S.netr_ServerGetTrustInfo(server_name, account_name, secure_channel_type, computer_name, credential) -> (return_authenticator, new_owf_password, old_owf_password, trust_info)", (py_dcerpc_call_fn)dcerpc_netr_ServerGetTrustInfo_r, (py_data_pack_fn)pack_py_netr_ServerGetTrustInfo_args_in, (py_data_unpack_fn)unpack_py_netr_ServerGetTrustInfo_args_out, 46, &ndr_table_netlogon },
   62020             :         { "netr_Unused47", "S.netr_Unused47() -> None", (py_dcerpc_call_fn)dcerpc_netr_Unused47_r, (py_data_pack_fn)pack_py_netr_Unused47_args_in, (py_data_unpack_fn)unpack_py_netr_Unused47_args_out, 47, &ndr_table_netlogon },
   62021             :         { "netr_DsrUpdateReadOnlyServerDnsRecords", "S.netr_DsrUpdateReadOnlyServerDnsRecords(server_name, computer_name, credential, site_name, dns_ttl, dns_names) -> (return_authenticator, dns_names)", (py_dcerpc_call_fn)dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords_r, (py_data_pack_fn)pack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_in, (py_data_unpack_fn)unpack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_out, 48, &ndr_table_netlogon },
   62022             :         {0}
   62023             : };
   62024             : 
   62025         599 : static PyObject *interface_netlogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   62026             : {
   62027         599 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_netlogon);
   62028             : }
   62029             : 
   62030             : static PyTypeObject netlogon_InterfaceType = {
   62031             :         PyVarObject_HEAD_INIT(NULL, 0)
   62032             :         .tp_name = "netlogon.netlogon",
   62033             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
   62034             :         .tp_doc = "netlogon(binding, lp_ctx=None, credentials=None) -> connection\n"
   62035             : "\n"
   62036             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
   62037             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
   62038             : "credentials should be a credentials.Credentials object.\n\n",
   62039             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   62040             :         .tp_new = interface_netlogon_new,
   62041             : };
   62042             : 
   62043          48 : static PyObject *syntax_netlogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   62044             : {
   62045          48 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_netlogon.syntax_id);
   62046             : }
   62047             : 
   62048             : static PyTypeObject netlogon_SyntaxType = {
   62049             :         PyVarObject_HEAD_INIT(NULL, 0)
   62050             :         .tp_name = "netlogon.netlogon_abstract_syntax",
   62051             :         .tp_doc = "netlogon_abstract_syntax()\n",
   62052             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   62053             :         .tp_new = syntax_netlogon_new,
   62054             : };
   62055             : 
   62056             : static PyMethodDef netlogon_methods[] = {
   62057             :         { NULL, NULL, 0, NULL }
   62058             : };
   62059             : 
   62060             : static struct PyModuleDef moduledef = {
   62061             :         PyModuleDef_HEAD_INIT,
   62062             :         .m_name = "netlogon",
   62063             :         .m_doc = "netlogon DCE/RPC",
   62064             :         .m_size = -1,
   62065             :         .m_methods = netlogon_methods,
   62066             : };
   62067        4095 : MODULE_INIT_FUNC(netlogon)
   62068             : {
   62069        4095 :         PyObject *m = NULL;
   62070        4095 :         PyObject *dep_samba_dcerpc_misc = NULL;
   62071        4095 :         PyObject *dep_samba_dcerpc_lsa = NULL;
   62072        4095 :         PyObject *dep_samba_dcerpc_samr = NULL;
   62073        4095 :         PyObject *dep_samba_dcerpc_security = NULL;
   62074        4095 :         PyObject *dep_samba_dcerpc_nbt = NULL;
   62075        4095 :         PyObject *dep_talloc = NULL;
   62076        4095 :         PyObject *dep_samba_dcerpc_base = NULL;
   62077             : 
   62078        4095 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   62079        4095 :         if (dep_samba_dcerpc_misc == NULL)
   62080           0 :                 goto out;
   62081             : 
   62082        4095 :         dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
   62083        4095 :         if (dep_samba_dcerpc_lsa == NULL)
   62084           0 :                 goto out;
   62085             : 
   62086        4095 :         dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
   62087        4095 :         if (dep_samba_dcerpc_samr == NULL)
   62088           0 :                 goto out;
   62089             : 
   62090        4095 :         dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
   62091        4095 :         if (dep_samba_dcerpc_security == NULL)
   62092           0 :                 goto out;
   62093             : 
   62094        4095 :         dep_samba_dcerpc_nbt = PyImport_ImportModule("samba.dcerpc.nbt");
   62095        4095 :         if (dep_samba_dcerpc_nbt == NULL)
   62096           0 :                 goto out;
   62097             : 
   62098        4095 :         dep_talloc = PyImport_ImportModule("talloc");
   62099        4095 :         if (dep_talloc == NULL)
   62100           0 :                 goto out;
   62101             : 
   62102        4095 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
   62103        4095 :         if (dep_samba_dcerpc_base == NULL)
   62104           0 :                 goto out;
   62105             : 
   62106        4095 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   62107        4095 :         if (BaseObject_Type == NULL)
   62108           0 :                 goto out;
   62109             : 
   62110        4095 :         lsa_String_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "String");
   62111        4095 :         if (lsa_String_Type == NULL)
   62112           0 :                 goto out;
   62113             : 
   62114        4095 :         samr_Password_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "Password");
   62115        4095 :         if (samr_Password_Type == NULL)
   62116           0 :                 goto out;
   62117             : 
   62118        4095 :         samr_RidWithAttributeArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "RidWithAttributeArray");
   62119        4095 :         if (samr_RidWithAttributeArray_Type == NULL)
   62120           0 :                 goto out;
   62121             : 
   62122        4095 :         lsa_StringLarge_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "StringLarge");
   62123        4095 :         if (lsa_StringLarge_Type == NULL)
   62124           0 :                 goto out;
   62125             : 
   62126        4095 :         dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
   62127        4095 :         if (dom_sid_Type == NULL)
   62128           0 :                 goto out;
   62129             : 
   62130        4095 :         samr_LogonHours_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "LogonHours");
   62131        4095 :         if (samr_LogonHours_Type == NULL)
   62132           0 :                 goto out;
   62133             : 
   62134        4095 :         lsa_BinaryString_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "BinaryString");
   62135        4095 :         if (lsa_BinaryString_Type == NULL)
   62136           0 :                 goto out;
   62137             : 
   62138        4095 :         sec_desc_buf_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "sec_desc_buf");
   62139        4095 :         if (sec_desc_buf_Type == NULL)
   62140           0 :                 goto out;
   62141             : 
   62142        4095 :         lsa_SidArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "SidArray");
   62143        4095 :         if (lsa_SidArray_Type == NULL)
   62144           0 :                 goto out;
   62145             : 
   62146        4095 :         GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
   62147        4095 :         if (GUID_Type == NULL)
   62148           0 :                 goto out;
   62149             : 
   62150        4095 :         lsa_ForestTrustInformation_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "ForestTrustInformation");
   62151        4095 :         if (lsa_ForestTrustInformation_Type == NULL)
   62152           0 :                 goto out;
   62153             : 
   62154        4095 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
   62155        4095 :         if (ClientConnection_Type == NULL)
   62156           0 :                 goto out;
   62157             : 
   62158        4095 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   62159        4095 :         if (ndr_syntax_id_Type == NULL)
   62160           0 :                 goto out;
   62161             : 
   62162        4095 :         netr_UasInfo_Type.tp_base = BaseObject_Type;
   62163        4095 :         netr_UasInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62164             : 
   62165        4095 :         netr_UasLogoffInfo_Type.tp_base = BaseObject_Type;
   62166        4095 :         netr_UasLogoffInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62167             : 
   62168        4095 :         netr_AcctLockStr_Type.tp_base = BaseObject_Type;
   62169        4095 :         netr_AcctLockStr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62170             : 
   62171        4095 :         netr_IdentityInfo_Type.tp_base = BaseObject_Type;
   62172        4095 :         netr_IdentityInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62173             : 
   62174        4095 :         netr_PasswordInfo_Type.tp_base = BaseObject_Type;
   62175        4095 :         netr_PasswordInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62176             : 
   62177        4095 :         netr_ChallengeResponse_Type.tp_base = BaseObject_Type;
   62178        4095 :         netr_ChallengeResponse_Type.tp_basicsize = pytalloc_BaseObject_size();
   62179             : 
   62180        4095 :         netr_NetworkInfo_Type.tp_base = BaseObject_Type;
   62181        4095 :         netr_NetworkInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62182             : 
   62183        4095 :         netr_GenericInfo_Type.tp_base = BaseObject_Type;
   62184        4095 :         netr_GenericInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62185             : 
   62186        4095 :         netr_LogonLevel_Type.tp_base = BaseObject_Type;
   62187        4095 :         netr_LogonLevel_Type.tp_basicsize = pytalloc_BaseObject_size();
   62188             : 
   62189        4095 :         netr_UserSessionKey_Type.tp_base = BaseObject_Type;
   62190        4095 :         netr_UserSessionKey_Type.tp_basicsize = pytalloc_BaseObject_size();
   62191             : 
   62192        4095 :         netr_LMSessionKey_Type.tp_base = BaseObject_Type;
   62193        4095 :         netr_LMSessionKey_Type.tp_basicsize = pytalloc_BaseObject_size();
   62194             : 
   62195        4095 :         netr_SamBaseInfo_Type.tp_base = BaseObject_Type;
   62196        4095 :         netr_SamBaseInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62197             : 
   62198        4095 :         netr_SamInfo2_Type.tp_base = BaseObject_Type;
   62199        4095 :         netr_SamInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62200             : 
   62201        4095 :         netr_SidAttr_Type.tp_base = BaseObject_Type;
   62202        4095 :         netr_SidAttr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62203             : 
   62204        4095 :         netr_SamInfo3_Type.tp_base = BaseObject_Type;
   62205        4095 :         netr_SamInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
   62206             : 
   62207        4095 :         netr_SamInfo6_Type.tp_base = BaseObject_Type;
   62208        4095 :         netr_SamInfo6_Type.tp_basicsize = pytalloc_BaseObject_size();
   62209             : 
   62210        4095 :         netr_PacInfo_Type.tp_base = BaseObject_Type;
   62211        4095 :         netr_PacInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62212             : 
   62213        4095 :         netr_GenericInfo2_Type.tp_base = BaseObject_Type;
   62214        4095 :         netr_GenericInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62215             : 
   62216        4095 :         netr_Validation_Type.tp_base = BaseObject_Type;
   62217        4095 :         netr_Validation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62218             : 
   62219        4095 :         netr_Credential_Type.tp_base = BaseObject_Type;
   62220        4095 :         netr_Credential_Type.tp_basicsize = pytalloc_BaseObject_size();
   62221             : 
   62222        4095 :         netlogon_server_pipe_state_Type.tp_base = BaseObject_Type;
   62223        4095 :         netlogon_server_pipe_state_Type.tp_basicsize = pytalloc_BaseObject_size();
   62224             : 
   62225        4095 :         netr_Authenticator_Type.tp_base = BaseObject_Type;
   62226        4095 :         netr_Authenticator_Type.tp_basicsize = pytalloc_BaseObject_size();
   62227             : 
   62228        4095 :         netr_DELTA_DELETE_USER_Type.tp_base = BaseObject_Type;
   62229        4095 :         netr_DELTA_DELETE_USER_Type.tp_basicsize = pytalloc_BaseObject_size();
   62230             : 
   62231        4095 :         netr_USER_KEY16_Type.tp_base = BaseObject_Type;
   62232        4095 :         netr_USER_KEY16_Type.tp_basicsize = pytalloc_BaseObject_size();
   62233             : 
   62234        4095 :         netr_PasswordHistory_Type.tp_base = BaseObject_Type;
   62235        4095 :         netr_PasswordHistory_Type.tp_basicsize = pytalloc_BaseObject_size();
   62236             : 
   62237        4095 :         netr_USER_KEYS2_Type.tp_base = BaseObject_Type;
   62238        4095 :         netr_USER_KEYS2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62239             : 
   62240        4095 :         netr_USER_KEY_UNION_Type.tp_base = BaseObject_Type;
   62241        4095 :         netr_USER_KEY_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62242             : 
   62243        4095 :         netr_USER_KEYS_Type.tp_base = BaseObject_Type;
   62244        4095 :         netr_USER_KEYS_Type.tp_basicsize = pytalloc_BaseObject_size();
   62245             : 
   62246        4095 :         netr_USER_PRIVATE_INFO_Type.tp_base = BaseObject_Type;
   62247        4095 :         netr_USER_PRIVATE_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
   62248             : 
   62249        4095 :         netr_DELTA_USER_Type.tp_base = BaseObject_Type;
   62250        4095 :         netr_DELTA_USER_Type.tp_basicsize = pytalloc_BaseObject_size();
   62251             : 
   62252        4095 :         netr_DELTA_DOMAIN_Type.tp_base = BaseObject_Type;
   62253        4095 :         netr_DELTA_DOMAIN_Type.tp_basicsize = pytalloc_BaseObject_size();
   62254             : 
   62255        4095 :         netr_DELTA_GROUP_Type.tp_base = BaseObject_Type;
   62256        4095 :         netr_DELTA_GROUP_Type.tp_basicsize = pytalloc_BaseObject_size();
   62257             : 
   62258        4095 :         netr_DELTA_RENAME_Type.tp_base = BaseObject_Type;
   62259        4095 :         netr_DELTA_RENAME_Type.tp_basicsize = pytalloc_BaseObject_size();
   62260             : 
   62261        4095 :         netr_DELTA_GROUP_MEMBER_Type.tp_base = BaseObject_Type;
   62262        4095 :         netr_DELTA_GROUP_MEMBER_Type.tp_basicsize = pytalloc_BaseObject_size();
   62263             : 
   62264        4095 :         netr_DELTA_ALIAS_Type.tp_base = BaseObject_Type;
   62265        4095 :         netr_DELTA_ALIAS_Type.tp_basicsize = pytalloc_BaseObject_size();
   62266             : 
   62267        4095 :         netr_DELTA_ALIAS_MEMBER_Type.tp_base = BaseObject_Type;
   62268        4095 :         netr_DELTA_ALIAS_MEMBER_Type.tp_basicsize = pytalloc_BaseObject_size();
   62269             : 
   62270        4095 :         netr_QUOTA_LIMITS_Type.tp_base = BaseObject_Type;
   62271        4095 :         netr_QUOTA_LIMITS_Type.tp_basicsize = pytalloc_BaseObject_size();
   62272             : 
   62273        4095 :         netr_DELTA_POLICY_Type.tp_base = BaseObject_Type;
   62274        4095 :         netr_DELTA_POLICY_Type.tp_basicsize = pytalloc_BaseObject_size();
   62275             : 
   62276        4095 :         netr_DELTA_TRUSTED_DOMAIN_Type.tp_base = BaseObject_Type;
   62277        4095 :         netr_DELTA_TRUSTED_DOMAIN_Type.tp_basicsize = pytalloc_BaseObject_size();
   62278             : 
   62279        4095 :         netr_DELTA_ACCOUNT_Type.tp_base = BaseObject_Type;
   62280        4095 :         netr_DELTA_ACCOUNT_Type.tp_basicsize = pytalloc_BaseObject_size();
   62281             : 
   62282        4095 :         netr_CIPHER_VALUE_Type.tp_base = BaseObject_Type;
   62283        4095 :         netr_CIPHER_VALUE_Type.tp_basicsize = pytalloc_BaseObject_size();
   62284             : 
   62285        4095 :         netr_DELTA_SECRET_Type.tp_base = BaseObject_Type;
   62286        4095 :         netr_DELTA_SECRET_Type.tp_basicsize = pytalloc_BaseObject_size();
   62287             : 
   62288        4095 :         netr_DELTA_UNION_Type.tp_base = BaseObject_Type;
   62289        4095 :         netr_DELTA_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62290             : 
   62291        4095 :         netr_DELTA_ID_UNION_Type.tp_base = BaseObject_Type;
   62292        4095 :         netr_DELTA_ID_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62293             : 
   62294        4095 :         netr_DELTA_ENUM_Type.tp_base = BaseObject_Type;
   62295        4095 :         netr_DELTA_ENUM_Type.tp_basicsize = pytalloc_BaseObject_size();
   62296             : 
   62297        4095 :         netr_DELTA_ENUM_ARRAY_Type.tp_base = BaseObject_Type;
   62298        4095 :         netr_DELTA_ENUM_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
   62299             : 
   62300        4095 :         netr_UAS_INFO_0_Type.tp_base = BaseObject_Type;
   62301        4095 :         netr_UAS_INFO_0_Type.tp_basicsize = pytalloc_BaseObject_size();
   62302             : 
   62303        4095 :         netr_AccountBuffer_Type.tp_base = BaseObject_Type;
   62304        4095 :         netr_AccountBuffer_Type.tp_basicsize = pytalloc_BaseObject_size();
   62305             : 
   62306        4095 :         netr_NETLOGON_INFO_1_Type.tp_base = BaseObject_Type;
   62307        4095 :         netr_NETLOGON_INFO_1_Type.tp_basicsize = pytalloc_BaseObject_size();
   62308             : 
   62309        4095 :         netr_NETLOGON_INFO_2_Type.tp_base = BaseObject_Type;
   62310        4095 :         netr_NETLOGON_INFO_2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62311             : 
   62312        4095 :         netr_NETLOGON_INFO_3_Type.tp_base = BaseObject_Type;
   62313        4095 :         netr_NETLOGON_INFO_3_Type.tp_basicsize = pytalloc_BaseObject_size();
   62314             : 
   62315        4095 :         netr_NETLOGON_INFO_4_Type.tp_base = BaseObject_Type;
   62316        4095 :         netr_NETLOGON_INFO_4_Type.tp_basicsize = pytalloc_BaseObject_size();
   62317             : 
   62318        4095 :         netr_CONTROL_QUERY_INFORMATION_Type.tp_base = BaseObject_Type;
   62319        4095 :         netr_CONTROL_QUERY_INFORMATION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62320             : 
   62321        4095 :         netr_CONTROL_DATA_INFORMATION_Type.tp_base = BaseObject_Type;
   62322        4095 :         netr_CONTROL_DATA_INFORMATION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62323             : 
   62324        4095 :         netr_ChangeLogObject_Type.tp_base = BaseObject_Type;
   62325        4095 :         netr_ChangeLogObject_Type.tp_basicsize = pytalloc_BaseObject_size();
   62326             : 
   62327        4095 :         netr_ChangeLogEntry_Type.tp_base = BaseObject_Type;
   62328        4095 :         netr_ChangeLogEntry_Type.tp_basicsize = pytalloc_BaseObject_size();
   62329             : 
   62330        4095 :         netr_Blob_Type.tp_base = BaseObject_Type;
   62331        4095 :         netr_Blob_Type.tp_basicsize = pytalloc_BaseObject_size();
   62332             : 
   62333        4095 :         netr_DsRGetDCNameInfo_Type.tp_base = BaseObject_Type;
   62334        4095 :         netr_DsRGetDCNameInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62335             : 
   62336        4095 :         netr_Capabilities_Type.tp_base = BaseObject_Type;
   62337        4095 :         netr_Capabilities_Type.tp_basicsize = pytalloc_BaseObject_size();
   62338             : 
   62339        4095 :         netr_LsaPolicyInformation_Type.tp_base = BaseObject_Type;
   62340        4095 :         netr_LsaPolicyInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62341             : 
   62342        4095 :         netr_OsVersionInfoEx_Type.tp_base = BaseObject_Type;
   62343        4095 :         netr_OsVersionInfoEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62344             : 
   62345        4095 :         netr_OsVersion_Type.tp_base = BaseObject_Type;
   62346        4095 :         netr_OsVersion_Type.tp_basicsize = pytalloc_BaseObject_size();
   62347             : 
   62348        4095 :         netr_OsVersionContainer_Type.tp_base = BaseObject_Type;
   62349        4095 :         netr_OsVersionContainer_Type.tp_basicsize = pytalloc_BaseObject_size();
   62350             : 
   62351        4095 :         netr_WorkstationInformation_Type.tp_base = BaseObject_Type;
   62352        4095 :         netr_WorkstationInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62353             : 
   62354        4095 :         netr_WorkstationInfo_Type.tp_base = BaseObject_Type;
   62355        4095 :         netr_WorkstationInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62356             : 
   62357        4095 :         netr_trust_extension_info_Type.tp_base = BaseObject_Type;
   62358        4095 :         netr_trust_extension_info_Type.tp_basicsize = pytalloc_BaseObject_size();
   62359             : 
   62360        4095 :         netr_trust_extension_Type.tp_base = BaseObject_Type;
   62361        4095 :         netr_trust_extension_Type.tp_basicsize = pytalloc_BaseObject_size();
   62362             : 
   62363        4095 :         netr_trust_extension_container_Type.tp_base = BaseObject_Type;
   62364        4095 :         netr_trust_extension_container_Type.tp_basicsize = pytalloc_BaseObject_size();
   62365             : 
   62366        4095 :         netr_OneDomainInfo_Type.tp_base = BaseObject_Type;
   62367        4095 :         netr_OneDomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62368             : 
   62369        4095 :         netr_DomainInformation_Type.tp_base = BaseObject_Type;
   62370        4095 :         netr_DomainInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62371             : 
   62372        4095 :         netr_DomainInfo_Type.tp_base = BaseObject_Type;
   62373        4095 :         netr_DomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62374             : 
   62375        4095 :         NL_PASSWORD_VERSION_Type.tp_base = BaseObject_Type;
   62376        4095 :         NL_PASSWORD_VERSION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62377             : 
   62378        4095 :         netr_CryptPassword_Type.tp_base = BaseObject_Type;
   62379        4095 :         netr_CryptPassword_Type.tp_basicsize = pytalloc_BaseObject_size();
   62380             : 
   62381        4095 :         netr_SendToSamResetBadPasswordCount_Type.tp_base = BaseObject_Type;
   62382        4095 :         netr_SendToSamResetBadPasswordCount_Type.tp_basicsize = pytalloc_BaseObject_size();
   62383             : 
   62384        4095 :         netr_SendToSamMessage_Type.tp_base = BaseObject_Type;
   62385        4095 :         netr_SendToSamMessage_Type.tp_basicsize = pytalloc_BaseObject_size();
   62386             : 
   62387        4095 :         netr_SendToSamBase_Type.tp_base = BaseObject_Type;
   62388        4095 :         netr_SendToSamBase_Type.tp_basicsize = pytalloc_BaseObject_size();
   62389             : 
   62390        4095 :         netr_DsRAddressToSitenamesWCtr_Type.tp_base = BaseObject_Type;
   62391        4095 :         netr_DsRAddressToSitenamesWCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62392             : 
   62393        4095 :         netr_DsRAddress_Type.tp_base = BaseObject_Type;
   62394        4095 :         netr_DsRAddress_Type.tp_basicsize = pytalloc_BaseObject_size();
   62395             : 
   62396        4095 :         netr_DomainTrust_Type.tp_base = BaseObject_Type;
   62397        4095 :         netr_DomainTrust_Type.tp_basicsize = pytalloc_BaseObject_size();
   62398             : 
   62399        4095 :         netr_DomainTrustList_Type.tp_base = BaseObject_Type;
   62400        4095 :         netr_DomainTrustList_Type.tp_basicsize = pytalloc_BaseObject_size();
   62401             : 
   62402        4095 :         netr_DsRAddressToSitenamesExWCtr_Type.tp_base = BaseObject_Type;
   62403        4095 :         netr_DsRAddressToSitenamesExWCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62404             : 
   62405        4095 :         DcSitesCtr_Type.tp_base = BaseObject_Type;
   62406        4095 :         DcSitesCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62407             : 
   62408        4095 :         netr_TrustInfo_Type.tp_base = BaseObject_Type;
   62409        4095 :         netr_TrustInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62410             : 
   62411        4095 :         NL_DNS_NAME_INFO_Type.tp_base = BaseObject_Type;
   62412        4095 :         NL_DNS_NAME_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
   62413             : 
   62414        4095 :         NL_DNS_NAME_INFO_ARRAY_Type.tp_base = BaseObject_Type;
   62415        4095 :         NL_DNS_NAME_INFO_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
   62416             : 
   62417        4095 :         netr_LogonUasLogon_Type.tp_base = BaseObject_Type;
   62418        4095 :         netr_LogonUasLogon_Type.tp_basicsize = pytalloc_BaseObject_size();
   62419             : 
   62420        4095 :         netr_LogonUasLogoff_Type.tp_base = BaseObject_Type;
   62421        4095 :         netr_LogonUasLogoff_Type.tp_basicsize = pytalloc_BaseObject_size();
   62422             : 
   62423        4095 :         netr_LogonSamLogon_Type.tp_base = BaseObject_Type;
   62424        4095 :         netr_LogonSamLogon_Type.tp_basicsize = pytalloc_BaseObject_size();
   62425             : 
   62426        4095 :         netr_LogonSamLogoff_Type.tp_base = BaseObject_Type;
   62427        4095 :         netr_LogonSamLogoff_Type.tp_basicsize = pytalloc_BaseObject_size();
   62428             : 
   62429        4095 :         netr_ServerReqChallenge_Type.tp_base = BaseObject_Type;
   62430        4095 :         netr_ServerReqChallenge_Type.tp_basicsize = pytalloc_BaseObject_size();
   62431             : 
   62432        4095 :         netr_ServerAuthenticate_Type.tp_base = BaseObject_Type;
   62433        4095 :         netr_ServerAuthenticate_Type.tp_basicsize = pytalloc_BaseObject_size();
   62434             : 
   62435        4095 :         netr_ServerPasswordSet_Type.tp_base = BaseObject_Type;
   62436        4095 :         netr_ServerPasswordSet_Type.tp_basicsize = pytalloc_BaseObject_size();
   62437             : 
   62438        4095 :         netr_DatabaseDeltas_Type.tp_base = BaseObject_Type;
   62439        4095 :         netr_DatabaseDeltas_Type.tp_basicsize = pytalloc_BaseObject_size();
   62440             : 
   62441        4095 :         netr_DatabaseSync_Type.tp_base = BaseObject_Type;
   62442        4095 :         netr_DatabaseSync_Type.tp_basicsize = pytalloc_BaseObject_size();
   62443             : 
   62444        4095 :         netr_AccountDeltas_Type.tp_base = BaseObject_Type;
   62445        4095 :         netr_AccountDeltas_Type.tp_basicsize = pytalloc_BaseObject_size();
   62446             : 
   62447        4095 :         netr_AccountSync_Type.tp_base = BaseObject_Type;
   62448        4095 :         netr_AccountSync_Type.tp_basicsize = pytalloc_BaseObject_size();
   62449             : 
   62450        4095 :         netr_GetDcName_Type.tp_base = BaseObject_Type;
   62451        4095 :         netr_GetDcName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62452             : 
   62453        4095 :         netr_LogonControl_Type.tp_base = BaseObject_Type;
   62454        4095 :         netr_LogonControl_Type.tp_basicsize = pytalloc_BaseObject_size();
   62455             : 
   62456        4095 :         netr_GetAnyDCName_Type.tp_base = BaseObject_Type;
   62457        4095 :         netr_GetAnyDCName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62458             : 
   62459        4095 :         netr_LogonControl2_Type.tp_base = BaseObject_Type;
   62460        4095 :         netr_LogonControl2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62461             : 
   62462        4095 :         netr_ServerAuthenticate2_Type.tp_base = BaseObject_Type;
   62463        4095 :         netr_ServerAuthenticate2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62464             : 
   62465        4095 :         netr_DatabaseSync2_Type.tp_base = BaseObject_Type;
   62466        4095 :         netr_DatabaseSync2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62467             : 
   62468        4095 :         netr_DatabaseRedo_Type.tp_base = BaseObject_Type;
   62469        4095 :         netr_DatabaseRedo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62470             : 
   62471        4095 :         netr_LogonControl2Ex_Type.tp_base = BaseObject_Type;
   62472        4095 :         netr_LogonControl2Ex_Type.tp_basicsize = pytalloc_BaseObject_size();
   62473             : 
   62474        4095 :         netr_NetrEnumerateTrustedDomains_Type.tp_base = BaseObject_Type;
   62475        4095 :         netr_NetrEnumerateTrustedDomains_Type.tp_basicsize = pytalloc_BaseObject_size();
   62476             : 
   62477        4095 :         netr_DsRGetDCName_Type.tp_base = BaseObject_Type;
   62478        4095 :         netr_DsRGetDCName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62479             : 
   62480        4095 :         netr_LogonGetCapabilities_Type.tp_base = BaseObject_Type;
   62481        4095 :         netr_LogonGetCapabilities_Type.tp_basicsize = pytalloc_BaseObject_size();
   62482             : 
   62483        4095 :         netr_LogonGetTrustRid_Type.tp_base = BaseObject_Type;
   62484        4095 :         netr_LogonGetTrustRid_Type.tp_basicsize = pytalloc_BaseObject_size();
   62485             : 
   62486        4095 :         netr_ServerAuthenticate3_Type.tp_base = BaseObject_Type;
   62487        4095 :         netr_ServerAuthenticate3_Type.tp_basicsize = pytalloc_BaseObject_size();
   62488             : 
   62489        4095 :         netr_DsRGetDCNameEx_Type.tp_base = BaseObject_Type;
   62490        4095 :         netr_DsRGetDCNameEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62491             : 
   62492        4095 :         netr_DsRGetSiteName_Type.tp_base = BaseObject_Type;
   62493        4095 :         netr_DsRGetSiteName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62494             : 
   62495        4095 :         netr_LogonGetDomainInfo_Type.tp_base = BaseObject_Type;
   62496        4095 :         netr_LogonGetDomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62497             : 
   62498        4095 :         netr_ServerPasswordSet2_Type.tp_base = BaseObject_Type;
   62499        4095 :         netr_ServerPasswordSet2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62500             : 
   62501        4095 :         netr_ServerPasswordGet_Type.tp_base = BaseObject_Type;
   62502        4095 :         netr_ServerPasswordGet_Type.tp_basicsize = pytalloc_BaseObject_size();
   62503             : 
   62504        4095 :         netr_NetrLogonSendToSam_Type.tp_base = BaseObject_Type;
   62505        4095 :         netr_NetrLogonSendToSam_Type.tp_basicsize = pytalloc_BaseObject_size();
   62506             : 
   62507        4095 :         netr_DsRAddressToSitenamesW_Type.tp_base = BaseObject_Type;
   62508        4095 :         netr_DsRAddressToSitenamesW_Type.tp_basicsize = pytalloc_BaseObject_size();
   62509             : 
   62510        4095 :         netr_DsRGetDCNameEx2_Type.tp_base = BaseObject_Type;
   62511        4095 :         netr_DsRGetDCNameEx2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62512             : 
   62513        4095 :         netr_NetrEnumerateTrustedDomainsEx_Type.tp_base = BaseObject_Type;
   62514        4095 :         netr_NetrEnumerateTrustedDomainsEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62515             : 
   62516        4095 :         netr_DsRAddressToSitenamesExW_Type.tp_base = BaseObject_Type;
   62517        4095 :         netr_DsRAddressToSitenamesExW_Type.tp_basicsize = pytalloc_BaseObject_size();
   62518             : 
   62519        4095 :         netr_DsrGetDcSiteCoverageW_Type.tp_base = BaseObject_Type;
   62520        4095 :         netr_DsrGetDcSiteCoverageW_Type.tp_basicsize = pytalloc_BaseObject_size();
   62521             : 
   62522        4095 :         netr_LogonSamLogonEx_Type.tp_base = BaseObject_Type;
   62523        4095 :         netr_LogonSamLogonEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62524             : 
   62525        4095 :         netr_DsrEnumerateDomainTrusts_Type.tp_base = BaseObject_Type;
   62526        4095 :         netr_DsrEnumerateDomainTrusts_Type.tp_basicsize = pytalloc_BaseObject_size();
   62527             : 
   62528        4095 :         netr_DsrDeregisterDNSHostRecords_Type.tp_base = BaseObject_Type;
   62529        4095 :         netr_DsrDeregisterDNSHostRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
   62530             : 
   62531        4095 :         netr_ServerTrustPasswordsGet_Type.tp_base = BaseObject_Type;
   62532        4095 :         netr_ServerTrustPasswordsGet_Type.tp_basicsize = pytalloc_BaseObject_size();
   62533             : 
   62534        4095 :         netr_DsRGetForestTrustInformation_Type.tp_base = BaseObject_Type;
   62535        4095 :         netr_DsRGetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62536             : 
   62537        4095 :         netr_GetForestTrustInformation_Type.tp_base = BaseObject_Type;
   62538        4095 :         netr_GetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62539             : 
   62540        4095 :         netr_LogonSamLogonWithFlags_Type.tp_base = BaseObject_Type;
   62541        4095 :         netr_LogonSamLogonWithFlags_Type.tp_basicsize = pytalloc_BaseObject_size();
   62542             : 
   62543        4095 :         netr_ServerGetTrustInfo_Type.tp_base = BaseObject_Type;
   62544        4095 :         netr_ServerGetTrustInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62545             : 
   62546        4095 :         netr_Unused47_Type.tp_base = BaseObject_Type;
   62547        4095 :         netr_Unused47_Type.tp_basicsize = pytalloc_BaseObject_size();
   62548             : 
   62549        4095 :         netr_DsrUpdateReadOnlyServerDnsRecords_Type.tp_base = BaseObject_Type;
   62550        4095 :         netr_DsrUpdateReadOnlyServerDnsRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
   62551             : 
   62552        4095 :         netlogon_InterfaceType.tp_base = ClientConnection_Type;
   62553             : 
   62554        4095 :         netlogon_SyntaxType.tp_base = ndr_syntax_id_Type;
   62555        4095 :         netlogon_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
   62556             : 
   62557        4095 :         if (PyType_Ready(&netr_UasInfo_Type) < 0)
   62558           0 :                 goto out;
   62559        4095 :         if (PyType_Ready(&netr_UasLogoffInfo_Type) < 0)
   62560           0 :                 goto out;
   62561        4095 :         if (PyType_Ready(&netr_AcctLockStr_Type) < 0)
   62562           0 :                 goto out;
   62563        4095 :         if (PyType_Ready(&netr_IdentityInfo_Type) < 0)
   62564           0 :                 goto out;
   62565        4095 :         if (PyType_Ready(&netr_PasswordInfo_Type) < 0)
   62566           0 :                 goto out;
   62567        4095 :         if (PyType_Ready(&netr_ChallengeResponse_Type) < 0)
   62568           0 :                 goto out;
   62569        4095 :         if (PyType_Ready(&netr_NetworkInfo_Type) < 0)
   62570           0 :                 goto out;
   62571        4095 :         if (PyType_Ready(&netr_GenericInfo_Type) < 0)
   62572           0 :                 goto out;
   62573        4095 :         if (PyType_Ready(&netr_LogonLevel_Type) < 0)
   62574           0 :                 goto out;
   62575        4095 :         if (PyType_Ready(&netr_UserSessionKey_Type) < 0)
   62576           0 :                 goto out;
   62577        4095 :         if (PyType_Ready(&netr_LMSessionKey_Type) < 0)
   62578           0 :                 goto out;
   62579        4095 :         if (PyType_Ready(&netr_SamBaseInfo_Type) < 0)
   62580           0 :                 goto out;
   62581        4095 :         if (PyType_Ready(&netr_SamInfo2_Type) < 0)
   62582           0 :                 goto out;
   62583        4095 :         if (PyType_Ready(&netr_SidAttr_Type) < 0)
   62584           0 :                 goto out;
   62585        4095 :         if (PyType_Ready(&netr_SamInfo3_Type) < 0)
   62586           0 :                 goto out;
   62587        4095 :         if (PyType_Ready(&netr_SamInfo6_Type) < 0)
   62588           0 :                 goto out;
   62589        4095 :         if (PyType_Ready(&netr_PacInfo_Type) < 0)
   62590           0 :                 goto out;
   62591        4095 :         if (PyType_Ready(&netr_GenericInfo2_Type) < 0)
   62592           0 :                 goto out;
   62593        4095 :         if (PyType_Ready(&netr_Validation_Type) < 0)
   62594           0 :                 goto out;
   62595        4095 :         if (PyType_Ready(&netr_Credential_Type) < 0)
   62596           0 :                 goto out;
   62597        4095 :         if (PyType_Ready(&netlogon_server_pipe_state_Type) < 0)
   62598           0 :                 goto out;
   62599        4095 :         if (PyType_Ready(&netr_Authenticator_Type) < 0)
   62600           0 :                 goto out;
   62601        4095 :         if (PyType_Ready(&netr_DELTA_DELETE_USER_Type) < 0)
   62602           0 :                 goto out;
   62603        4095 :         if (PyType_Ready(&netr_USER_KEY16_Type) < 0)
   62604           0 :                 goto out;
   62605        4095 :         if (PyType_Ready(&netr_PasswordHistory_Type) < 0)
   62606           0 :                 goto out;
   62607        4095 :         if (PyType_Ready(&netr_USER_KEYS2_Type) < 0)
   62608           0 :                 goto out;
   62609        4095 :         if (PyType_Ready(&netr_USER_KEY_UNION_Type) < 0)
   62610           0 :                 goto out;
   62611        4095 :         if (PyType_Ready(&netr_USER_KEYS_Type) < 0)
   62612           0 :                 goto out;
   62613        4095 :         if (PyType_Ready(&netr_USER_PRIVATE_INFO_Type) < 0)
   62614           0 :                 goto out;
   62615        4095 :         if (PyType_Ready(&netr_DELTA_USER_Type) < 0)
   62616           0 :                 goto out;
   62617        4095 :         if (PyType_Ready(&netr_DELTA_DOMAIN_Type) < 0)
   62618           0 :                 goto out;
   62619        4095 :         if (PyType_Ready(&netr_DELTA_GROUP_Type) < 0)
   62620           0 :                 goto out;
   62621        4095 :         if (PyType_Ready(&netr_DELTA_RENAME_Type) < 0)
   62622           0 :                 goto out;
   62623        4095 :         if (PyType_Ready(&netr_DELTA_GROUP_MEMBER_Type) < 0)
   62624           0 :                 goto out;
   62625        4095 :         if (PyType_Ready(&netr_DELTA_ALIAS_Type) < 0)
   62626           0 :                 goto out;
   62627        4095 :         if (PyType_Ready(&netr_DELTA_ALIAS_MEMBER_Type) < 0)
   62628           0 :                 goto out;
   62629        4095 :         if (PyType_Ready(&netr_QUOTA_LIMITS_Type) < 0)
   62630           0 :                 goto out;
   62631        4095 :         if (PyType_Ready(&netr_DELTA_POLICY_Type) < 0)
   62632           0 :                 goto out;
   62633        4095 :         if (PyType_Ready(&netr_DELTA_TRUSTED_DOMAIN_Type) < 0)
   62634           0 :                 goto out;
   62635        4095 :         if (PyType_Ready(&netr_DELTA_ACCOUNT_Type) < 0)
   62636           0 :                 goto out;
   62637        4095 :         if (PyType_Ready(&netr_CIPHER_VALUE_Type) < 0)
   62638           0 :                 goto out;
   62639        4095 :         if (PyType_Ready(&netr_DELTA_SECRET_Type) < 0)
   62640           0 :                 goto out;
   62641        4095 :         if (PyType_Ready(&netr_DELTA_UNION_Type) < 0)
   62642           0 :                 goto out;
   62643        4095 :         if (PyType_Ready(&netr_DELTA_ID_UNION_Type) < 0)
   62644           0 :                 goto out;
   62645        4095 :         if (PyType_Ready(&netr_DELTA_ENUM_Type) < 0)
   62646           0 :                 goto out;
   62647        4095 :         if (PyType_Ready(&netr_DELTA_ENUM_ARRAY_Type) < 0)
   62648           0 :                 goto out;
   62649        4095 :         if (PyType_Ready(&netr_UAS_INFO_0_Type) < 0)
   62650           0 :                 goto out;
   62651        4095 :         if (PyType_Ready(&netr_AccountBuffer_Type) < 0)
   62652           0 :                 goto out;
   62653        4095 :         if (PyType_Ready(&netr_NETLOGON_INFO_1_Type) < 0)
   62654           0 :                 goto out;
   62655        4095 :         if (PyType_Ready(&netr_NETLOGON_INFO_2_Type) < 0)
   62656           0 :                 goto out;
   62657        4095 :         if (PyType_Ready(&netr_NETLOGON_INFO_3_Type) < 0)
   62658           0 :                 goto out;
   62659        4095 :         if (PyType_Ready(&netr_NETLOGON_INFO_4_Type) < 0)
   62660           0 :                 goto out;
   62661        4095 :         if (PyType_Ready(&netr_CONTROL_QUERY_INFORMATION_Type) < 0)
   62662           0 :                 goto out;
   62663        4095 :         if (PyType_Ready(&netr_CONTROL_DATA_INFORMATION_Type) < 0)
   62664           0 :                 goto out;
   62665        4095 :         if (PyType_Ready(&netr_ChangeLogObject_Type) < 0)
   62666           0 :                 goto out;
   62667        4095 :         if (PyType_Ready(&netr_ChangeLogEntry_Type) < 0)
   62668           0 :                 goto out;
   62669        4095 :         if (PyType_Ready(&netr_Blob_Type) < 0)
   62670           0 :                 goto out;
   62671        4095 :         if (PyType_Ready(&netr_DsRGetDCNameInfo_Type) < 0)
   62672           0 :                 goto out;
   62673        4095 :         if (PyType_Ready(&netr_Capabilities_Type) < 0)
   62674           0 :                 goto out;
   62675        4095 :         if (PyType_Ready(&netr_LsaPolicyInformation_Type) < 0)
   62676           0 :                 goto out;
   62677        4095 :         if (PyType_Ready(&netr_OsVersionInfoEx_Type) < 0)
   62678           0 :                 goto out;
   62679        4095 :         if (PyType_Ready(&netr_OsVersion_Type) < 0)
   62680           0 :                 goto out;
   62681        4095 :         if (PyType_Ready(&netr_OsVersionContainer_Type) < 0)
   62682           0 :                 goto out;
   62683        4095 :         if (PyType_Ready(&netr_WorkstationInformation_Type) < 0)
   62684           0 :                 goto out;
   62685        4095 :         if (PyType_Ready(&netr_WorkstationInfo_Type) < 0)
   62686           0 :                 goto out;
   62687        4095 :         if (PyType_Ready(&netr_trust_extension_info_Type) < 0)
   62688           0 :                 goto out;
   62689        4095 :         if (PyType_Ready(&netr_trust_extension_Type) < 0)
   62690           0 :                 goto out;
   62691        4095 :         if (PyType_Ready(&netr_trust_extension_container_Type) < 0)
   62692           0 :                 goto out;
   62693        4095 :         if (PyType_Ready(&netr_OneDomainInfo_Type) < 0)
   62694           0 :                 goto out;
   62695        4095 :         if (PyType_Ready(&netr_DomainInformation_Type) < 0)
   62696           0 :                 goto out;
   62697        4095 :         if (PyType_Ready(&netr_DomainInfo_Type) < 0)
   62698           0 :                 goto out;
   62699        4095 :         if (PyType_Ready(&NL_PASSWORD_VERSION_Type) < 0)
   62700           0 :                 goto out;
   62701        4095 :         if (PyType_Ready(&netr_CryptPassword_Type) < 0)
   62702           0 :                 goto out;
   62703        4095 :         if (PyType_Ready(&netr_SendToSamResetBadPasswordCount_Type) < 0)
   62704           0 :                 goto out;
   62705        4095 :         if (PyType_Ready(&netr_SendToSamMessage_Type) < 0)
   62706           0 :                 goto out;
   62707        4095 :         if (PyType_Ready(&netr_SendToSamBase_Type) < 0)
   62708           0 :                 goto out;
   62709        4095 :         if (PyType_Ready(&netr_DsRAddressToSitenamesWCtr_Type) < 0)
   62710           0 :                 goto out;
   62711        4095 :         if (PyType_Ready(&netr_DsRAddress_Type) < 0)
   62712           0 :                 goto out;
   62713        4095 :         if (PyType_Ready(&netr_DomainTrust_Type) < 0)
   62714           0 :                 goto out;
   62715        4095 :         if (PyType_Ready(&netr_DomainTrustList_Type) < 0)
   62716           0 :                 goto out;
   62717        4095 :         if (PyType_Ready(&netr_DsRAddressToSitenamesExWCtr_Type) < 0)
   62718           0 :                 goto out;
   62719        4095 :         if (PyType_Ready(&DcSitesCtr_Type) < 0)
   62720           0 :                 goto out;
   62721        4095 :         if (PyType_Ready(&netr_TrustInfo_Type) < 0)
   62722           0 :                 goto out;
   62723        4095 :         if (PyType_Ready(&NL_DNS_NAME_INFO_Type) < 0)
   62724           0 :                 goto out;
   62725        4095 :         if (PyType_Ready(&NL_DNS_NAME_INFO_ARRAY_Type) < 0)
   62726           0 :                 goto out;
   62727        4095 :         if (PyType_Ready(&netr_LogonUasLogon_Type) < 0)
   62728           0 :                 goto out;
   62729        4095 :         if (PyType_Ready(&netr_LogonUasLogoff_Type) < 0)
   62730           0 :                 goto out;
   62731        4095 :         if (PyType_Ready(&netr_LogonSamLogon_Type) < 0)
   62732           0 :                 goto out;
   62733        4095 :         if (PyType_Ready(&netr_LogonSamLogoff_Type) < 0)
   62734           0 :                 goto out;
   62735        4095 :         if (PyType_Ready(&netr_ServerReqChallenge_Type) < 0)
   62736           0 :                 goto out;
   62737        4095 :         if (PyType_Ready(&netr_ServerAuthenticate_Type) < 0)
   62738           0 :                 goto out;
   62739        4095 :         if (PyType_Ready(&netr_ServerPasswordSet_Type) < 0)
   62740           0 :                 goto out;
   62741        4095 :         if (PyType_Ready(&netr_DatabaseDeltas_Type) < 0)
   62742           0 :                 goto out;
   62743        4095 :         if (PyType_Ready(&netr_DatabaseSync_Type) < 0)
   62744           0 :                 goto out;
   62745        4095 :         if (PyType_Ready(&netr_AccountDeltas_Type) < 0)
   62746           0 :                 goto out;
   62747        4095 :         if (PyType_Ready(&netr_AccountSync_Type) < 0)
   62748           0 :                 goto out;
   62749        4095 :         if (PyType_Ready(&netr_GetDcName_Type) < 0)
   62750           0 :                 goto out;
   62751        4095 :         if (PyType_Ready(&netr_LogonControl_Type) < 0)
   62752           0 :                 goto out;
   62753        4095 :         if (PyType_Ready(&netr_GetAnyDCName_Type) < 0)
   62754           0 :                 goto out;
   62755        4095 :         if (PyType_Ready(&netr_LogonControl2_Type) < 0)
   62756           0 :                 goto out;
   62757        4095 :         if (PyType_Ready(&netr_ServerAuthenticate2_Type) < 0)
   62758           0 :                 goto out;
   62759        4095 :         if (PyType_Ready(&netr_DatabaseSync2_Type) < 0)
   62760           0 :                 goto out;
   62761        4095 :         if (PyType_Ready(&netr_DatabaseRedo_Type) < 0)
   62762           0 :                 goto out;
   62763        4095 :         if (PyType_Ready(&netr_LogonControl2Ex_Type) < 0)
   62764           0 :                 goto out;
   62765        4095 :         if (PyType_Ready(&netr_NetrEnumerateTrustedDomains_Type) < 0)
   62766           0 :                 goto out;
   62767        4095 :         if (PyType_Ready(&netr_DsRGetDCName_Type) < 0)
   62768           0 :                 goto out;
   62769        4095 :         if (PyType_Ready(&netr_LogonGetCapabilities_Type) < 0)
   62770           0 :                 goto out;
   62771        4095 :         if (PyType_Ready(&netr_LogonGetTrustRid_Type) < 0)
   62772           0 :                 goto out;
   62773        4095 :         if (PyType_Ready(&netr_ServerAuthenticate3_Type) < 0)
   62774           0 :                 goto out;
   62775        4095 :         if (PyType_Ready(&netr_DsRGetDCNameEx_Type) < 0)
   62776           0 :                 goto out;
   62777        4095 :         if (PyType_Ready(&netr_DsRGetSiteName_Type) < 0)
   62778           0 :                 goto out;
   62779        4095 :         if (PyType_Ready(&netr_LogonGetDomainInfo_Type) < 0)
   62780           0 :                 goto out;
   62781        4095 :         if (PyType_Ready(&netr_ServerPasswordSet2_Type) < 0)
   62782           0 :                 goto out;
   62783        4095 :         if (PyType_Ready(&netr_ServerPasswordGet_Type) < 0)
   62784           0 :                 goto out;
   62785        4095 :         if (PyType_Ready(&netr_NetrLogonSendToSam_Type) < 0)
   62786           0 :                 goto out;
   62787        4095 :         if (PyType_Ready(&netr_DsRAddressToSitenamesW_Type) < 0)
   62788           0 :                 goto out;
   62789        4095 :         if (PyType_Ready(&netr_DsRGetDCNameEx2_Type) < 0)
   62790           0 :                 goto out;
   62791        4095 :         if (PyType_Ready(&netr_NetrEnumerateTrustedDomainsEx_Type) < 0)
   62792           0 :                 goto out;
   62793        4095 :         if (PyType_Ready(&netr_DsRAddressToSitenamesExW_Type) < 0)
   62794           0 :                 goto out;
   62795        4095 :         if (PyType_Ready(&netr_DsrGetDcSiteCoverageW_Type) < 0)
   62796           0 :                 goto out;
   62797        4095 :         if (PyType_Ready(&netr_LogonSamLogonEx_Type) < 0)
   62798           0 :                 goto out;
   62799        4095 :         if (PyType_Ready(&netr_DsrEnumerateDomainTrusts_Type) < 0)
   62800           0 :                 goto out;
   62801        4095 :         if (PyType_Ready(&netr_DsrDeregisterDNSHostRecords_Type) < 0)
   62802           0 :                 goto out;
   62803        4095 :         if (PyType_Ready(&netr_ServerTrustPasswordsGet_Type) < 0)
   62804           0 :                 goto out;
   62805        4095 :         if (PyType_Ready(&netr_DsRGetForestTrustInformation_Type) < 0)
   62806           0 :                 goto out;
   62807        4095 :         if (PyType_Ready(&netr_GetForestTrustInformation_Type) < 0)
   62808           0 :                 goto out;
   62809        4095 :         if (PyType_Ready(&netr_LogonSamLogonWithFlags_Type) < 0)
   62810           0 :                 goto out;
   62811        4095 :         if (PyType_Ready(&netr_ServerGetTrustInfo_Type) < 0)
   62812           0 :                 goto out;
   62813        4095 :         if (PyType_Ready(&netr_Unused47_Type) < 0)
   62814           0 :                 goto out;
   62815        4095 :         if (PyType_Ready(&netr_DsrUpdateReadOnlyServerDnsRecords_Type) < 0)
   62816           0 :                 goto out;
   62817        4095 :         if (PyType_Ready(&netlogon_InterfaceType) < 0)
   62818           0 :                 goto out;
   62819        4095 :         if (PyType_Ready(&netlogon_SyntaxType) < 0)
   62820           0 :                 goto out;
   62821        4095 :         if (!PyInterface_AddNdrRpcMethods(&netlogon_InterfaceType, py_ndr_netlogon_methods))
   62822           0 :                 return NULL;
   62823             : 
   62824             : #ifdef PY_NETR_UASINFO_PATCH
   62825             :         PY_NETR_UASINFO_PATCH(&netr_UasInfo_Type);
   62826             : #endif
   62827             : #ifdef PY_NETR_UASLOGOFFINFO_PATCH
   62828             :         PY_NETR_UASLOGOFFINFO_PATCH(&netr_UasLogoffInfo_Type);
   62829             : #endif
   62830             : #ifdef PY_NETR_ACCTLOCKSTR_PATCH
   62831             :         PY_NETR_ACCTLOCKSTR_PATCH(&netr_AcctLockStr_Type);
   62832             : #endif
   62833             : #ifdef PY_NETR_IDENTITYINFO_PATCH
   62834             :         PY_NETR_IDENTITYINFO_PATCH(&netr_IdentityInfo_Type);
   62835             : #endif
   62836             : #ifdef PY_NETR_PASSWORDINFO_PATCH
   62837             :         PY_NETR_PASSWORDINFO_PATCH(&netr_PasswordInfo_Type);
   62838             : #endif
   62839             : #ifdef PY_NETR_CHALLENGERESPONSE_PATCH
   62840             :         PY_NETR_CHALLENGERESPONSE_PATCH(&netr_ChallengeResponse_Type);
   62841             : #endif
   62842             : #ifdef PY_NETR_NETWORKINFO_PATCH
   62843             :         PY_NETR_NETWORKINFO_PATCH(&netr_NetworkInfo_Type);
   62844             : #endif
   62845             : #ifdef PY_NETR_GENERICINFO_PATCH
   62846             :         PY_NETR_GENERICINFO_PATCH(&netr_GenericInfo_Type);
   62847             : #endif
   62848             : #ifdef PY_NETR_LOGONLEVEL_PATCH
   62849             :         PY_NETR_LOGONLEVEL_PATCH(&netr_LogonLevel_Type);
   62850             : #endif
   62851             : #ifdef PY_NETR_USERSESSIONKEY_PATCH
   62852             :         PY_NETR_USERSESSIONKEY_PATCH(&netr_UserSessionKey_Type);
   62853             : #endif
   62854             : #ifdef PY_NETR_LMSESSIONKEY_PATCH
   62855             :         PY_NETR_LMSESSIONKEY_PATCH(&netr_LMSessionKey_Type);
   62856             : #endif
   62857             : #ifdef PY_NETR_SAMBASEINFO_PATCH
   62858             :         PY_NETR_SAMBASEINFO_PATCH(&netr_SamBaseInfo_Type);
   62859             : #endif
   62860             : #ifdef PY_NETR_SAMINFO2_PATCH
   62861             :         PY_NETR_SAMINFO2_PATCH(&netr_SamInfo2_Type);
   62862             : #endif
   62863             : #ifdef PY_NETR_SIDATTR_PATCH
   62864             :         PY_NETR_SIDATTR_PATCH(&netr_SidAttr_Type);
   62865             : #endif
   62866             : #ifdef PY_NETR_SAMINFO3_PATCH
   62867             :         PY_NETR_SAMINFO3_PATCH(&netr_SamInfo3_Type);
   62868             : #endif
   62869             : #ifdef PY_NETR_SAMINFO6_PATCH
   62870             :         PY_NETR_SAMINFO6_PATCH(&netr_SamInfo6_Type);
   62871             : #endif
   62872             : #ifdef PY_NETR_PACINFO_PATCH
   62873             :         PY_NETR_PACINFO_PATCH(&netr_PacInfo_Type);
   62874             : #endif
   62875             : #ifdef PY_NETR_GENERICINFO2_PATCH
   62876             :         PY_NETR_GENERICINFO2_PATCH(&netr_GenericInfo2_Type);
   62877             : #endif
   62878             : #ifdef PY_NETR_VALIDATION_PATCH
   62879             :         PY_NETR_VALIDATION_PATCH(&netr_Validation_Type);
   62880             : #endif
   62881             : #ifdef PY_NETR_CREDENTIAL_PATCH
   62882             :         PY_NETR_CREDENTIAL_PATCH(&netr_Credential_Type);
   62883             : #endif
   62884             : #ifdef PY_SERVER_PIPE_STATE_PATCH
   62885             :         PY_SERVER_PIPE_STATE_PATCH(&netlogon_server_pipe_state_Type);
   62886             : #endif
   62887             : #ifdef PY_NETR_AUTHENTICATOR_PATCH
   62888             :         PY_NETR_AUTHENTICATOR_PATCH(&netr_Authenticator_Type);
   62889             : #endif
   62890             : #ifdef PY_NETR_DELTA_DELETE_USER_PATCH
   62891             :         PY_NETR_DELTA_DELETE_USER_PATCH(&netr_DELTA_DELETE_USER_Type);
   62892             : #endif
   62893             : #ifdef PY_NETR_USER_KEY16_PATCH
   62894             :         PY_NETR_USER_KEY16_PATCH(&netr_USER_KEY16_Type);
   62895             : #endif
   62896             : #ifdef PY_NETR_PASSWORDHISTORY_PATCH
   62897             :         PY_NETR_PASSWORDHISTORY_PATCH(&netr_PasswordHistory_Type);
   62898             : #endif
   62899             : #ifdef PY_NETR_USER_KEYS2_PATCH
   62900             :         PY_NETR_USER_KEYS2_PATCH(&netr_USER_KEYS2_Type);
   62901             : #endif
   62902             : #ifdef PY_NETR_USER_KEY_UNION_PATCH
   62903             :         PY_NETR_USER_KEY_UNION_PATCH(&netr_USER_KEY_UNION_Type);
   62904             : #endif
   62905             : #ifdef PY_NETR_USER_KEYS_PATCH
   62906             :         PY_NETR_USER_KEYS_PATCH(&netr_USER_KEYS_Type);
   62907             : #endif
   62908             : #ifdef PY_NETR_USER_PRIVATE_INFO_PATCH
   62909             :         PY_NETR_USER_PRIVATE_INFO_PATCH(&netr_USER_PRIVATE_INFO_Type);
   62910             : #endif
   62911             : #ifdef PY_NETR_DELTA_USER_PATCH
   62912             :         PY_NETR_DELTA_USER_PATCH(&netr_DELTA_USER_Type);
   62913             : #endif
   62914             : #ifdef PY_NETR_DELTA_DOMAIN_PATCH
   62915             :         PY_NETR_DELTA_DOMAIN_PATCH(&netr_DELTA_DOMAIN_Type);
   62916             : #endif
   62917             : #ifdef PY_NETR_DELTA_GROUP_PATCH
   62918             :         PY_NETR_DELTA_GROUP_PATCH(&netr_DELTA_GROUP_Type);
   62919             : #endif
   62920             : #ifdef PY_NETR_DELTA_RENAME_PATCH
   62921             :         PY_NETR_DELTA_RENAME_PATCH(&netr_DELTA_RENAME_Type);
   62922             : #endif
   62923             : #ifdef PY_NETR_DELTA_GROUP_MEMBER_PATCH
   62924             :         PY_NETR_DELTA_GROUP_MEMBER_PATCH(&netr_DELTA_GROUP_MEMBER_Type);
   62925             : #endif
   62926             : #ifdef PY_NETR_DELTA_ALIAS_PATCH
   62927             :         PY_NETR_DELTA_ALIAS_PATCH(&netr_DELTA_ALIAS_Type);
   62928             : #endif
   62929             : #ifdef PY_NETR_DELTA_ALIAS_MEMBER_PATCH
   62930             :         PY_NETR_DELTA_ALIAS_MEMBER_PATCH(&netr_DELTA_ALIAS_MEMBER_Type);
   62931             : #endif
   62932             : #ifdef PY_NETR_QUOTA_LIMITS_PATCH
   62933             :         PY_NETR_QUOTA_LIMITS_PATCH(&netr_QUOTA_LIMITS_Type);
   62934             : #endif
   62935             : #ifdef PY_NETR_DELTA_POLICY_PATCH
   62936             :         PY_NETR_DELTA_POLICY_PATCH(&netr_DELTA_POLICY_Type);
   62937             : #endif
   62938             : #ifdef PY_NETR_DELTA_TRUSTED_DOMAIN_PATCH
   62939             :         PY_NETR_DELTA_TRUSTED_DOMAIN_PATCH(&netr_DELTA_TRUSTED_DOMAIN_Type);
   62940             : #endif
   62941             : #ifdef PY_NETR_DELTA_ACCOUNT_PATCH
   62942             :         PY_NETR_DELTA_ACCOUNT_PATCH(&netr_DELTA_ACCOUNT_Type);
   62943             : #endif
   62944             : #ifdef PY_NETR_CIPHER_VALUE_PATCH
   62945             :         PY_NETR_CIPHER_VALUE_PATCH(&netr_CIPHER_VALUE_Type);
   62946             : #endif
   62947             : #ifdef PY_NETR_DELTA_SECRET_PATCH
   62948             :         PY_NETR_DELTA_SECRET_PATCH(&netr_DELTA_SECRET_Type);
   62949             : #endif
   62950             : #ifdef PY_NETR_DELTA_UNION_PATCH
   62951             :         PY_NETR_DELTA_UNION_PATCH(&netr_DELTA_UNION_Type);
   62952             : #endif
   62953             : #ifdef PY_NETR_DELTA_ID_UNION_PATCH
   62954             :         PY_NETR_DELTA_ID_UNION_PATCH(&netr_DELTA_ID_UNION_Type);
   62955             : #endif
   62956             : #ifdef PY_NETR_DELTA_ENUM_PATCH
   62957             :         PY_NETR_DELTA_ENUM_PATCH(&netr_DELTA_ENUM_Type);
   62958             : #endif
   62959             : #ifdef PY_NETR_DELTA_ENUM_ARRAY_PATCH
   62960             :         PY_NETR_DELTA_ENUM_ARRAY_PATCH(&netr_DELTA_ENUM_ARRAY_Type);
   62961             : #endif
   62962             : #ifdef PY_NETR_UAS_INFO_0_PATCH
   62963             :         PY_NETR_UAS_INFO_0_PATCH(&netr_UAS_INFO_0_Type);
   62964             : #endif
   62965             : #ifdef PY_NETR_ACCOUNTBUFFER_PATCH
   62966             :         PY_NETR_ACCOUNTBUFFER_PATCH(&netr_AccountBuffer_Type);
   62967             : #endif
   62968             : #ifdef PY_NETR_NETLOGON_INFO_1_PATCH
   62969             :         PY_NETR_NETLOGON_INFO_1_PATCH(&netr_NETLOGON_INFO_1_Type);
   62970             : #endif
   62971             : #ifdef PY_NETR_NETLOGON_INFO_2_PATCH
   62972             :         PY_NETR_NETLOGON_INFO_2_PATCH(&netr_NETLOGON_INFO_2_Type);
   62973             : #endif
   62974             : #ifdef PY_NETR_NETLOGON_INFO_3_PATCH
   62975             :         PY_NETR_NETLOGON_INFO_3_PATCH(&netr_NETLOGON_INFO_3_Type);
   62976             : #endif
   62977             : #ifdef PY_NETR_NETLOGON_INFO_4_PATCH
   62978             :         PY_NETR_NETLOGON_INFO_4_PATCH(&netr_NETLOGON_INFO_4_Type);
   62979             : #endif
   62980             : #ifdef PY_NETR_CONTROL_QUERY_INFORMATION_PATCH
   62981             :         PY_NETR_CONTROL_QUERY_INFORMATION_PATCH(&netr_CONTROL_QUERY_INFORMATION_Type);
   62982             : #endif
   62983             : #ifdef PY_NETR_CONTROL_DATA_INFORMATION_PATCH
   62984             :         PY_NETR_CONTROL_DATA_INFORMATION_PATCH(&netr_CONTROL_DATA_INFORMATION_Type);
   62985             : #endif
   62986             : #ifdef PY_NETR_CHANGELOGOBJECT_PATCH
   62987             :         PY_NETR_CHANGELOGOBJECT_PATCH(&netr_ChangeLogObject_Type);
   62988             : #endif
   62989             : #ifdef PY_NETR_CHANGELOGENTRY_PATCH
   62990             :         PY_NETR_CHANGELOGENTRY_PATCH(&netr_ChangeLogEntry_Type);
   62991             : #endif
   62992             : #ifdef PY_NETR_BLOB_PATCH
   62993             :         PY_NETR_BLOB_PATCH(&netr_Blob_Type);
   62994             : #endif
   62995             : #ifdef PY_NETR_DSRGETDCNAMEINFO_PATCH
   62996             :         PY_NETR_DSRGETDCNAMEINFO_PATCH(&netr_DsRGetDCNameInfo_Type);
   62997             : #endif
   62998             : #ifdef PY_NETR_CAPABILITIES_PATCH
   62999             :         PY_NETR_CAPABILITIES_PATCH(&netr_Capabilities_Type);
   63000             : #endif
   63001             : #ifdef PY_NETR_LSAPOLICYINFORMATION_PATCH
   63002             :         PY_NETR_LSAPOLICYINFORMATION_PATCH(&netr_LsaPolicyInformation_Type);
   63003             : #endif
   63004             : #ifdef PY_NETR_OSVERSIONINFOEX_PATCH
   63005             :         PY_NETR_OSVERSIONINFOEX_PATCH(&netr_OsVersionInfoEx_Type);
   63006             : #endif
   63007             : #ifdef PY_NETR_OSVERSION_PATCH
   63008             :         PY_NETR_OSVERSION_PATCH(&netr_OsVersion_Type);
   63009             : #endif
   63010             : #ifdef PY_NETR_OSVERSIONCONTAINER_PATCH
   63011             :         PY_NETR_OSVERSIONCONTAINER_PATCH(&netr_OsVersionContainer_Type);
   63012             : #endif
   63013             : #ifdef PY_NETR_WORKSTATIONINFORMATION_PATCH
   63014             :         PY_NETR_WORKSTATIONINFORMATION_PATCH(&netr_WorkstationInformation_Type);
   63015             : #endif
   63016             : #ifdef PY_NETR_WORKSTATIONINFO_PATCH
   63017             :         PY_NETR_WORKSTATIONINFO_PATCH(&netr_WorkstationInfo_Type);
   63018             : #endif
   63019             : #ifdef PY_NETR_TRUST_EXTENSION_INFO_PATCH
   63020             :         PY_NETR_TRUST_EXTENSION_INFO_PATCH(&netr_trust_extension_info_Type);
   63021             : #endif
   63022             : #ifdef PY_NETR_TRUST_EXTENSION_PATCH
   63023             :         PY_NETR_TRUST_EXTENSION_PATCH(&netr_trust_extension_Type);
   63024             : #endif
   63025             : #ifdef PY_NETR_TRUST_EXTENSION_CONTAINER_PATCH
   63026             :         PY_NETR_TRUST_EXTENSION_CONTAINER_PATCH(&netr_trust_extension_container_Type);
   63027             : #endif
   63028             : #ifdef PY_NETR_ONEDOMAININFO_PATCH
   63029             :         PY_NETR_ONEDOMAININFO_PATCH(&netr_OneDomainInfo_Type);
   63030             : #endif
   63031             : #ifdef PY_NETR_DOMAININFORMATION_PATCH
   63032             :         PY_NETR_DOMAININFORMATION_PATCH(&netr_DomainInformation_Type);
   63033             : #endif
   63034             : #ifdef PY_NETR_DOMAININFO_PATCH
   63035             :         PY_NETR_DOMAININFO_PATCH(&netr_DomainInfo_Type);
   63036             : #endif
   63037             : #ifdef PY_NL_PASSWORD_VERSION_PATCH
   63038             :         PY_NL_PASSWORD_VERSION_PATCH(&NL_PASSWORD_VERSION_Type);
   63039             : #endif
   63040             : #ifdef PY_NETR_CRYPTPASSWORD_PATCH
   63041             :         PY_NETR_CRYPTPASSWORD_PATCH(&netr_CryptPassword_Type);
   63042             : #endif
   63043             : #ifdef PY_NETR_SENDTOSAMRESETBADPASSWORDCOUNT_PATCH
   63044             :         PY_NETR_SENDTOSAMRESETBADPASSWORDCOUNT_PATCH(&netr_SendToSamResetBadPasswordCount_Type);
   63045             : #endif
   63046             : #ifdef PY_NETR_SENDTOSAMMESSAGE_PATCH
   63047             :         PY_NETR_SENDTOSAMMESSAGE_PATCH(&netr_SendToSamMessage_Type);
   63048             : #endif
   63049             : #ifdef PY_NETR_SENDTOSAMBASE_PATCH
   63050             :         PY_NETR_SENDTOSAMBASE_PATCH(&netr_SendToSamBase_Type);
   63051             : #endif
   63052             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESWCTR_PATCH
   63053             :         PY_NETR_DSRADDRESSTOSITENAMESWCTR_PATCH(&netr_DsRAddressToSitenamesWCtr_Type);
   63054             : #endif
   63055             : #ifdef PY_NETR_DSRADDRESS_PATCH
   63056             :         PY_NETR_DSRADDRESS_PATCH(&netr_DsRAddress_Type);
   63057             : #endif
   63058             : #ifdef PY_NETR_DOMAINTRUST_PATCH
   63059             :         PY_NETR_DOMAINTRUST_PATCH(&netr_DomainTrust_Type);
   63060             : #endif
   63061             : #ifdef PY_NETR_DOMAINTRUSTLIST_PATCH
   63062             :         PY_NETR_DOMAINTRUSTLIST_PATCH(&netr_DomainTrustList_Type);
   63063             : #endif
   63064             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESEXWCTR_PATCH
   63065             :         PY_NETR_DSRADDRESSTOSITENAMESEXWCTR_PATCH(&netr_DsRAddressToSitenamesExWCtr_Type);
   63066             : #endif
   63067             : #ifdef PY_DCSITESCTR_PATCH
   63068             :         PY_DCSITESCTR_PATCH(&DcSitesCtr_Type);
   63069             : #endif
   63070             : #ifdef PY_NETR_TRUSTINFO_PATCH
   63071             :         PY_NETR_TRUSTINFO_PATCH(&netr_TrustInfo_Type);
   63072             : #endif
   63073             : #ifdef PY_NL_DNS_NAME_INFO_PATCH
   63074             :         PY_NL_DNS_NAME_INFO_PATCH(&NL_DNS_NAME_INFO_Type);
   63075             : #endif
   63076             : #ifdef PY_NL_DNS_NAME_INFO_ARRAY_PATCH
   63077             :         PY_NL_DNS_NAME_INFO_ARRAY_PATCH(&NL_DNS_NAME_INFO_ARRAY_Type);
   63078             : #endif
   63079             : #ifdef PY_NETR_LOGONUASLOGON_PATCH
   63080             :         PY_NETR_LOGONUASLOGON_PATCH(&netr_LogonUasLogon_Type);
   63081             : #endif
   63082             : #ifdef PY_NETR_LOGONUASLOGOFF_PATCH
   63083             :         PY_NETR_LOGONUASLOGOFF_PATCH(&netr_LogonUasLogoff_Type);
   63084             : #endif
   63085             : #ifdef PY_NETR_LOGONSAMLOGON_PATCH
   63086             :         PY_NETR_LOGONSAMLOGON_PATCH(&netr_LogonSamLogon_Type);
   63087             : #endif
   63088             : #ifdef PY_NETR_LOGONSAMLOGOFF_PATCH
   63089             :         PY_NETR_LOGONSAMLOGOFF_PATCH(&netr_LogonSamLogoff_Type);
   63090             : #endif
   63091             : #ifdef PY_NETR_SERVERREQCHALLENGE_PATCH
   63092             :         PY_NETR_SERVERREQCHALLENGE_PATCH(&netr_ServerReqChallenge_Type);
   63093             : #endif
   63094             : #ifdef PY_NETR_SERVERAUTHENTICATE_PATCH
   63095             :         PY_NETR_SERVERAUTHENTICATE_PATCH(&netr_ServerAuthenticate_Type);
   63096             : #endif
   63097             : #ifdef PY_NETR_SERVERPASSWORDSET_PATCH
   63098             :         PY_NETR_SERVERPASSWORDSET_PATCH(&netr_ServerPasswordSet_Type);
   63099             : #endif
   63100             : #ifdef PY_NETR_DATABASEDELTAS_PATCH
   63101             :         PY_NETR_DATABASEDELTAS_PATCH(&netr_DatabaseDeltas_Type);
   63102             : #endif
   63103             : #ifdef PY_NETR_DATABASESYNC_PATCH
   63104             :         PY_NETR_DATABASESYNC_PATCH(&netr_DatabaseSync_Type);
   63105             : #endif
   63106             : #ifdef PY_NETR_ACCOUNTDELTAS_PATCH
   63107             :         PY_NETR_ACCOUNTDELTAS_PATCH(&netr_AccountDeltas_Type);
   63108             : #endif
   63109             : #ifdef PY_NETR_ACCOUNTSYNC_PATCH
   63110             :         PY_NETR_ACCOUNTSYNC_PATCH(&netr_AccountSync_Type);
   63111             : #endif
   63112             : #ifdef PY_NETR_GETDCNAME_PATCH
   63113             :         PY_NETR_GETDCNAME_PATCH(&netr_GetDcName_Type);
   63114             : #endif
   63115             : #ifdef PY_NETR_LOGONCONTROL_PATCH
   63116             :         PY_NETR_LOGONCONTROL_PATCH(&netr_LogonControl_Type);
   63117             : #endif
   63118             : #ifdef PY_NETR_GETANYDCNAME_PATCH
   63119             :         PY_NETR_GETANYDCNAME_PATCH(&netr_GetAnyDCName_Type);
   63120             : #endif
   63121             : #ifdef PY_NETR_LOGONCONTROL2_PATCH
   63122             :         PY_NETR_LOGONCONTROL2_PATCH(&netr_LogonControl2_Type);
   63123             : #endif
   63124             : #ifdef PY_NETR_SERVERAUTHENTICATE2_PATCH
   63125             :         PY_NETR_SERVERAUTHENTICATE2_PATCH(&netr_ServerAuthenticate2_Type);
   63126             : #endif
   63127             : #ifdef PY_NETR_DATABASESYNC2_PATCH
   63128             :         PY_NETR_DATABASESYNC2_PATCH(&netr_DatabaseSync2_Type);
   63129             : #endif
   63130             : #ifdef PY_NETR_DATABASEREDO_PATCH
   63131             :         PY_NETR_DATABASEREDO_PATCH(&netr_DatabaseRedo_Type);
   63132             : #endif
   63133             : #ifdef PY_NETR_LOGONCONTROL2EX_PATCH
   63134             :         PY_NETR_LOGONCONTROL2EX_PATCH(&netr_LogonControl2Ex_Type);
   63135             : #endif
   63136             : #ifdef PY_NETR_NETRENUMERATETRUSTEDDOMAINS_PATCH
   63137             :         PY_NETR_NETRENUMERATETRUSTEDDOMAINS_PATCH(&netr_NetrEnumerateTrustedDomains_Type);
   63138             : #endif
   63139             : #ifdef PY_NETR_DSRGETDCNAME_PATCH
   63140             :         PY_NETR_DSRGETDCNAME_PATCH(&netr_DsRGetDCName_Type);
   63141             : #endif
   63142             : #ifdef PY_NETR_LOGONGETCAPABILITIES_PATCH
   63143             :         PY_NETR_LOGONGETCAPABILITIES_PATCH(&netr_LogonGetCapabilities_Type);
   63144             : #endif
   63145             : #ifdef PY_NETR_LOGONGETTRUSTRID_PATCH
   63146             :         PY_NETR_LOGONGETTRUSTRID_PATCH(&netr_LogonGetTrustRid_Type);
   63147             : #endif
   63148             : #ifdef PY_NETR_SERVERAUTHENTICATE3_PATCH
   63149             :         PY_NETR_SERVERAUTHENTICATE3_PATCH(&netr_ServerAuthenticate3_Type);
   63150             : #endif
   63151             : #ifdef PY_NETR_DSRGETDCNAMEEX_PATCH
   63152             :         PY_NETR_DSRGETDCNAMEEX_PATCH(&netr_DsRGetDCNameEx_Type);
   63153             : #endif
   63154             : #ifdef PY_NETR_DSRGETSITENAME_PATCH
   63155             :         PY_NETR_DSRGETSITENAME_PATCH(&netr_DsRGetSiteName_Type);
   63156             : #endif
   63157             : #ifdef PY_NETR_LOGONGETDOMAININFO_PATCH
   63158             :         PY_NETR_LOGONGETDOMAININFO_PATCH(&netr_LogonGetDomainInfo_Type);
   63159             : #endif
   63160             : #ifdef PY_NETR_SERVERPASSWORDSET2_PATCH
   63161             :         PY_NETR_SERVERPASSWORDSET2_PATCH(&netr_ServerPasswordSet2_Type);
   63162             : #endif
   63163             : #ifdef PY_NETR_SERVERPASSWORDGET_PATCH
   63164             :         PY_NETR_SERVERPASSWORDGET_PATCH(&netr_ServerPasswordGet_Type);
   63165             : #endif
   63166             : #ifdef PY_NETR_NETRLOGONSENDTOSAM_PATCH
   63167             :         PY_NETR_NETRLOGONSENDTOSAM_PATCH(&netr_NetrLogonSendToSam_Type);
   63168             : #endif
   63169             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESW_PATCH
   63170             :         PY_NETR_DSRADDRESSTOSITENAMESW_PATCH(&netr_DsRAddressToSitenamesW_Type);
   63171             : #endif
   63172             : #ifdef PY_NETR_DSRGETDCNAMEEX2_PATCH
   63173             :         PY_NETR_DSRGETDCNAMEEX2_PATCH(&netr_DsRGetDCNameEx2_Type);
   63174             : #endif
   63175             : #ifdef PY_NETR_NETRENUMERATETRUSTEDDOMAINSEX_PATCH
   63176             :         PY_NETR_NETRENUMERATETRUSTEDDOMAINSEX_PATCH(&netr_NetrEnumerateTrustedDomainsEx_Type);
   63177             : #endif
   63178             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESEXW_PATCH
   63179             :         PY_NETR_DSRADDRESSTOSITENAMESEXW_PATCH(&netr_DsRAddressToSitenamesExW_Type);
   63180             : #endif
   63181             : #ifdef PY_NETR_DSRGETDCSITECOVERAGEW_PATCH
   63182             :         PY_NETR_DSRGETDCSITECOVERAGEW_PATCH(&netr_DsrGetDcSiteCoverageW_Type);
   63183             : #endif
   63184             : #ifdef PY_NETR_LOGONSAMLOGONEX_PATCH
   63185             :         PY_NETR_LOGONSAMLOGONEX_PATCH(&netr_LogonSamLogonEx_Type);
   63186             : #endif
   63187             : #ifdef PY_NETR_DSRENUMERATEDOMAINTRUSTS_PATCH
   63188             :         PY_NETR_DSRENUMERATEDOMAINTRUSTS_PATCH(&netr_DsrEnumerateDomainTrusts_Type);
   63189             : #endif
   63190             : #ifdef PY_NETR_DSRDEREGISTERDNSHOSTRECORDS_PATCH
   63191             :         PY_NETR_DSRDEREGISTERDNSHOSTRECORDS_PATCH(&netr_DsrDeregisterDNSHostRecords_Type);
   63192             : #endif
   63193             : #ifdef PY_NETR_SERVERTRUSTPASSWORDSGET_PATCH
   63194             :         PY_NETR_SERVERTRUSTPASSWORDSGET_PATCH(&netr_ServerTrustPasswordsGet_Type);
   63195             : #endif
   63196             : #ifdef PY_NETR_DSRGETFORESTTRUSTINFORMATION_PATCH
   63197             :         PY_NETR_DSRGETFORESTTRUSTINFORMATION_PATCH(&netr_DsRGetForestTrustInformation_Type);
   63198             : #endif
   63199             : #ifdef PY_NETR_GETFORESTTRUSTINFORMATION_PATCH
   63200             :         PY_NETR_GETFORESTTRUSTINFORMATION_PATCH(&netr_GetForestTrustInformation_Type);
   63201             : #endif
   63202             : #ifdef PY_NETR_LOGONSAMLOGONWITHFLAGS_PATCH
   63203             :         PY_NETR_LOGONSAMLOGONWITHFLAGS_PATCH(&netr_LogonSamLogonWithFlags_Type);
   63204             : #endif
   63205             : #ifdef PY_NETR_SERVERGETTRUSTINFO_PATCH
   63206             :         PY_NETR_SERVERGETTRUSTINFO_PATCH(&netr_ServerGetTrustInfo_Type);
   63207             : #endif
   63208             : #ifdef PY_NETR_UNUSED47_PATCH
   63209             :         PY_NETR_UNUSED47_PATCH(&netr_Unused47_Type);
   63210             : #endif
   63211             : #ifdef PY_NETR_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH
   63212             :         PY_NETR_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH(&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
   63213             : #endif
   63214             : #ifdef PY_NETLOGON_PATCH
   63215             :         PY_NETLOGON_PATCH(&netlogon_InterfaceType);
   63216             : #endif
   63217             : #ifdef PY_NETLOGON_ABSTRACT_SYNTAX_PATCH
   63218             :         PY_NETLOGON_ABSTRACT_SYNTAX_PATCH(&netlogon_SyntaxType);
   63219             : #endif
   63220             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
   63221             :         PY_ABSTRACT_SYNTAX_PATCH(&netlogon_SyntaxType);
   63222             : #endif
   63223             : 
   63224        4095 :         m = PyModule_Create(&moduledef);
   63225        4095 :         if (m == NULL)
   63226           0 :                 goto out;
   63227             : 
   63228        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_128BIT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_STRONG_KEYS));
   63229        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_SCHANNEL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AUTHENTICATED_RPC));
   63230        4095 :         PyModule_AddObject(m, "DSGETDC_VALID_FLAGS", PyLong_FromLong((DS_FORCE_REDISCOVERY|DS_DIRECTORY_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_PREFERRED|DS_GC_SERVER_REQUIRED|DS_PDC_REQUIRED|DS_BACKGROUND_ONLY|DS_IP_REQUIRED|DS_KDC_REQUIRED|DS_TIMESERV_REQUIRED|DS_WRITABLE_REQUIRED|DS_GOOD_TIMESERV_PREFERRED|DS_AVOID_SELF|DS_ONLY_LDAP_NEEDED|DS_IS_FLAT_NAME|DS_IS_DNS_NAME|DS_TRY_NEXTCLOSEST_SITE|DS_DIRECTORY_SERVICE_6_REQUIRED|DS_WEB_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_8_REQUIRED|DS_DIRECTORY_SERVICE_9_REQUIRED|DS_DIRECTORY_SERVICE_10_REQUIRED|DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME)));
   63231        4095 :         PyModule_AddObject(m, "NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT", PyLong_FromUnsignedLongLong(0x02231968));
   63232        4095 :         PyModule_AddObject(m, "DS_GFTI_UPDATE_TDO", PyLong_FromUnsignedLongLong(0x1));
   63233        4095 :         PyModule_AddObject(m, "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_CLEARTEXT_PASSWORD_ALLOWED));
   63234        4095 :         PyModule_AddObject(m, "MSV1_0_UPDATE_LOGON_STATISTICS", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_UPDATE_LOGON_STATISTICS));
   63235        4095 :         PyModule_AddObject(m, "MSV1_0_RETURN_USER_PARAMETERS", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_RETURN_USER_PARAMETERS));
   63236        4095 :         PyModule_AddObject(m, "MSV1_0_DONT_TRY_GUEST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_DONT_TRY_GUEST_ACCOUNT));
   63237        4095 :         PyModule_AddObject(m, "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT));
   63238        4095 :         PyModule_AddObject(m, "MSV1_0_RETURN_PASSWORD_EXPIRY", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_RETURN_PASSWORD_EXPIRY));
   63239        4095 :         PyModule_AddObject(m, "MSV1_0_USE_CLIENT_CHALLENGE", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_USE_CLIENT_CHALLENGE));
   63240        4095 :         PyModule_AddObject(m, "MSV1_0_TRY_GUEST_ACCOUNT_ONLY", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_TRY_GUEST_ACCOUNT_ONLY));
   63241        4095 :         PyModule_AddObject(m, "MSV1_0_RETURN_PROFILE_PATH", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_RETURN_PROFILE_PATH));
   63242        4095 :         PyModule_AddObject(m, "MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY));
   63243        4095 :         PyModule_AddObject(m, "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT));
   63244        4095 :         PyModule_AddObject(m, "MSV1_0_DISABLE_PERSONAL_FALLBACK", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_DISABLE_PERSONAL_FALLBACK));
   63245        4095 :         PyModule_AddObject(m, "MSV1_0_ALLOW_FORCE_GUEST", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_ALLOW_FORCE_GUEST));
   63246        4095 :         PyModule_AddObject(m, "MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED));
   63247        4095 :         PyModule_AddObject(m, "MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY));
   63248        4095 :         PyModule_AddObject(m, "MSV1_0_ALLOW_MSVCHAPV2", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_ALLOW_MSVCHAPV2));
   63249        4095 :         PyModule_AddObject(m, "MSV1_0_S4U2SELF", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_S4U2SELF));
   63250        4095 :         PyModule_AddObject(m, "MSV1_0_CHECK_LOGONHOURS_FOR_S4U", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_CHECK_LOGONHOURS_FOR_S4U));
   63251        4095 :         PyModule_AddObject(m, "MSV1_0_SUBAUTHENTICATION_DLL_EX", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_SUBAUTHENTICATION_DLL_EX));
   63252        4095 :         PyModule_AddObject(m, "NetlogonInteractiveInformation", PyLong_FromLong((uint16_t)NetlogonInteractiveInformation));
   63253        4095 :         PyModule_AddObject(m, "NetlogonNetworkInformation", PyLong_FromLong((uint16_t)NetlogonNetworkInformation));
   63254        4095 :         PyModule_AddObject(m, "NetlogonServiceInformation", PyLong_FromLong((uint16_t)NetlogonServiceInformation));
   63255        4095 :         PyModule_AddObject(m, "NetlogonGenericInformation", PyLong_FromLong((uint16_t)NetlogonGenericInformation));
   63256        4095 :         PyModule_AddObject(m, "NetlogonInteractiveTransitiveInformation", PyLong_FromLong((uint16_t)NetlogonInteractiveTransitiveInformation));
   63257        4095 :         PyModule_AddObject(m, "NetlogonNetworkTransitiveInformation", PyLong_FromLong((uint16_t)NetlogonNetworkTransitiveInformation));
   63258        4095 :         PyModule_AddObject(m, "NetlogonServiceTransitiveInformation", PyLong_FromLong((uint16_t)NetlogonServiceTransitiveInformation));
   63259        4095 :         PyModule_AddObject(m, "NETLOGON_GUEST", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_GUEST));
   63260        4095 :         PyModule_AddObject(m, "NETLOGON_NOENCRYPTION", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NOENCRYPTION));
   63261        4095 :         PyModule_AddObject(m, "NETLOGON_CACHED_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CACHED_ACCOUNT));
   63262        4095 :         PyModule_AddObject(m, "NETLOGON_USED_LM_PASSWORD", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_USED_LM_PASSWORD));
   63263        4095 :         PyModule_AddObject(m, "NETLOGON_EXTRA_SIDS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_EXTRA_SIDS));
   63264        4095 :         PyModule_AddObject(m, "NETLOGON_SUBAUTH_SESSION_KEY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SUBAUTH_SESSION_KEY));
   63265        4095 :         PyModule_AddObject(m, "NETLOGON_SERVER_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SERVER_TRUST_ACCOUNT));
   63266        4095 :         PyModule_AddObject(m, "NETLOGON_NTLMV2_ENABLED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NTLMV2_ENABLED));
   63267        4095 :         PyModule_AddObject(m, "NETLOGON_RESOURCE_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_RESOURCE_GROUPS));
   63268        4095 :         PyModule_AddObject(m, "NETLOGON_PROFILE_PATH_RETURNED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_PROFILE_PATH_RETURNED));
   63269        4095 :         PyModule_AddObject(m, "NETLOGON_GRACE_LOGON", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_GRACE_LOGON));
   63270        4095 :         PyModule_AddObject(m, "NetlogonValidationUasInfo", PyLong_FromLong((uint16_t)NetlogonValidationUasInfo));
   63271        4095 :         PyModule_AddObject(m, "NetlogonValidationSamInfo", PyLong_FromLong((uint16_t)NetlogonValidationSamInfo));
   63272        4095 :         PyModule_AddObject(m, "NetlogonValidationSamInfo2", PyLong_FromLong((uint16_t)NetlogonValidationSamInfo2));
   63273        4095 :         PyModule_AddObject(m, "NetlogonValidationGenericInfo2", PyLong_FromLong((uint16_t)NetlogonValidationGenericInfo2));
   63274        4095 :         PyModule_AddObject(m, "NetlogonValidationSamInfo4", PyLong_FromLong((uint16_t)NetlogonValidationSamInfo4));
   63275        4095 :         PyModule_AddObject(m, "NETR_DELTA_DOMAIN", PyLong_FromLong((uint16_t)NETR_DELTA_DOMAIN));
   63276        4095 :         PyModule_AddObject(m, "NETR_DELTA_GROUP", PyLong_FromLong((uint16_t)NETR_DELTA_GROUP));
   63277        4095 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_GROUP", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_GROUP));
   63278        4095 :         PyModule_AddObject(m, "NETR_DELTA_RENAME_GROUP", PyLong_FromLong((uint16_t)NETR_DELTA_RENAME_GROUP));
   63279        4095 :         PyModule_AddObject(m, "NETR_DELTA_USER", PyLong_FromLong((uint16_t)NETR_DELTA_USER));
   63280        4095 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_USER", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_USER));
   63281        4095 :         PyModule_AddObject(m, "NETR_DELTA_RENAME_USER", PyLong_FromLong((uint16_t)NETR_DELTA_RENAME_USER));
   63282        4095 :         PyModule_AddObject(m, "NETR_DELTA_GROUP_MEMBER", PyLong_FromLong((uint16_t)NETR_DELTA_GROUP_MEMBER));
   63283        4095 :         PyModule_AddObject(m, "NETR_DELTA_ALIAS", PyLong_FromLong((uint16_t)NETR_DELTA_ALIAS));
   63284        4095 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_ALIAS", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_ALIAS));
   63285        4095 :         PyModule_AddObject(m, "NETR_DELTA_RENAME_ALIAS", PyLong_FromLong((uint16_t)NETR_DELTA_RENAME_ALIAS));
   63286        4095 :         PyModule_AddObject(m, "NETR_DELTA_ALIAS_MEMBER", PyLong_FromLong((uint16_t)NETR_DELTA_ALIAS_MEMBER));
   63287        4095 :         PyModule_AddObject(m, "NETR_DELTA_POLICY", PyLong_FromLong((uint16_t)NETR_DELTA_POLICY));
   63288        4095 :         PyModule_AddObject(m, "NETR_DELTA_TRUSTED_DOMAIN", PyLong_FromLong((uint16_t)NETR_DELTA_TRUSTED_DOMAIN));
   63289        4095 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_TRUST", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_TRUST));
   63290        4095 :         PyModule_AddObject(m, "NETR_DELTA_ACCOUNT", PyLong_FromLong((uint16_t)NETR_DELTA_ACCOUNT));
   63291        4095 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_ACCOUNT", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_ACCOUNT));
   63292        4095 :         PyModule_AddObject(m, "NETR_DELTA_SECRET", PyLong_FromLong((uint16_t)NETR_DELTA_SECRET));
   63293        4095 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_SECRET", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_SECRET));
   63294        4095 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_GROUP2", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_GROUP2));
   63295        4095 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_USER2", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_USER2));
   63296        4095 :         PyModule_AddObject(m, "NETR_DELTA_MODIFY_COUNT", PyLong_FromLong((uint16_t)NETR_DELTA_MODIFY_COUNT));
   63297        4095 :         PyModule_AddObject(m, "NETLOGON_REPLICATION_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_REPLICATION_NEEDED));
   63298        4095 :         PyModule_AddObject(m, "NETLOGON_REPLICATION_IN_PROGRESS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_REPLICATION_IN_PROGRESS));
   63299        4095 :         PyModule_AddObject(m, "NETLOGON_FULL_SYNC_REPLICATION", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_FULL_SYNC_REPLICATION));
   63300        4095 :         PyModule_AddObject(m, "NETLOGON_REDO_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_REDO_NEEDED));
   63301        4095 :         PyModule_AddObject(m, "NETLOGON_HAS_IP", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_HAS_IP));
   63302        4095 :         PyModule_AddObject(m, "NETLOGON_HAS_TIMESERV", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_HAS_TIMESERV));
   63303        4095 :         PyModule_AddObject(m, "NETLOGON_DNS_UPDATE_FAILURE", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_DNS_UPDATE_FAILURE));
   63304        4095 :         PyModule_AddObject(m, "NETLOGON_VERIFY_STATUS_RETURNED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_VERIFY_STATUS_RETURNED));
   63305        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_QUERY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_QUERY));
   63306        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_REPLICATE", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_REPLICATE));
   63307        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_SYNCHRONIZE", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_SYNCHRONIZE));
   63308        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_PDC_REPLICATE", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_PDC_REPLICATE));
   63309        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_REDISCOVER", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_REDISCOVER));
   63310        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TC_QUERY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_TC_QUERY));
   63311        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TRANSPORT_NOTIFY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_TRANSPORT_NOTIFY));
   63312        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_FIND_USER", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_FIND_USER));
   63313        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_CHANGE_PASSWORD", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_CHANGE_PASSWORD));
   63314        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TC_VERIFY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_TC_VERIFY));
   63315        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_FORCE_DNS_REG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_FORCE_DNS_REG));
   63316        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_QUERY_DNS_REG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_QUERY_DNS_REG));
   63317        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_BACKUP_CHANGE_LOG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_BACKUP_CHANGE_LOG));
   63318        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TRUNCATE_LOG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_TRUNCATE_LOG));
   63319        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_SET_DBFLAG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_SET_DBFLAG));
   63320        4095 :         PyModule_AddObject(m, "NETLOGON_CONTROL_BREAKPOINT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_BREAKPOINT));
   63321        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_ACCOUNT_LOCKOUT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_ACCOUNT_LOCKOUT));
   63322        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_PERSISTENT_SAMREPL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_PERSISTENT_SAMREPL));
   63323        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_ARCFOUR", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_ARCFOUR));
   63324        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_PROMOTION_COUNT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_PROMOTION_COUNT));
   63325        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_CHANGELOG_BDC", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_CHANGELOG_BDC));
   63326        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_FULL_SYNC_REPL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_FULL_SYNC_REPL));
   63327        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_MULTIPLE_SIDS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_MULTIPLE_SIDS));
   63328        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_REDO", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_REDO));
   63329        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL));
   63330        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_SEND_PASSWORD_INFO_PDC", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_SEND_PASSWORD_INFO_PDC));
   63331        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_GENERIC_PASSTHROUGH", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_GENERIC_PASSTHROUGH));
   63332        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_CONCURRENT_RPC", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_CONCURRENT_RPC));
   63333        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL));
   63334        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL));
   63335        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_STRONG_KEYS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_STRONG_KEYS));
   63336        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_TRANSITIVE_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_TRANSITIVE_TRUSTS));
   63337        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_DNS_DOMAIN_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_DNS_DOMAIN_TRUSTS));
   63338        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_PASSWORD_SET2", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_PASSWORD_SET2));
   63339        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_GETDOMAININFO", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_GETDOMAININFO));
   63340        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_CROSS_FOREST_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_CROSS_FOREST_TRUSTS));
   63341        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION));
   63342        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_RODC_PASSTHROUGH", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_RODC_PASSTHROUGH));
   63343        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_SUPPORTS_AES_SHA2", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_SUPPORTS_AES_SHA2));
   63344        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_SUPPORTS_AES", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_SUPPORTS_AES));
   63345        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_AUTHENTICATED_RPC_LSASS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AUTHENTICATED_RPC_LSASS));
   63346        4095 :         PyModule_AddObject(m, "NETLOGON_NEG_AUTHENTICATED_RPC", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AUTHENTICATED_RPC));
   63347        4095 :         PyModule_AddObject(m, "SYNCSTATE_NORMAL_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_NORMAL_STATE));
   63348        4095 :         PyModule_AddObject(m, "SYNCSTATE_DOMAIN_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_DOMAIN_STATE));
   63349        4095 :         PyModule_AddObject(m, "SYNCSTATE_GROUP_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_GROUP_STATE));
   63350        4095 :         PyModule_AddObject(m, "SYNCSTATE_UAS_BUILT_IN_GROUP_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_UAS_BUILT_IN_GROUP_STATE));
   63351        4095 :         PyModule_AddObject(m, "SYNCSTATE_USER_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_USER_STATE));
   63352        4095 :         PyModule_AddObject(m, "SYNCSTATE_GROUP_MEMBER_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_GROUP_MEMBER_STATE));
   63353        4095 :         PyModule_AddObject(m, "SYNCSTATE_ALIAS_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_ALIAS_STATE));
   63354        4095 :         PyModule_AddObject(m, "SYNCSTATE_ALIAS_MEMBER_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_ALIAS_MEMBER_STATE));
   63355        4095 :         PyModule_AddObject(m, "SYNCSTATE_SAM_DONE_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_SAM_DONE_STATE));
   63356        4095 :         PyModule_AddObject(m, "NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED", PyLong_FromLong((uint16_t)NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED));
   63357        4095 :         PyModule_AddObject(m, "NETR_CHANGELOG_CHANGED_PASSWORD", PyLong_FromLong((uint16_t)NETR_CHANGELOG_CHANGED_PASSWORD));
   63358        4095 :         PyModule_AddObject(m, "NETR_CHANGELOG_SID_INCLUDED", PyLong_FromLong((uint16_t)NETR_CHANGELOG_SID_INCLUDED));
   63359        4095 :         PyModule_AddObject(m, "NETR_CHANGELOG_NAME_INCLUDED", PyLong_FromLong((uint16_t)NETR_CHANGELOG_NAME_INCLUDED));
   63360        4095 :         PyModule_AddObject(m, "NETR_CHANGELOG_FIRST_PROMOTION_OBJ", PyLong_FromLong((uint16_t)NETR_CHANGELOG_FIRST_PROMOTION_OBJ));
   63361        4095 :         PyModule_AddObject(m, "DS_FORCE_REDISCOVERY", PyLong_FromUnsignedLongLong((uint32_t)DS_FORCE_REDISCOVERY));
   63362        4095 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_DIRECTORY_SERVICE_REQUIRED));
   63363        4095 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_PREFERRED", PyLong_FromUnsignedLongLong((uint32_t)DS_DIRECTORY_SERVICE_PREFERRED));
   63364        4095 :         PyModule_AddObject(m, "DS_GC_SERVER_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_GC_SERVER_REQUIRED));
   63365        4095 :         PyModule_AddObject(m, "DS_PDC_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_PDC_REQUIRED));
   63366        4095 :         PyModule_AddObject(m, "DS_BACKGROUND_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DS_BACKGROUND_ONLY));
   63367        4095 :         PyModule_AddObject(m, "DS_IP_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_IP_REQUIRED));
   63368        4095 :         PyModule_AddObject(m, "DS_KDC_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_KDC_REQUIRED));
   63369        4095 :         PyModule_AddObject(m, "DS_TIMESERV_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_TIMESERV_REQUIRED));
   63370        4095 :         PyModule_AddObject(m, "DS_WRITABLE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_WRITABLE_REQUIRED));
   63371        4095 :         PyModule_AddObject(m, "DS_GOOD_TIMESERV_PREFERRED", PyLong_FromUnsignedLongLong((uint32_t)DS_GOOD_TIMESERV_PREFERRED));
   63372        4095 :         PyModule_AddObject(m, "DS_AVOID_SELF", PyLong_FromUnsignedLongLong((uint32_t)DS_AVOID_SELF));
   63373        4095 :         PyModule_AddObject(m, "DS_ONLY_LDAP_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)DS_ONLY_LDAP_NEEDED));
   63374        4095 :         PyModule_AddObject(m, "DS_IS_FLAT_NAME", PyLong_FromUnsignedLongLong((uint32_t)DS_IS_FLAT_NAME));
   63375        4095 :         PyModule_AddObject(m, "DS_IS_DNS_NAME", PyLong_FromUnsignedLongLong((uint32_t)DS_IS_DNS_NAME));
   63376        4095 :         PyModule_AddObject(m, "DS_TRY_NEXTCLOSEST_SITE", PyLong_FromUnsignedLongLong((uint32_t)DS_TRY_NEXTCLOSEST_SITE));
   63377        4095 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_6_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_DIRECTORY_SERVICE_6_REQUIRED));
   63378        4095 :         PyModule_AddObject(m, "DS_WEB_SERVICE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_WEB_SERVICE_REQUIRED));
   63379        4095 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_8_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_DIRECTORY_SERVICE_8_REQUIRED));
   63380        4095 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_9_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_DIRECTORY_SERVICE_9_REQUIRED));
   63381        4095 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_10_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_DIRECTORY_SERVICE_10_REQUIRED));
   63382        4095 :         PyModule_AddObject(m, "DS_RETURN_DNS_NAME", PyLong_FromUnsignedLongLong((uint32_t)DS_RETURN_DNS_NAME));
   63383        4095 :         PyModule_AddObject(m, "DS_RETURN_FLAT_NAME", PyLong_FromUnsignedLongLong((uint32_t)DS_RETURN_FLAT_NAME));
   63384        4095 :         PyModule_AddObject(m, "DS_ADDRESS_TYPE_INET", PyLong_FromUnsignedLongLong((uint32_t)DS_ADDRESS_TYPE_INET));
   63385        4095 :         PyModule_AddObject(m, "DS_ADDRESS_TYPE_NETBIOS", PyLong_FromUnsignedLongLong((uint32_t)DS_ADDRESS_TYPE_NETBIOS));
   63386        4095 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_IN_FOREST", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_IN_FOREST));
   63387        4095 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_OUTBOUND", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_OUTBOUND));
   63388        4095 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_TREEROOT", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_TREEROOT));
   63389        4095 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_PRIMARY", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_PRIMARY));
   63390        4095 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_NATIVE", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_NATIVE));
   63391        4095 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_INBOUND", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_INBOUND));
   63392        4095 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_MIT_KRB5", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_MIT_KRB5));
   63393        4095 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_AES", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_AES));
   63394        4095 :         PyModule_AddObject(m, "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS));
   63395        4095 :         PyModule_AddObject(m, "NETR_WS_FLAG_HANDLES_SPN_UPDATE", PyLong_FromUnsignedLongLong((uint32_t)NETR_WS_FLAG_HANDLES_SPN_UPDATE));
   63396        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_BACKOFFICE", PyLong_FromLong((uint16_t)NETR_VER_SUITE_BACKOFFICE));
   63397        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_BLADE", PyLong_FromLong((uint16_t)NETR_VER_SUITE_BLADE));
   63398        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_COMPUTE_SERVER", PyLong_FromLong((uint16_t)NETR_VER_SUITE_COMPUTE_SERVER));
   63399        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_DATACENTER", PyLong_FromLong((uint16_t)NETR_VER_SUITE_DATACENTER));
   63400        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_ENTERPRISE", PyLong_FromLong((uint16_t)NETR_VER_SUITE_ENTERPRISE));
   63401        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_EMBEDDEDNT", PyLong_FromLong((uint16_t)NETR_VER_SUITE_EMBEDDEDNT));
   63402        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_PERSONAL", PyLong_FromLong((uint16_t)NETR_VER_SUITE_PERSONAL));
   63403        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_SINGLEUSERTS", PyLong_FromLong((uint16_t)NETR_VER_SUITE_SINGLEUSERTS));
   63404        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_SMALLBUSINESS", PyLong_FromLong((uint16_t)NETR_VER_SUITE_SMALLBUSINESS));
   63405        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED", PyLong_FromLong((uint16_t)NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED));
   63406        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_STORAGE_SERVER", PyLong_FromLong((uint16_t)NETR_VER_SUITE_STORAGE_SERVER));
   63407        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_TERMINAL", PyLong_FromLong((uint16_t)NETR_VER_SUITE_TERMINAL));
   63408        4095 :         PyModule_AddObject(m, "NETR_VER_SUITE_WH_SERVER", PyLong_FromLong((uint16_t)NETR_VER_SUITE_WH_SERVER));
   63409        4095 :         PyModule_AddObject(m, "NETR_VER_NT_DOMAIN_CONTROLLER", PyLong_FromLong((uint16_t)NETR_VER_NT_DOMAIN_CONTROLLER));
   63410        4095 :         PyModule_AddObject(m, "NETR_VER_NT_SERVER", PyLong_FromLong((uint16_t)NETR_VER_NT_SERVER));
   63411        4095 :         PyModule_AddObject(m, "NETR_VER_NT_WORKSTATION", PyLong_FromLong((uint16_t)NETR_VER_NT_WORKSTATION));
   63412        4095 :         PyModule_AddObject(m, "SendToSamUpdatePassword", PyLong_FromLong((uint16_t)SendToSamUpdatePassword));
   63413        4095 :         PyModule_AddObject(m, "SendToSamResetBadPasswordCount", PyLong_FromLong((uint16_t)SendToSamResetBadPasswordCount));
   63414        4095 :         PyModule_AddObject(m, "SendToSamUpdatePasswordForward", PyLong_FromLong((uint16_t)SendToSamUpdatePasswordForward));
   63415        4095 :         PyModule_AddObject(m, "SendToSamUpdateLastLogonTimestamp", PyLong_FromLong((uint16_t)SendToSamUpdateLastLogonTimestamp));
   63416        4095 :         PyModule_AddObject(m, "SendToSamResetSmartCardPassword", PyLong_FromLong((uint16_t)SendToSamResetSmartCardPassword));
   63417        4095 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT));
   63418        4095 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP));
   63419        4095 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN));
   63420        4095 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST));
   63421        4095 :         PyModule_AddObject(m, "NlDnsLdapAtSite", PyLong_FromLong((uint16_t)NlDnsLdapAtSite));
   63422        4095 :         PyModule_AddObject(m, "NlDnsGcAtSite", PyLong_FromLong((uint16_t)NlDnsGcAtSite));
   63423        4095 :         PyModule_AddObject(m, "NlDnsDsaCname", PyLong_FromLong((uint16_t)NlDnsDsaCname));
   63424        4095 :         PyModule_AddObject(m, "NlDnsKdcAtSite", PyLong_FromLong((uint16_t)NlDnsKdcAtSite));
   63425        4095 :         PyModule_AddObject(m, "NlDnsDcAtSite", PyLong_FromLong((uint16_t)NlDnsDcAtSite));
   63426        4095 :         PyModule_AddObject(m, "NlDnsRfc1510KdcAtSite", PyLong_FromLong((uint16_t)NlDnsRfc1510KdcAtSite));
   63427        4095 :         PyModule_AddObject(m, "NlDnsGenericGcAtSite", PyLong_FromLong((uint16_t)NlDnsGenericGcAtSite));
   63428        4095 :         PyModule_AddObject(m, "NlDnsInfoTypeNone", PyLong_FromLong((uint16_t)NlDnsInfoTypeNone));
   63429        4095 :         PyModule_AddObject(m, "NlDnsDomainName", PyLong_FromLong((uint16_t)NlDnsDomainName));
   63430        4095 :         PyModule_AddObject(m, "NlDnsDomainNameAlias", PyLong_FromLong((uint16_t)NlDnsDomainNameAlias));
   63431        4095 :         PyModule_AddObject(m, "NlDnsForestName", PyLong_FromLong((uint16_t)NlDnsForestName));
   63432        4095 :         PyModule_AddObject(m, "NlDnsForestNameAlias", PyLong_FromLong((uint16_t)NlDnsForestNameAlias));
   63433        4095 :         PyModule_AddObject(m, "NlDnsNdncDomainName", PyLong_FromLong((uint16_t)NlDnsNdncDomainName));
   63434        4095 :         PyModule_AddObject(m, "NlDnsRecordName", PyLong_FromLong((uint16_t)NlDnsRecordName));
   63435        4095 :         Py_INCREF((PyObject *)(void *)&netr_UasInfo_Type);
   63436        4095 :         PyModule_AddObject(m, "netr_UasInfo", (PyObject *)(void *)&netr_UasInfo_Type);
   63437        4095 :         Py_INCREF((PyObject *)(void *)&netr_UasLogoffInfo_Type);
   63438        4095 :         PyModule_AddObject(m, "netr_UasLogoffInfo", (PyObject *)(void *)&netr_UasLogoffInfo_Type);
   63439        4095 :         Py_INCREF((PyObject *)(void *)&netr_AcctLockStr_Type);
   63440        4095 :         PyModule_AddObject(m, "netr_AcctLockStr", (PyObject *)(void *)&netr_AcctLockStr_Type);
   63441        4095 :         Py_INCREF((PyObject *)(void *)&netr_IdentityInfo_Type);
   63442        4095 :         PyModule_AddObject(m, "netr_IdentityInfo", (PyObject *)(void *)&netr_IdentityInfo_Type);
   63443        4095 :         Py_INCREF((PyObject *)(void *)&netr_PasswordInfo_Type);
   63444        4095 :         PyModule_AddObject(m, "netr_PasswordInfo", (PyObject *)(void *)&netr_PasswordInfo_Type);
   63445        4095 :         Py_INCREF((PyObject *)(void *)&netr_ChallengeResponse_Type);
   63446        4095 :         PyModule_AddObject(m, "netr_ChallengeResponse", (PyObject *)(void *)&netr_ChallengeResponse_Type);
   63447        4095 :         Py_INCREF((PyObject *)(void *)&netr_NetworkInfo_Type);
   63448        4095 :         PyModule_AddObject(m, "netr_NetworkInfo", (PyObject *)(void *)&netr_NetworkInfo_Type);
   63449        4095 :         Py_INCREF((PyObject *)(void *)&netr_GenericInfo_Type);
   63450        4095 :         PyModule_AddObject(m, "netr_GenericInfo", (PyObject *)(void *)&netr_GenericInfo_Type);
   63451        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonLevel_Type);
   63452        4095 :         PyModule_AddObject(m, "netr_LogonLevel", (PyObject *)(void *)&netr_LogonLevel_Type);
   63453        4095 :         Py_INCREF((PyObject *)(void *)&netr_UserSessionKey_Type);
   63454        4095 :         PyModule_AddObject(m, "netr_UserSessionKey", (PyObject *)(void *)&netr_UserSessionKey_Type);
   63455        4095 :         Py_INCREF((PyObject *)(void *)&netr_LMSessionKey_Type);
   63456        4095 :         PyModule_AddObject(m, "netr_LMSessionKey", (PyObject *)(void *)&netr_LMSessionKey_Type);
   63457        4095 :         Py_INCREF((PyObject *)(void *)&netr_SamBaseInfo_Type);
   63458        4095 :         PyModule_AddObject(m, "netr_SamBaseInfo", (PyObject *)(void *)&netr_SamBaseInfo_Type);
   63459        4095 :         Py_INCREF((PyObject *)(void *)&netr_SamInfo2_Type);
   63460        4095 :         PyModule_AddObject(m, "netr_SamInfo2", (PyObject *)(void *)&netr_SamInfo2_Type);
   63461        4095 :         Py_INCREF((PyObject *)(void *)&netr_SidAttr_Type);
   63462        4095 :         PyModule_AddObject(m, "netr_SidAttr", (PyObject *)(void *)&netr_SidAttr_Type);
   63463        4095 :         Py_INCREF((PyObject *)(void *)&netr_SamInfo3_Type);
   63464        4095 :         PyModule_AddObject(m, "netr_SamInfo3", (PyObject *)(void *)&netr_SamInfo3_Type);
   63465        4095 :         Py_INCREF((PyObject *)(void *)&netr_SamInfo6_Type);
   63466        4095 :         PyModule_AddObject(m, "netr_SamInfo6", (PyObject *)(void *)&netr_SamInfo6_Type);
   63467        4095 :         Py_INCREF((PyObject *)(void *)&netr_PacInfo_Type);
   63468        4095 :         PyModule_AddObject(m, "netr_PacInfo", (PyObject *)(void *)&netr_PacInfo_Type);
   63469        4095 :         Py_INCREF((PyObject *)(void *)&netr_GenericInfo2_Type);
   63470        4095 :         PyModule_AddObject(m, "netr_GenericInfo2", (PyObject *)(void *)&netr_GenericInfo2_Type);
   63471        4095 :         Py_INCREF((PyObject *)(void *)&netr_Validation_Type);
   63472        4095 :         PyModule_AddObject(m, "netr_Validation", (PyObject *)(void *)&netr_Validation_Type);
   63473        4095 :         Py_INCREF((PyObject *)(void *)&netr_Credential_Type);
   63474        4095 :         PyModule_AddObject(m, "netr_Credential", (PyObject *)(void *)&netr_Credential_Type);
   63475        4095 :         Py_INCREF((PyObject *)(void *)&netlogon_server_pipe_state_Type);
   63476        4095 :         PyModule_AddObject(m, "server_pipe_state", (PyObject *)(void *)&netlogon_server_pipe_state_Type);
   63477        4095 :         Py_INCREF((PyObject *)(void *)&netr_Authenticator_Type);
   63478        4095 :         PyModule_AddObject(m, "netr_Authenticator", (PyObject *)(void *)&netr_Authenticator_Type);
   63479        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_DELETE_USER_Type);
   63480        4095 :         PyModule_AddObject(m, "netr_DELTA_DELETE_USER", (PyObject *)(void *)&netr_DELTA_DELETE_USER_Type);
   63481        4095 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEY16_Type);
   63482        4095 :         PyModule_AddObject(m, "netr_USER_KEY16", (PyObject *)(void *)&netr_USER_KEY16_Type);
   63483        4095 :         Py_INCREF((PyObject *)(void *)&netr_PasswordHistory_Type);
   63484        4095 :         PyModule_AddObject(m, "netr_PasswordHistory", (PyObject *)(void *)&netr_PasswordHistory_Type);
   63485        4095 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEYS2_Type);
   63486        4095 :         PyModule_AddObject(m, "netr_USER_KEYS2", (PyObject *)(void *)&netr_USER_KEYS2_Type);
   63487        4095 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEY_UNION_Type);
   63488        4095 :         PyModule_AddObject(m, "netr_USER_KEY_UNION", (PyObject *)(void *)&netr_USER_KEY_UNION_Type);
   63489        4095 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEYS_Type);
   63490        4095 :         PyModule_AddObject(m, "netr_USER_KEYS", (PyObject *)(void *)&netr_USER_KEYS_Type);
   63491        4095 :         Py_INCREF((PyObject *)(void *)&netr_USER_PRIVATE_INFO_Type);
   63492        4095 :         PyModule_AddObject(m, "netr_USER_PRIVATE_INFO", (PyObject *)(void *)&netr_USER_PRIVATE_INFO_Type);
   63493        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_USER_Type);
   63494        4095 :         PyModule_AddObject(m, "netr_DELTA_USER", (PyObject *)(void *)&netr_DELTA_USER_Type);
   63495        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_DOMAIN_Type);
   63496        4095 :         PyModule_AddObject(m, "netr_DELTA_DOMAIN", (PyObject *)(void *)&netr_DELTA_DOMAIN_Type);
   63497        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_GROUP_Type);
   63498        4095 :         PyModule_AddObject(m, "netr_DELTA_GROUP", (PyObject *)(void *)&netr_DELTA_GROUP_Type);
   63499        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_RENAME_Type);
   63500        4095 :         PyModule_AddObject(m, "netr_DELTA_RENAME", (PyObject *)(void *)&netr_DELTA_RENAME_Type);
   63501        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_GROUP_MEMBER_Type);
   63502        4095 :         PyModule_AddObject(m, "netr_DELTA_GROUP_MEMBER", (PyObject *)(void *)&netr_DELTA_GROUP_MEMBER_Type);
   63503        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ALIAS_Type);
   63504        4095 :         PyModule_AddObject(m, "netr_DELTA_ALIAS", (PyObject *)(void *)&netr_DELTA_ALIAS_Type);
   63505        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ALIAS_MEMBER_Type);
   63506        4095 :         PyModule_AddObject(m, "netr_DELTA_ALIAS_MEMBER", (PyObject *)(void *)&netr_DELTA_ALIAS_MEMBER_Type);
   63507        4095 :         Py_INCREF((PyObject *)(void *)&netr_QUOTA_LIMITS_Type);
   63508        4095 :         PyModule_AddObject(m, "netr_QUOTA_LIMITS", (PyObject *)(void *)&netr_QUOTA_LIMITS_Type);
   63509        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_POLICY_Type);
   63510        4095 :         PyModule_AddObject(m, "netr_DELTA_POLICY", (PyObject *)(void *)&netr_DELTA_POLICY_Type);
   63511        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_TRUSTED_DOMAIN_Type);
   63512        4095 :         PyModule_AddObject(m, "netr_DELTA_TRUSTED_DOMAIN", (PyObject *)(void *)&netr_DELTA_TRUSTED_DOMAIN_Type);
   63513        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ACCOUNT_Type);
   63514        4095 :         PyModule_AddObject(m, "netr_DELTA_ACCOUNT", (PyObject *)(void *)&netr_DELTA_ACCOUNT_Type);
   63515        4095 :         Py_INCREF((PyObject *)(void *)&netr_CIPHER_VALUE_Type);
   63516        4095 :         PyModule_AddObject(m, "netr_CIPHER_VALUE", (PyObject *)(void *)&netr_CIPHER_VALUE_Type);
   63517        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_SECRET_Type);
   63518        4095 :         PyModule_AddObject(m, "netr_DELTA_SECRET", (PyObject *)(void *)&netr_DELTA_SECRET_Type);
   63519        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_UNION_Type);
   63520        4095 :         PyModule_AddObject(m, "netr_DELTA_UNION", (PyObject *)(void *)&netr_DELTA_UNION_Type);
   63521        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ID_UNION_Type);
   63522        4095 :         PyModule_AddObject(m, "netr_DELTA_ID_UNION", (PyObject *)(void *)&netr_DELTA_ID_UNION_Type);
   63523        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ENUM_Type);
   63524        4095 :         PyModule_AddObject(m, "netr_DELTA_ENUM", (PyObject *)(void *)&netr_DELTA_ENUM_Type);
   63525        4095 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ENUM_ARRAY_Type);
   63526        4095 :         PyModule_AddObject(m, "netr_DELTA_ENUM_ARRAY", (PyObject *)(void *)&netr_DELTA_ENUM_ARRAY_Type);
   63527        4095 :         Py_INCREF((PyObject *)(void *)&netr_UAS_INFO_0_Type);
   63528        4095 :         PyModule_AddObject(m, "netr_UAS_INFO_0", (PyObject *)(void *)&netr_UAS_INFO_0_Type);
   63529        4095 :         Py_INCREF((PyObject *)(void *)&netr_AccountBuffer_Type);
   63530        4095 :         PyModule_AddObject(m, "netr_AccountBuffer", (PyObject *)(void *)&netr_AccountBuffer_Type);
   63531        4095 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_1_Type);
   63532        4095 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_1", (PyObject *)(void *)&netr_NETLOGON_INFO_1_Type);
   63533        4095 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_2_Type);
   63534        4095 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_2", (PyObject *)(void *)&netr_NETLOGON_INFO_2_Type);
   63535        4095 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_3_Type);
   63536        4095 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_3", (PyObject *)(void *)&netr_NETLOGON_INFO_3_Type);
   63537        4095 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_4_Type);
   63538        4095 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_4", (PyObject *)(void *)&netr_NETLOGON_INFO_4_Type);
   63539        4095 :         Py_INCREF((PyObject *)(void *)&netr_CONTROL_QUERY_INFORMATION_Type);
   63540        4095 :         PyModule_AddObject(m, "netr_CONTROL_QUERY_INFORMATION", (PyObject *)(void *)&netr_CONTROL_QUERY_INFORMATION_Type);
   63541        4095 :         Py_INCREF((PyObject *)(void *)&netr_CONTROL_DATA_INFORMATION_Type);
   63542        4095 :         PyModule_AddObject(m, "netr_CONTROL_DATA_INFORMATION", (PyObject *)(void *)&netr_CONTROL_DATA_INFORMATION_Type);
   63543        4095 :         Py_INCREF((PyObject *)(void *)&netr_ChangeLogObject_Type);
   63544        4095 :         PyModule_AddObject(m, "netr_ChangeLogObject", (PyObject *)(void *)&netr_ChangeLogObject_Type);
   63545        4095 :         Py_INCREF((PyObject *)(void *)&netr_ChangeLogEntry_Type);
   63546        4095 :         PyModule_AddObject(m, "netr_ChangeLogEntry", (PyObject *)(void *)&netr_ChangeLogEntry_Type);
   63547        4095 :         Py_INCREF((PyObject *)(void *)&netr_Blob_Type);
   63548        4095 :         PyModule_AddObject(m, "netr_Blob", (PyObject *)(void *)&netr_Blob_Type);
   63549        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameInfo_Type);
   63550        4095 :         PyModule_AddObject(m, "netr_DsRGetDCNameInfo", (PyObject *)(void *)&netr_DsRGetDCNameInfo_Type);
   63551        4095 :         Py_INCREF((PyObject *)(void *)&netr_Capabilities_Type);
   63552        4095 :         PyModule_AddObject(m, "netr_Capabilities", (PyObject *)(void *)&netr_Capabilities_Type);
   63553        4095 :         Py_INCREF((PyObject *)(void *)&netr_LsaPolicyInformation_Type);
   63554        4095 :         PyModule_AddObject(m, "netr_LsaPolicyInformation", (PyObject *)(void *)&netr_LsaPolicyInformation_Type);
   63555        4095 :         Py_INCREF((PyObject *)(void *)&netr_OsVersionInfoEx_Type);
   63556        4095 :         PyModule_AddObject(m, "netr_OsVersionInfoEx", (PyObject *)(void *)&netr_OsVersionInfoEx_Type);
   63557        4095 :         Py_INCREF((PyObject *)(void *)&netr_OsVersion_Type);
   63558        4095 :         PyModule_AddObject(m, "netr_OsVersion", (PyObject *)(void *)&netr_OsVersion_Type);
   63559        4095 :         Py_INCREF((PyObject *)(void *)&netr_OsVersionContainer_Type);
   63560        4095 :         PyModule_AddObject(m, "netr_OsVersionContainer", (PyObject *)(void *)&netr_OsVersionContainer_Type);
   63561        4095 :         Py_INCREF((PyObject *)(void *)&netr_WorkstationInformation_Type);
   63562        4095 :         PyModule_AddObject(m, "netr_WorkstationInformation", (PyObject *)(void *)&netr_WorkstationInformation_Type);
   63563        4095 :         Py_INCREF((PyObject *)(void *)&netr_WorkstationInfo_Type);
   63564        4095 :         PyModule_AddObject(m, "netr_WorkstationInfo", (PyObject *)(void *)&netr_WorkstationInfo_Type);
   63565        4095 :         Py_INCREF((PyObject *)(void *)&netr_trust_extension_info_Type);
   63566        4095 :         PyModule_AddObject(m, "netr_trust_extension_info", (PyObject *)(void *)&netr_trust_extension_info_Type);
   63567        4095 :         Py_INCREF((PyObject *)(void *)&netr_trust_extension_Type);
   63568        4095 :         PyModule_AddObject(m, "netr_trust_extension", (PyObject *)(void *)&netr_trust_extension_Type);
   63569        4095 :         Py_INCREF((PyObject *)(void *)&netr_trust_extension_container_Type);
   63570        4095 :         PyModule_AddObject(m, "netr_trust_extension_container", (PyObject *)(void *)&netr_trust_extension_container_Type);
   63571        4095 :         Py_INCREF((PyObject *)(void *)&netr_OneDomainInfo_Type);
   63572        4095 :         PyModule_AddObject(m, "netr_OneDomainInfo", (PyObject *)(void *)&netr_OneDomainInfo_Type);
   63573        4095 :         Py_INCREF((PyObject *)(void *)&netr_DomainInformation_Type);
   63574        4095 :         PyModule_AddObject(m, "netr_DomainInformation", (PyObject *)(void *)&netr_DomainInformation_Type);
   63575        4095 :         Py_INCREF((PyObject *)(void *)&netr_DomainInfo_Type);
   63576        4095 :         PyModule_AddObject(m, "netr_DomainInfo", (PyObject *)(void *)&netr_DomainInfo_Type);
   63577        4095 :         Py_INCREF((PyObject *)(void *)&NL_PASSWORD_VERSION_Type);
   63578        4095 :         PyModule_AddObject(m, "NL_PASSWORD_VERSION", (PyObject *)(void *)&NL_PASSWORD_VERSION_Type);
   63579        4095 :         Py_INCREF((PyObject *)(void *)&netr_CryptPassword_Type);
   63580        4095 :         PyModule_AddObject(m, "netr_CryptPassword", (PyObject *)(void *)&netr_CryptPassword_Type);
   63581        4095 :         Py_INCREF((PyObject *)(void *)&netr_SendToSamResetBadPasswordCount_Type);
   63582        4095 :         PyModule_AddObject(m, "netr_SendToSamResetBadPasswordCount", (PyObject *)(void *)&netr_SendToSamResetBadPasswordCount_Type);
   63583        4095 :         Py_INCREF((PyObject *)(void *)&netr_SendToSamMessage_Type);
   63584        4095 :         PyModule_AddObject(m, "netr_SendToSamMessage", (PyObject *)(void *)&netr_SendToSamMessage_Type);
   63585        4095 :         Py_INCREF((PyObject *)(void *)&netr_SendToSamBase_Type);
   63586        4095 :         PyModule_AddObject(m, "netr_SendToSamBase", (PyObject *)(void *)&netr_SendToSamBase_Type);
   63587        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesWCtr_Type);
   63588        4095 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesWCtr", (PyObject *)(void *)&netr_DsRAddressToSitenamesWCtr_Type);
   63589        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddress_Type);
   63590        4095 :         PyModule_AddObject(m, "netr_DsRAddress", (PyObject *)(void *)&netr_DsRAddress_Type);
   63591        4095 :         Py_INCREF((PyObject *)(void *)&netr_DomainTrust_Type);
   63592        4095 :         PyModule_AddObject(m, "netr_DomainTrust", (PyObject *)(void *)&netr_DomainTrust_Type);
   63593        4095 :         Py_INCREF((PyObject *)(void *)&netr_DomainTrustList_Type);
   63594        4095 :         PyModule_AddObject(m, "netr_DomainTrustList", (PyObject *)(void *)&netr_DomainTrustList_Type);
   63595        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesExWCtr_Type);
   63596        4095 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesExWCtr", (PyObject *)(void *)&netr_DsRAddressToSitenamesExWCtr_Type);
   63597        4095 :         Py_INCREF((PyObject *)(void *)&DcSitesCtr_Type);
   63598        4095 :         PyModule_AddObject(m, "DcSitesCtr", (PyObject *)(void *)&DcSitesCtr_Type);
   63599        4095 :         Py_INCREF((PyObject *)(void *)&netr_TrustInfo_Type);
   63600        4095 :         PyModule_AddObject(m, "netr_TrustInfo", (PyObject *)(void *)&netr_TrustInfo_Type);
   63601        4095 :         Py_INCREF((PyObject *)(void *)&NL_DNS_NAME_INFO_Type);
   63602        4095 :         PyModule_AddObject(m, "NL_DNS_NAME_INFO", (PyObject *)(void *)&NL_DNS_NAME_INFO_Type);
   63603        4095 :         Py_INCREF((PyObject *)(void *)&NL_DNS_NAME_INFO_ARRAY_Type);
   63604        4095 :         PyModule_AddObject(m, "NL_DNS_NAME_INFO_ARRAY", (PyObject *)(void *)&NL_DNS_NAME_INFO_ARRAY_Type);
   63605        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonUasLogon_Type);
   63606        4095 :         PyModule_AddObject(m, "netr_LogonUasLogon", (PyObject *)(void *)&netr_LogonUasLogon_Type);
   63607        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonUasLogoff_Type);
   63608        4095 :         PyModule_AddObject(m, "netr_LogonUasLogoff", (PyObject *)(void *)&netr_LogonUasLogoff_Type);
   63609        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogon_Type);
   63610        4095 :         PyModule_AddObject(m, "netr_LogonSamLogon", (PyObject *)(void *)&netr_LogonSamLogon_Type);
   63611        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogoff_Type);
   63612        4095 :         PyModule_AddObject(m, "netr_LogonSamLogoff", (PyObject *)(void *)&netr_LogonSamLogoff_Type);
   63613        4095 :         Py_INCREF((PyObject *)(void *)&netr_ServerReqChallenge_Type);
   63614        4095 :         PyModule_AddObject(m, "netr_ServerReqChallenge", (PyObject *)(void *)&netr_ServerReqChallenge_Type);
   63615        4095 :         Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate_Type);
   63616        4095 :         PyModule_AddObject(m, "netr_ServerAuthenticate", (PyObject *)(void *)&netr_ServerAuthenticate_Type);
   63617        4095 :         Py_INCREF((PyObject *)(void *)&netr_ServerPasswordSet_Type);
   63618        4095 :         PyModule_AddObject(m, "netr_ServerPasswordSet", (PyObject *)(void *)&netr_ServerPasswordSet_Type);
   63619        4095 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseDeltas_Type);
   63620        4095 :         PyModule_AddObject(m, "netr_DatabaseDeltas", (PyObject *)(void *)&netr_DatabaseDeltas_Type);
   63621        4095 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseSync_Type);
   63622        4095 :         PyModule_AddObject(m, "netr_DatabaseSync", (PyObject *)(void *)&netr_DatabaseSync_Type);
   63623        4095 :         Py_INCREF((PyObject *)(void *)&netr_AccountDeltas_Type);
   63624        4095 :         PyModule_AddObject(m, "netr_AccountDeltas", (PyObject *)(void *)&netr_AccountDeltas_Type);
   63625        4095 :         Py_INCREF((PyObject *)(void *)&netr_AccountSync_Type);
   63626        4095 :         PyModule_AddObject(m, "netr_AccountSync", (PyObject *)(void *)&netr_AccountSync_Type);
   63627        4095 :         Py_INCREF((PyObject *)(void *)&netr_GetDcName_Type);
   63628        4095 :         PyModule_AddObject(m, "netr_GetDcName", (PyObject *)(void *)&netr_GetDcName_Type);
   63629        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonControl_Type);
   63630        4095 :         PyModule_AddObject(m, "netr_LogonControl", (PyObject *)(void *)&netr_LogonControl_Type);
   63631        4095 :         Py_INCREF((PyObject *)(void *)&netr_GetAnyDCName_Type);
   63632        4095 :         PyModule_AddObject(m, "netr_GetAnyDCName", (PyObject *)(void *)&netr_GetAnyDCName_Type);
   63633        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonControl2_Type);
   63634        4095 :         PyModule_AddObject(m, "netr_LogonControl2", (PyObject *)(void *)&netr_LogonControl2_Type);
   63635        4095 :         Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate2_Type);
   63636        4095 :         PyModule_AddObject(m, "netr_ServerAuthenticate2", (PyObject *)(void *)&netr_ServerAuthenticate2_Type);
   63637        4095 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseSync2_Type);
   63638        4095 :         PyModule_AddObject(m, "netr_DatabaseSync2", (PyObject *)(void *)&netr_DatabaseSync2_Type);
   63639        4095 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseRedo_Type);
   63640        4095 :         PyModule_AddObject(m, "netr_DatabaseRedo", (PyObject *)(void *)&netr_DatabaseRedo_Type);
   63641        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonControl2Ex_Type);
   63642        4095 :         PyModule_AddObject(m, "netr_LogonControl2Ex", (PyObject *)(void *)&netr_LogonControl2Ex_Type);
   63643        4095 :         Py_INCREF((PyObject *)(void *)&netr_NetrEnumerateTrustedDomains_Type);
   63644        4095 :         PyModule_AddObject(m, "netr_NetrEnumerateTrustedDomains", (PyObject *)(void *)&netr_NetrEnumerateTrustedDomains_Type);
   63645        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCName_Type);
   63646        4095 :         PyModule_AddObject(m, "netr_DsRGetDCName", (PyObject *)(void *)&netr_DsRGetDCName_Type);
   63647        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonGetCapabilities_Type);
   63648        4095 :         PyModule_AddObject(m, "netr_LogonGetCapabilities", (PyObject *)(void *)&netr_LogonGetCapabilities_Type);
   63649        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonGetTrustRid_Type);
   63650        4095 :         PyModule_AddObject(m, "netr_LogonGetTrustRid", (PyObject *)(void *)&netr_LogonGetTrustRid_Type);
   63651        4095 :         Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate3_Type);
   63652        4095 :         PyModule_AddObject(m, "netr_ServerAuthenticate3", (PyObject *)(void *)&netr_ServerAuthenticate3_Type);
   63653        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameEx_Type);
   63654        4095 :         PyModule_AddObject(m, "netr_DsRGetDCNameEx", (PyObject *)(void *)&netr_DsRGetDCNameEx_Type);
   63655        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetSiteName_Type);
   63656        4095 :         PyModule_AddObject(m, "netr_DsRGetSiteName", (PyObject *)(void *)&netr_DsRGetSiteName_Type);
   63657        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonGetDomainInfo_Type);
   63658        4095 :         PyModule_AddObject(m, "netr_LogonGetDomainInfo", (PyObject *)(void *)&netr_LogonGetDomainInfo_Type);
   63659        4095 :         Py_INCREF((PyObject *)(void *)&netr_ServerPasswordSet2_Type);
   63660        4095 :         PyModule_AddObject(m, "netr_ServerPasswordSet2", (PyObject *)(void *)&netr_ServerPasswordSet2_Type);
   63661        4095 :         Py_INCREF((PyObject *)(void *)&netr_ServerPasswordGet_Type);
   63662        4095 :         PyModule_AddObject(m, "netr_ServerPasswordGet", (PyObject *)(void *)&netr_ServerPasswordGet_Type);
   63663        4095 :         Py_INCREF((PyObject *)(void *)&netr_NetrLogonSendToSam_Type);
   63664        4095 :         PyModule_AddObject(m, "netr_NetrLogonSendToSam", (PyObject *)(void *)&netr_NetrLogonSendToSam_Type);
   63665        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesW_Type);
   63666        4095 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesW", (PyObject *)(void *)&netr_DsRAddressToSitenamesW_Type);
   63667        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameEx2_Type);
   63668        4095 :         PyModule_AddObject(m, "netr_DsRGetDCNameEx2", (PyObject *)(void *)&netr_DsRGetDCNameEx2_Type);
   63669        4095 :         Py_INCREF((PyObject *)(void *)&netr_NetrEnumerateTrustedDomainsEx_Type);
   63670        4095 :         PyModule_AddObject(m, "netr_NetrEnumerateTrustedDomainsEx", (PyObject *)(void *)&netr_NetrEnumerateTrustedDomainsEx_Type);
   63671        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesExW_Type);
   63672        4095 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesExW", (PyObject *)(void *)&netr_DsRAddressToSitenamesExW_Type);
   63673        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsrGetDcSiteCoverageW_Type);
   63674        4095 :         PyModule_AddObject(m, "netr_DsrGetDcSiteCoverageW", (PyObject *)(void *)&netr_DsrGetDcSiteCoverageW_Type);
   63675        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogonEx_Type);
   63676        4095 :         PyModule_AddObject(m, "netr_LogonSamLogonEx", (PyObject *)(void *)&netr_LogonSamLogonEx_Type);
   63677        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsrEnumerateDomainTrusts_Type);
   63678        4095 :         PyModule_AddObject(m, "netr_DsrEnumerateDomainTrusts", (PyObject *)(void *)&netr_DsrEnumerateDomainTrusts_Type);
   63679        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsrDeregisterDNSHostRecords_Type);
   63680        4095 :         PyModule_AddObject(m, "netr_DsrDeregisterDNSHostRecords", (PyObject *)(void *)&netr_DsrDeregisterDNSHostRecords_Type);
   63681        4095 :         Py_INCREF((PyObject *)(void *)&netr_ServerTrustPasswordsGet_Type);
   63682        4095 :         PyModule_AddObject(m, "netr_ServerTrustPasswordsGet", (PyObject *)(void *)&netr_ServerTrustPasswordsGet_Type);
   63683        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetForestTrustInformation_Type);
   63684        4095 :         PyModule_AddObject(m, "netr_DsRGetForestTrustInformation", (PyObject *)(void *)&netr_DsRGetForestTrustInformation_Type);
   63685        4095 :         Py_INCREF((PyObject *)(void *)&netr_GetForestTrustInformation_Type);
   63686        4095 :         PyModule_AddObject(m, "netr_GetForestTrustInformation", (PyObject *)(void *)&netr_GetForestTrustInformation_Type);
   63687        4095 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogonWithFlags_Type);
   63688        4095 :         PyModule_AddObject(m, "netr_LogonSamLogonWithFlags", (PyObject *)(void *)&netr_LogonSamLogonWithFlags_Type);
   63689        4095 :         Py_INCREF((PyObject *)(void *)&netr_ServerGetTrustInfo_Type);
   63690        4095 :         PyModule_AddObject(m, "netr_ServerGetTrustInfo", (PyObject *)(void *)&netr_ServerGetTrustInfo_Type);
   63691        4095 :         Py_INCREF((PyObject *)(void *)&netr_Unused47_Type);
   63692        4095 :         PyModule_AddObject(m, "netr_Unused47", (PyObject *)(void *)&netr_Unused47_Type);
   63693        4095 :         Py_INCREF((PyObject *)(void *)&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
   63694        4095 :         PyModule_AddObject(m, "netr_DsrUpdateReadOnlyServerDnsRecords", (PyObject *)(void *)&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
   63695        4095 :         Py_INCREF((PyObject *)(void *)&netlogon_InterfaceType);
   63696        4095 :         PyModule_AddObject(m, "netlogon", (PyObject *)(void *)&netlogon_InterfaceType);
   63697        4095 :         Py_INCREF((PyObject *)(void *)&netlogon_SyntaxType);
   63698        4095 :         PyModule_AddObject(m, "netlogon_abstract_syntax", (PyObject *)(void *)&netlogon_SyntaxType);
   63699        4095 :         Py_INCREF((PyObject *)(void *)&netlogon_SyntaxType);
   63700        4095 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&netlogon_SyntaxType);
   63701             : #ifdef PY_MOD_NETLOGON_PATCH
   63702             :         PY_MOD_NETLOGON_PATCH(m);
   63703             : #endif
   63704        4095 :         out:
   63705        4095 :         Py_XDECREF(dep_samba_dcerpc_misc);
   63706        4095 :         Py_XDECREF(dep_samba_dcerpc_lsa);
   63707        4095 :         Py_XDECREF(dep_samba_dcerpc_samr);
   63708        4095 :         Py_XDECREF(dep_samba_dcerpc_security);
   63709        4095 :         Py_XDECREF(dep_samba_dcerpc_nbt);
   63710        4095 :         Py_XDECREF(dep_talloc);
   63711        4095 :         Py_XDECREF(dep_samba_dcerpc_base);
   63712        3965 :         return m;
   63713             : 
   63714             : }

Generated by: LCOV version 1.14